-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow developers to override cordovaCompatibilityVersions #7030
Comments
+1 I don't see the need for cordovaCompatibilityVersions check. I'am having trouble when I pubish ios and android not in the same time. |
did a little exploring, would this modification in isobuild/bundler.js / line 1369 be a potential way to override?
|
+1 went through hell to find out why HCP was not working for me... Could not find why hashes differed in prod though. |
+1 this will be a major problem for us once we switch to 1.3. It's not really practical to block HCP if cordova plugins have different versions because it's a major barrier to high release velocity. We're used to handling different versions within the app client/server code and we routinely have 1-2 older versions of clients as well as differing versions of iOS vs Android live in the App/Play stores. By letting us continue to handle these differences within code, as was the case with 1.2, we're able to continue to release the app to our app servers and via HCP much more rapidly (multiple times per day currently). There's no actual reason to prevent HCP if we're able to handle such differences within code. Without HCP, we're blocked for days waiting for Apple to approve a release, which significantly lowers our release velocity. |
@mikepaszkiewicz: Yes, I think that is where you'd want to override the versions. But since versions differ between platforms, and you'll need to specify the current version to enable hot code pushes, you'd need to find a way to pass versions for both platforms. |
@martijnwalraven Do you have any UX plan for this issue ? For example :
Is someone working on a PR ? How can we help ? Meteor is great. This issue is a nightmare for us. |
@crazybaud: No, I'm not working on this and I'm not aware of anyone who is. So if you have good ideas on how to improve the compatibility check functionality, feel free to open a PR! |
@crazybaud You can use the WebAppLocalServer.onError function to listen for the "Cordova platform or versions changed" error and handle it appropriately. In my app I'm redirecting the user to a "Version not supported, please update your app" view. |
Are there any updates on this? We didn't complete our then-1.3 upgrade in the summer because of the WKWebView WSOD issues and are about to go to 1.4 but I see this is still an issue on 1.4. |
The best way to handle this would be trying to install the new version and monitor for any errors. If those appear, do rollback. Standard production deploy workflow, isn't it?.. |
@avesus I'm not sure you understand the problem. If you install meteor, and add a Cordova plugin, simply updating the Cordova plugin package a minor bump blocks hot code reload. |
@denisbabineau this is now available in 1.4.4.2 with |
Closing as #8581 was merged. Thanks all! |
Can we get documentation added someplace on how to use this? That is absolutely great this is in core now, but I have no idea how to use it ;) |
@abernix would you like a note in the docs somewhere about it? @markoshust it is just simply using env vars. So to override the version you just use:
Or to build version with and without crosswalk and still receive HCP on both you can just use:
|
@wojtkowiak thank you, the EXCLUDE envvar is pretty self-explanatory and what I need. any reason to also not add in something like this? I handle cordova compatibility in code and never want HCR blocked.
Regarding the iOS and Android envvars, I'm not sure I understand how those two work. I know I can set it to some value, but what does that value do? What happens when I change it? This and AUTOUPDATE_VERSION should really be in he meteor guide. I finally understand autoupdate version but it wasn't too apparent at first. Thank you, this functionality is very much needed! Very happy 😀 |
The compatibility version is the only factor taken into account when the app decides whether it want to receive the hcp update. |
You will intentionally block HCP as your mobile apps will have different compatibility version. |
@wojtkowiak ok great, thanks much for the explanation! absolutely needs to be added to the meteor guide as this is a pretty big issue :) I'll try to make a PR for that. cheers |
Hi @markoshust and @wojtkowiak , did this get added to the Meteor Guide? Thanks!!! |
Can you pass the env var to meteor deploy as well? |
So I tried this by setting this in my startup server code, and deploying did not override what's in my manifest.json. Any ideas? |
You mean in code like setting it through It needs to be present while the project is building so you need to have it before your code is executed. |
So where I'm getting mixed up is there's no mention of deploy? Should I set these same environment variables before |
Hmm I've never used |
@mikepaszkiewicz Just curious if you got this working by setting the environment variable |
@skirunman Duh...should have thought of that one. Going to give this a try later today and will report back. |
The build for Galaxy is not done on the server, but rather on the client in the same way that Therefore, I'd expect that |
This is still been poorly explained on how to implement, I added it to the deploy string no problem, but the Build script it just kicks back an error. Where do I put it for Building the app. EDIT: Must of been some other kind of error, seems to of built this time. |
I'm trying to make it work for Galaxy. No success so far... Nothing seems to work. I've tried adding the variables to settings.json:
And I've also tried to set these variables when calling the command to deploy to Galaxy:
None of this worked. I'm still seeing wrong hash codes in Any ideas on how to do it the right way? |
@skirunman and @mikepaszkiewicz did you make it work in Galaxy? |
I have not tried this, but it sounds like what @abernix was saying is just to deploy as per your last example |
@alextondello What version of Meteor are you trying? |
I'm having a LOT of difficulties with this. None of my iOS, Android or PC apps are updating. I have my Mac building iOS and Android, I've sent the environment variables there. I have my PC building the web server, which also has the environment variables. I have my web server, that also has the environment variables there. Still with all this, it doesn't work. Running Meteor 1.5.1? This is a total nightmare. www.StarCommanderOnline.com - how do I check what settings I'm supposed to block in the first place? This is very poorly documented, and a very high impact feature. |
@AndyNormore I agree that the documentation is bad. However, this is definitely working for me. Here's how I set it up. In my build script (ex.
By setting version 2.9 for both ios and android packages, I'm telling Meteor that version 2.9 is hot-code-push compatible with this build. So if I do change a cordova plugin, the current version on the user's mobile device is 2.9, I push out another version that is 2.9, so the client's code accepts this version as the same hash and executes the hot code push. If I were to change this to 3.0 and create another build, the client's version 2.9 doesn't match the new version of 3.0, so the hot code push will be prevented from executing. Note that the only place you need these environment variables set is when creating the build with |
I got it working. I'm not sure exactly which settings worked, but I do know this... ITS IMPORTANT TO RUN THE SERVER, IOS and ANDROID APP FROM THE SAME BUILD DEVICE I have a Mac that builds iOS and Android. My windows machine was building the Web app for the .com Even with all these settings, the code EXACTLY the same, just built on different machines - changes the outcome of settings. I discovered this when my windows machine crashed, so I built on the Mac and bam, it started working. |
It's been 5 days since I got it working. I was in heaven. It was great. But, now my iOS app will not update. Android is working perfectly fine. I haven't changed any plugins, I've been very careful not to change anything. Sigh... There needs to be a much more simple method for this.. |
If I'm going to debug this, how do something like this in my app? version_helper(){ return cordova.app_ios; } So I can put this in the template and visually identify what the iOS / Android apps have been set to? |
I'm having issues that some clients aren't being updated, but this happens when using meteor-desktop, is there any way to overcome HCP not getting to those older versions? seems some of our clients are updating correctly, but some are having problems and are stuck on older versions. so anyway just to force the updates? |
Hi @mexin this new guide about HCP could help you https://guide.meteor.com/hot-code-push.html If you are still having issues please open a new issue. |
_4 Upvotes_ Current compatibility check for Hot Code Push to mobile blocks any updates if any of the cordova components' versions were bumped.
We need a way to override this default. See discussions at:
https://forums.meteor.com/t/cordova-app-android-not-reloading-after-hot-code-push-with-deployed-app/16336/38
suggested solution by @martijnwalraven
The text was updated successfully, but these errors were encountered: