Since today, my mobile apps are not able to connect to my local development server any more. The app starts up, but as soon as I try to login (which triggers a socksjs call), the login dialog gets stuck.
On Android, I’m getting the following message:
XMLHttpRequest cannot load http://192.168.2.102/sockjs/info?cb=_ompx91vso. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://meteor.local' is therefore not allowed access. The response had HTTP status code 404.
iOS fails silently.
I’ve noticed that the IP address of my Mac has changed, so I had to adapt the --mobile-server option accordingly. And I also did an upgrade to Android M in the meantime, but as iOS is affected as well, I don’t think its related to that.
On iOS, I’ve already set the Allow Arbitrary Loads option which prevented connectivity earlier. But this did not help.
I also checked the config.xml file, and the access origin settings include these lines:
I now restarted everything and even re-built the app. The origin message is gone, but I am still getting timeouts as soon as the client tries to access data from 192.168.2.102 via XHR on both devices.
It looks as if the client cannot connect to the Mac. It works, however, if I connect to the webapp using the device’s standard web-browser. Obviously, only the app cannot connect to the IP.
There is an issue with the current hot code push implementation always using the latest downloaded app version instead of the one bundled with the app, and if the server’s IP address changes that means it will still try to connect to the old one.
Argh, I found the problem: When I was updating my startup scripts to match the new IP address, I typed 192.186… instead of 192.168… Completely my fault, sorry for bothering! That’s embarassing…