Open kntmrkm opened 5 years ago
Hi @kntmrkm, Thanks for reporting and detailed info!
It is strange. Could you please provide some dummy project with reproducing issue and reprosteps? I would like to debug it.
@alexandergoncharov Thanks for replay.
This is my temporary repo... https://github.com/kntmrkm/ionic-codepush
npm -g i ionic
npm -g i cordova
ionic platform add ios
ionic cordova build ios
platforms/ios/MyApp.xcworkspace
You will get bellow error.
2019-05-27 22:04:09.517283+0900 MyApp[77631:1337346] ERROR: [CodePush] An error occurred during sync. An error has occured while installing the package. Could not find start page in package.. StackTrace: preInstallFailure@ionic://localhost/plugins/cordova-plugin-code-push/bin/www/localPackage.js:246:50
callbackFromNative@ionic://localhost/cordova.js:290:57
ionic://localhost/plugins/cordova-plugin-ionic-webview/src/www/ios/ios-wkwebview-exec.js:129:35
run@ionic://localhost/polyfills.js:2512:49
ionic://localhost/polyfills.js:3251:37
runTask@ionic://localhost/polyfills.js:2557:57
drainMicroTaskQueue@ionic://localhost/polyfills.js:2963:42
promiseReactionJob@[native code]
よろしく!
Thanks for the repo! I reproduced your issue but I'm confused about using parameter as part of the file path in particular 'deviceType'. Could you please clarify why you are using this parameter?
I'm joined one team recently. I don't know why that detail without asking my senior.
There are several reasons I think maybe.
Anyway, param is required our project.
Hi @kntmrkm Sorry for delay!
Here is fix for your issue: https://github.com/microsoft/cordova-plugin-code-push/compare/Goncharov/Fix_start_page_url_query Could you please test it?
However this issue is pretty rare so I'm afraid releasing this fix would be prematurely. But of course If community will need this it would be released =)
FYI: сordova plugin could be installed from github repo, for this case you could use this command:
cordova plugin add https://github.com/microsoft/cordova-plugin-code-push#Goncharov/Fix_start_page_url_query
Sorry for the inconvenience.
Thanks I'll try later!
Great! We will be waiting for your results.
[CodePush] Package download success:
It works!
This fix will not release? Please release to avoid happens same issue to someone. and for us.
Please consider it. thanks again.
Won't merge? We are expecting merge....
I am also expecting this to be merged. Is there some reason it can't be?
The issue appears to occur in iOS projects using WKWebView (which is now mandatory, according to Apple). So any Cordova iOS developer will NOT BE ABLE TO USE THIS PLUGIN.
Quite a serious issue for any iOS Cordova developer, and I am not aware of any other reliable code push alternative.
@alexandergoncharov this is also a pretty big issue on our end. We use https://www.npmjs.com/package/cocoon-cordova-labs-local-webserver which requires http://localhost as the content src
and breaks codepush sync.
Additional Information
Description
I'm using CodePush plugin with ionic framework (cordova 7.0.1).
My cordova's
config.xml
has a below URL. It's withparameterString
.index.html?deviceType=ios
So,
getStartPageURLForLocalPackage
(https://github.com/microsoft/cordova-plugin-code-push/blob/af67ac16f15cfacd1bd216480e56f221d1396d9c/src/ios/CodePush.m#L268) will return0
always.Debug info
realStartPageLocation
value is/Users/kntmrkm/Library/Developer/CoreSimulator/Devices/3A19F158-A4F6-4DBA-A45C-417D30E8A35A/data/Containers/Data/Application/B280835C-2ED9-4D31-9C63-B0BF4B67F64E/Library/NoCloud/codepush/deploy/versions/5355be3536f8cc924d3d891095b4848a7c5f9fe7e891e868b0f60eb7f056256a/www/index.html?deviceType=ios
When replaced
?deviceType=ios
to""
.getStartPageURLForLocalPackage
will return 1 (expected).thanks