Meteor Cordova App: Connection to the server was unsuccessful

Hey guys,
I’m having an issue with my Meteor Cordova app. From time to time the app crashes with the following error dialogue:

 Cordova: Connection to the server was unsuccessful (http://127.0.0.1:...).

Any idea how I can fix this issue?

1 Like

Did you find a fix for that? This appears since I upgraded to 1.5.

Did you find something on this?

The only workaround I found was to set the timeout higher via mobile-config.xml. But that’s not really a satisfying solution IMHO.

I’m wondering too. Has anyone found a fix for this. I’m having the same problem and don’t want to start a new thread.

Hey guys, is the mobile device connected to the same network where the localhost is?

Well. The way I fixed this was as follows:

  1. When running meteor I added the --mobile-server option so my sh script looks like this
export ROOT_URL=http://local-nok.somedomain.com:3031
meteor run ios-device --mobile-server https://qa-nok.somedomain.com --port 3031 --settings settings-ios.json

I have to add here that the export ROOT_URL environment variable sets up where the local meteor server will be running. So I won’t be using that one. But I can open a browser and see the Web App there. The caveat here is that you have to deploy the same server instance to Galaxy.

  1. Then on the mobile-config.js file I added the following line:
App.accessRule('https://qa-nok.fluenthome.com');

This fixed my issue. But I had to point the mobile server to a hosted Galaxy environment. So that is working for me. I hope this helps.