Tuesday, January 14, 2014

Ripple Emulator: 500 Internal Server Error on localhost connections



I'm trying to develop a mobile app using Cordova (PhoneGap). To test this app I have been using Ripple this is a great tool and much more convenient than the slow Android emulator. One problem I did came across was a 500 Internal Server Error while trying to connect to another server running locally on my computer. This is the http headers and response.

Headers:
Request URL:
https://rippleapi.herokuapp.com/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rurl=http%3A//localhost%3A8080/xxxxxxxx/login/authenticateMobileUser

Request Method:
POST

Status Code:
500 Internal Server Error


Response:
{
  "code": "ECONNREFUSED",
  "errno": "ECONNREFUSED",
  "syscall": "connect"
}

To fix this problem - Ripple emulator by default has "Cross Domain Proxy" set to "Remote". For localhost connections change it to "Local".




2 comments: