-
Notifications
You must be signed in to change notification settings - Fork 337
iOS codeSync rollback after relaunch app #611
Comments
This also happens on Android, is there any fix for this. Working environment is exactly the same as with @mOOnIrsama |
I'm having this issue on iOS only. I'm using cordova-ios 6.10 (with the code from PR #513 for compatibility). |
I suspect this is related to WKWebView and this code: https://github.com/microsoft/cordova-plugin-code-push/blob/master/src/ios/CodePush.m#L409 @amjadyahya1 what is your stack trace on Android? I'm guessing it's a different issue. |
|
@ermik Thanks for the insight. I took a look at the JS console from Safari, connected to the simulator, and this is what I see. Maybe this will shed some more light on what's actually causing the issue.
Seems like it's still trying to load the new version from the file system url. |
Still happens with v1.13.0, see #624 |
This project and issue are critical to my team, so I'm spending some time debugging even though I'm not very experienced with native iOS development or Objective-C. I'm chronicling my findings here in semi-real time in he hope that someone will have a helpful insight to speed this process along. So here goes:
There's also a file named 'CDVWKWebViewEngine+CodePush.m' and I'm not sure what it does. My guess is that it's supposed to extend the 'CDVWKWebViewEngine' class from the wkwebview-engine plugin that was used before cordova-ios v6. Now that plugin is no longer used - see https://cordova.apache.org/howto/2020/07/18/uiwebview-warning.html:
So it seems like CDVWKWebViewEngine+CodePush.m just isn't loaded becuase of |
@szh This plugin is critical to my project too. I'm using with Create a simple test project just to see if the problem happens. It could be something in your project. |
@ludufre Do you also use cordova-plugin-wkwebview-engine? |
Continuing my debugging... However after closing the app and reopening it doesn't load. I assume it's still trying to load from a file:// url but I'm not sure where that code is. |
@szh No. I use |
@ludufre Right, I'm not (look again at my earlier comment), just checking whether you were. There is code in this plugin to deal with ionic's webview differently which may be why you're not having this issue. |
@szh So everything is now working in your new PR? |
Yes |
Any chance of getting this reviewed/merged in? |
Need this updated version to, thank you, |
Hi all, Unfortunately, I can't reproduce this compatibility issue. Could you please provide some demo app with reproducing issue and reprosteps? |
this is the right solution! thank you |
Hi all, |
not working The following build commands failed: Ionic: Ionic CLI : 6.10.1 (/usr/local/lib/node_modules/@ionic/cli) Cordova: Cordova CLI : 9.0.0 ([email protected]) |
Hi all, If you still have issues could you please provide some demo app with reproducing issue and reprosteps? |
Has anyone found the solution? Still happening in latest version: 2.0.0 |
@adancarrasco , I think you should make some demo repo... |
Has anybody found the solution to this? I'm on the latest version (2.0.0) and I have no clue, where to start debugging.
|
@ankitjainOfficial do you have a demo app? It works fine for me.. |
@sithwarrior Unfortunately, don't have a demo handy. Is there any hint, where I can start my debugging? |
@ankitjainOfficial In my project ...config code push and testing finally, you'll find the bug |
does anyone have a solution? |
@veneliniliev Rolling back to 1.8 solved for me. with v2, no solution worked for me. |
i found a solution in my case. when remove preference, everything works fine! |
in iOS Simulator the app is updated and after its auto restarted, all of the cordova plugins no longer works and whenever I relaunch the apps rollbacked to previous version. Below is the logs and my project details
Project: plain cordova
code-push: 1.12.2
iOS: 13.4.1
WebVIew: WKWebView
Javascript:
Config:
<preference name="WKWebViewOnly" value="true" />
Logs:
The text was updated successfully, but these errors were encountered: