Closed delki8 closed 4 years ago
It turns out we don't really have a bug here. I found out that Meteor already passes whatever the user fills as the --mobile-server
to ROOT_URL
. The ROOT_URL
is then passed through the index.html and it gets read by the cordova-plugin-meteor-webapp.
So instead of a simple meteor run android
if you do a meteor run android --mobile-server 10.0.2.2:3000
your hot code push will probably work (once you add the right permissions as I mentioned in the reproduction recipe).
Closing this one.
reproduction recipe:
if you open a chrome tab and inspect the app running on android (by typing chrome://inspect) you'll be able to see the following error:
dirty fix
replace this line: https://github.com/meteor/cordova-plugin-meteor-webapp/blob/master/src/android/WebAppLocalServer.java#L262 with this:
HttpUrl rootUrl = HttpUrl.parse(currentAssetBundle.getRootUrlString().replace("localhost", "10.0.2.2"));