Meteor.settings.public defined in browser but not cordova?

I have a meteor app hosted on heroku. METEOR_SETTINGS is set correctly on the server. Meteor.settings.public is defined as expected in my browser app, but undefined in my cordova app. I’m sure both apps are pointed at the same server. Anything obvious I might be missing?

(The app does use appcache, in case that might be relevant.)

Curious, had not such issue so long and also using public settings on cordova.

We are running meteor@1.3.4

Update: Try once on server startup: Meteor.settings.public.dummy = "Hello"

If this is available

Thanks for the response! There’s actually no settings object at all, no PUBLIC_SETTINGS on __meteor_runtime_config__, nada.

Tried Meteor.settings = { public: { build: 'foobarbaz' }}; on server startup, but Meteor.settings is still undefined on the client.

I am “in” as we had a PR once about missing public property - see

Please check and start your app by:

export METEOR_SETTINGS='{ "version": "test", "public": { "hello": "welcome" } }'

On server side do a add to Meteor.startup()


and if its ok, check on your mobile as well.

There you should only get content of Meteor.settings.public

Meteor.settings looks perfect on the server logs, but on the client it’s still undefined. I’m going to try a few other things: revert to a previous build where this was working and see if it still works, make sure my meteor versions match on the client and the server, etc. I’ll add notes here when I know more.

I have it working now, although I’m afraid I wasn’t meticulous enough to know exactly what was wrong. My best guess at the moment: there was a mismatch between the meteor version the app was expecting and the version on the server.

I’m using heroku-buildpack-horse to deploy, which always pulls the latest meteor version, but my app was built with It may be there was some incompatibility there with what the server was providing and what the client was expecting.

Or maybe it was because I was using meteor build and didn’t use --mobile-settings. =/

Having the exact same issue. Did you ever find the root cause of the issue? mobile-settings didn’t help me.

No, I didn’t ever figure out the root issue. Sorry I can’t be more helpful.