Hi, I had a bad surprise this morning when testing my meteor app in my device (android LG3), yesterday night was working just fine, but today no data from the server is retrieved. I’m my index page I have a subscription.ready() eval that never goes true:
if (!this.subscription.ready()){
IonLoading.show();
} else {
IonLoading.hide();
}
or for example form the login page it always get’s stuck without response.
If I try the same running either in android simulator or browser this just work fine, I’ve also tried to run specifying a given port: meteor run android-device --port 3002
Nothing seems to work, and the app gets frozen without logging anything, this is all I have:
=> Started proxy.
=> Started app on Android Device.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3002/
Also I’ve noticed that if I open a browser window and point to the app url, and modify any code, while the browser reflects the changes the device does not.
I’m lost right now, deleted cordova-build and created again but it’s still the same problem, the device will install the app, but it’ll get stuck in the very first roundtrip to the server…
you can use: meteor run --help to see the detail.
–mobile-server Location where mobile builds connect to the Meteor server.
Defaults to your local IP and the port that the Meteor
server binds to. Can include a URL scheme (for
example, --mobile-server=https://example.com:443).
you can not use --mobile-server=http://localhost:3002. because in your mobile localhost is unknow. others make sure you moblie and your meteor in the same network.
Right, I did not even see it is localhost. There is no server on a phone, so no localhost. Mobile server needs to be pointed to your development or production server
Hey
stubborncoder
i also stuck on this same issue which you mentioned , so have you found any way to solve it? If yes , then please provide me some instruction.
Hi, i have the same problem and i do: meteor run ios-device --mobile-server http://192.168.2.126:3000
It works fie, but if i do an update of the code of my app the refresh on the apps start but i have an error:
if (Meteor.isServer) {
Meteor.startup(function () {
// code to run on server at startup
process.env.MOBILE_DDP_URL = ‘http://1.1.1.1:3000’;
process.env.MOBILE_ROOT_URL = ‘http://1.1.1.1:3000’;
});
}
then…
compile app: meteor run ios-device --web-server=http://1.1.1.1:3000
I never get this error again!
I think code n step 1 is send to client on hot code refresh and helps app to understand where to connect on reload.
Second step is for the first connection of the app at startup.
I cannot found other way to make it works… is possible there is a better solution… but works
my project is deployed on live server, i want to make some customization, but it’s live so i am having same backup on mac and doing customization with localhost, i just put this code ( meteor run ios-device --mobile-server=http://localhost:3000 --production ) in run-mobile.sh
and i ran same command ( meteor run ios-device --mobile-server=http://localhost:3000 --production ) in meteor directory.
My application is getting open in xcode simulator and running good, but i am unable to see my customized code, it still showing codes coming from server, I want run ios app with localhost not with live server.
Is there need to be put any other file, or i need to change that file which i did not find, so where i can found that to set localhost.
Please suggest me on this.
This more recent GitHub issue states that MOBILE_DDP_URL and MOBILE_ROOT_URL are no longer valid. Should be using command line --mobile-server and --server options.