I’m not familiar with the scalingo setup, but it seems they use demeteorizer
. Could it be that they somehow do not build the web.cordova
architecture?
Hi @blouze, hi @martijnwalraven
I’m Scalingo’s CTO,maybe I’ll be able to give you a little more insight about our build process. Currently, we do not build to the ‘android’ and ‘ios’ targets. Once built, the programs directory looks like the following:
bundle/programs $ ls
server web.browser
It makes no sens for us to build the ios and android targets as we’re only hosting the web part of the application. Does the ‘server’ target needs the ‘android’ target to be enabled to allow hot code push?
Regards,
– Leo
Hi @soulou, thanks for looking into this. The server target indeed needs to build the web.cordova
architecture to be able to serve updated code to mobile clients.
I’m not sure about your workflow, but the easiest solution is probably to leave the ios
and/or android
targets in as part of the projects and use meteor build
as usual.
If you want to dive in more into what is going on, see:
Actually, letting ios and android does not work for us, building the ios target requires a Mac OS environment to build this target and building the ‘android’ target requires a full Android SDK which is not available in our nodejs/meteor building environment.
For us the ideal solution would be to build the web.cordova architecture without building the full android application. (it has no sense for us to build an Android application on our web hosting platform )
Have you any idea of the feasability of this?
Thanks !
Hmmm, I’m not sure what the best way to deal with this would be. I’ll ask around and get back to you!
Hey @martijnwalraven.
I was wondering if you had some new information on the requirements for building for the web.cordova architecture without the hassle of hosting SDKs and system environments.
Cheers.
We’ve been talking about it internally, and we agree we need to find a solution for this. One option we discussed would be to allow adding a cordova-server-only
platform. Another option might be to add a --server-only
option to meteor build
.
@blouze @soulou: In 1.3-beta.12
, I’ve added a --server-only
option to meteor build
that doesn’t require the mobile SDKs to be installed on the build machine, but that will still build web.cordova
when ios
or android
platforms have been added to the project.
Hey @martijnwalraven!
As a meteor-head, I want to thank you all at MDG for your hard work to bring us 1.3
I just upgraded my mobile app to find out if it would solve my previous problem.
I am able to get the HCP working with a published Cordova app built with --server option set on a locally running instance (I had to build the app first, and then run meteor with a target specified as pointed out here).
After deploying the app in production, I can see the same behaviour as before, web client gets refreshed, no cigar for Cordova.
Values for ROOT_URL is set alright in runtime config, I even get a value for autoupdateVersionCordova.
Pls, halp.
Are both the app and your server on Meteor 1.3?
Can you check if the asset manifest is served at /__cordova/manifest.json
on your production server?
Any error messages either in logcat
or with Chrome remote debugging?
I forgot to mention __cordova/manifest.json
gets served.
BUT, opening logcat (thx for the tip) got me:
Error: Skipping downloading new version because the Cordova platform version or plugin versions have changed and are potentially incompatible
cordova --version
gives 6.1.0
Trying to update incriminated plugins… Getting back at you after that.
Nope, still no luck with my issue
I tried removing every single cordova plugins (including crosswalk), I still get the same error.
The issue is that hot code push can only update JavaScript code, so to protect against situations where updated code depends on (versions of) plugins that are not in the native app bundle, we block hot code push when either the platform version or the set of plugins have changed.
You may have installed or updated plugins yourself, but Meteor 1.3.1 also updates some plugins included by default. So if your server is running Meteor 1.3.1 and your app was build using Meteor 1.3, hot code push will be blocked until you update the app on the app store.
Is this the case, that hot code will be blocked for every minor update to Meteor, if the app and server are not running the same version?
This will be a huge problem for us. I can see the need to do this between 1.2 and 1.3 as it was a major update to mobile with lots of breaking changes. However, this is will be untenable for us if we have to re-submit to app store for every minor bug fix release of Meteor. I can potentially see the need to block hot code push if cordova plugin versions change, but not for Meteor IOS/Android versions.
Please clarify, thanks.
It is not about the version of Meteor per se, so this shouldn’t happen for every minor update. But we did update some of the versions of default plugins in Meteor 1.3.1, so that is what triggered this.
I updated my project to 1.3.1 today and I can see in __meteor_runtime_config__
that this is what’s running in production…
Unless absolutely required because of a major blocking bug in any of the default plugins bundled with Meteor I’d like to suggest that we NOT update these plugins between minor (x.x.x) releases and save these changes for major releases (x.x.0) going forward.
In addition, this should be documented in the release notes and history as this type of change is really a “breaking change” for any deployed mobile app.
Thanks again for all your hard work and great improvements with Meteor mobile.
@martijnwalraven i have a very similar issue while developing locally. The manifest file seems to not be served when i start the server with a simple
meteor run --settings “config/settings-local.json” --mobile-server “localIp
:3000”
as soon as i run with ‘meteor run android-device’ the manifest file is served. But sometimes i want to just start the app via android studio to test some stuff. This was different some time ago and it think it makes sense to include server the manifest whenever there is a mobile-server flag and/or there are ios and android as platforms included.
http://MY.LOCAL.IP:3000/__cordova/manifest.json
Is there a special flag we could use to fix this while developing right now?
@nerdmed: This was actually a deliberate change made as a result of this issue, because people wanted the ability to run the app in the browser without building the Cordova bundle. A few people have noted they preferred the previous behavior, so maybe we need to somehow make this configurable.