Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

ionic 3 [CodePush] An error has occured while installing the package. Could not get the package start page #459

Closed
ismailcse11 opened this issue Oct 29, 2018 · 9 comments
Assignees
Labels

Comments

@ismailcse11
Copy link

ismailcse11 commented Oct 29, 2018

Description

[app-scripts] [02:47:59] console.log: [CodePush] Checking for update.
[app-scripts] [02:47:59] console.log: [CodePush] Checking for update.
[app-scripts] [02:48:01] console.log: [CodePush] An update is available.
[app-scripts] {"appVersion":"0.0.1","deploymentKey":"xxxxx","description":"v${BUILD_ID}","downloadUrl":"https://codepushupdates.azureedge.net/storagev2/ylwYmNB2x6IGYhOOc0hsQBf0vOd43485857a-6fe9-4501-b521-228920abce45","isMandatory":false,"label":"v36","packageHash":"e417a57a5a99ebc7a26e90b27d76e8daaf81f80ef9301055caf044e8d92bc10b","packageSize":3281158,"failedInstall":false}
[app-scripts] [02:48:01] console.log: [CodePush] Awaiting user action.
[app-scripts] [02:48:01] console.log: CODE PUSH UPDATE: 6
[app-scripts] [02:48:01] console.log: [CodePush] An update is available.
[app-scripts] {"appVersion":"0.0.1","deploymentKey":"xxxxx","description":"v${BUILD_ID}","downloadUrl":"https://codepushupdates.azureedge.net/storagev2/ylwYmNB2x6IGYhOOc0hsQBf0vOd43485857a-6fe9-4501-b521-228920abce45","isMandatory":false,"label":"v36","packageHash":"e417a57a5a99ebc7a26e90b27d76e8daaf81f80ef9301055caf044e8d92bc10b","packageSize":3281158,"failedInstall":false}
[app-scripts] [02:48:01] console.log: Update Package Info [object Object]
[app-scripts] [02:48:07] console.log: CODE PUSH UPDATE: 7
[app-scripts] [02:48:19] console.log: [CodePush] Downloading update
[app-scripts] [02:48:26] console.log: [CodePush] Package download success:
[app-scripts] {"deploymentKey":"xxxxx","description":"v${BUILD_ID}","label":"v36","appVersion":"0.0.1","isMandatory":false,"packageHash":"e417a57a5a99ebc7a26e90b27d76e8daaf81f80ef9301055caf044e8d92bc10b","isFirstRun":false,"failedInstall":false,"localPath":"cdvfile://localhost/files/codepush/download/update.zip"}
[app-scripts] [02:48:26] console.log: CODE PUSH UPDATE: 8
[app-scripts] [02:48:29] console.log: [CodePush] Installing update
[app-scripts] [02:48:31] console.log: [CodePush] Applying full update
[app-scripts] [02:48:33] console.error: [CodePush] Preinstall failure. Could not get the package start page
[app-scripts] [02:48:33] console.error: [CodePush] An error has occured while installing the package. Could not get the package start

[app-scripts] page. StackTrace: Error: An error has occured while installing the package. Could not get the package start
[app-scripts] page at preInstallFailure
[app-scripts] (http://192.168.0.103:8100/plugins/cordova-plugin-code-push/bin/www/localPackage.js:246:41) at
[app-scripts] Object.callbackFromNative (http://192.168.0.103:8100/cordova.js:293:52) at processMessage
[app-scripts] (http://192.168.0.103:8100/cordova.js:1115:17) at processMessages
[app-scripts] (http://192.168.0.103:8100/cordova.js:1138:9) at t.invoke
[app-scripts] (http://192.168.0.103:8100/build/polyfills.js:3:14976) at r.run
[app-scripts] (http://192.168.0.103:8100/build/polyfills.js:3:10143) at
[app-scripts] http://192.168.0.103:8100/build/polyfills.js:3:20242 at t.invokeTask
[app-scripts] (http://192.168.0.103:8100/build/polyfills.js:3:15660) at r.runTask
[app-scripts] (http://192.168.0.103:8100/build/polyfills.js:3:10834) at o
[app-scripts] (http://192.168.0.103:8100/build/polyfills.js:3:7894)
[app-scripts] [02:48:33] console.error: [CodePush] An error occurred during sync. An error has occured while installing the package.
[app-scripts] Could not get the package start page. StackTrace: Error: An error has occured while installing the package.
[app-scripts] Could not get the package start page at preInstallFailure
[app-scripts] (http://192.168.0.103:8100/plugins/cordova-plugin-code-push/bin/www/localPackage.js:246:41) at
[app-scripts] Object.callbackFromNative (http://192.168.0.103:8100/cordova.js:293:52) at processMessage
[app-scripts] (http://192.168.0.103:8100/cordova.js:1115:17) at processMessages
[app-scripts] (http://192.168.0.103:8100/cordova.js:1138:9) at t.invoke
[app-scripts] (http://192.168.0.103:8100/build/polyfills.js:3:14976) at r.run
[app-scripts] (http://192.168.0.103:8100/build/polyfills.js:3:10143) at
[app-scripts] http://192.168.0.103:8100/build/polyfills.js:3:20242 at t.invokeTask
[app-scripts] (http://192.168.0.103:8100/build/polyfills.js:3:15660) at r.runTask
[app-scripts] (http://192.168.0.103:8100/build/polyfills.js:3:10834) at o
[app-scripts] (http://192.168.0.103:8100/build/polyfills.js:3:7894)
[app-scripts] [02:48:33] console.log: CODE PUSH ERROR: Error: An error has occured while installing the package. Could not get the
[app-scripts] package start page

The problem is that after the app is updated i close the app, and it rollback to the previews version

Additional Information

  • cordova-plugin-code-push version:
    cordova-plugin-code-push 1.11.13 "CodePush"
  • List of installed plugins:
    code-push 2.0.6 "CodePushAcquisition"
    cordova-plugin-app-version 0.1.9 "AppVersion"
    cordova-plugin-appcenter-analytics 0.2.0 "App Center Analytics for Cordova"
    cordova-plugin-appcenter-crashes 0.2.0 "App Center Crashes for Cordova"
    cordova-plugin-appcenter-shared 0.2.0 "App Center shared code for Cordova"
    cordova-plugin-code-push 1.11.13 "CodePush"
    cordova-plugin-compat 1.2.0 "Compat"
    cordova-plugin-device 2.0.2 "Device"
    cordova-plugin-dialogs 2.0.1 "Notification"
    cordova-plugin-file 4.3.3 "File"
    cordova-plugin-file-transfer 1.6.3 "File Transfer"
    cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
    cordova-plugin-ionic-webview 2.2.0 "cordova-plugin-ionic-webview"
    cordova-plugin-splashscreen 5.0.2 "Splashscreen"
    cordova-plugin-statusbar 2.4.2 "StatusBar"
    cordova-plugin-whitelist 1.3.3 "Whitelist"
    cordova-plugin-zip 3.1.0 "cordova-plugin-zip"
  • Cordova version:
    d:\ionic\school1>ionic info
    √ Gathering environment info - done!

Ionic:

ionic (Ionic CLI) : 4.2.1 (C:\Users\ismail\AppData\Roaming\nvm\v8.9.4\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0

Cordova:

cordova (Cordova CLI) : 8.1.2 ([email protected])
Cordova Platforms : android 7.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0, (and 14 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\ismail\AppData\Local\Android\Sdk)
NodeJS : v8.9.4 (C:\Program Files\nodejs\node.exe)
npm : 5.6.0
OS : Windows 10

<preference name="CodePushDeploymentKey" value="5fUEhS8tfRPMLNgihTvwoORiXELS3485857a-6fe9-4501-b521-228920abce45" />
<preference name="APP_SECRET" value="74577961-e16a-402b-9dc6-23b1f0a1a326" />

I also deploy using appcenter
appcenter codepush release-cordova -a woner_name/school1-android -d Production --description "description here"

@alexandergoncharov-zz
Copy link
Contributor

Hi @ismailcse11 ,
Thanks for reporting!

Yeah, it is known issue. For now cordova-plugin-ionic-webview with 2.* version blocks codepush unfortunately.
For hot fix you can just downgrade this plugin version. Please check this comment: #451 (comment)

Please let me know if it was helpful or you have any questions.

Thanks,
Alexander

@ismailcse11
Copy link
Author

Thanks @alexandergoncharov . I spent 4 days for this. at last it([email protected]) solves this problem.

@alexandergoncharov-zz
Copy link
Contributor

Great! Thanks for keeping us in touch.
And sorry for this issue. We are working on it.

@kodeine
Copy link

kodeine commented Mar 25, 2019

Is there a fix for this now?
cordova-plugin-ionic-webview is now on 4.0.0 it doesnt makes sense to move back to 1.2.1

@ftognetto
Copy link

Hello, I'm exactly in the same trouble, tried to install [email protected] but no luck.
I also tried to install version 1.1.12 / 1.1.16 / 2.4.1 / 3 of the same plugin but the error is the same for all of these.

this is the script I use to send updates
appcenter codepush release-cordova -a me/AppName-iOS -d Production
or
appcenter codepush release-cordova -a me/AppName-Android -d Production

and this is the error I'm getting.
[app-scripts] [14:04:08] console.log: [CodePush] Checking for update.
[app-scripts] [14:04:09] console.log: registerId end - user id : 1 - onesignal id : bf1f0f7a-19fd-426d-9049-8e2007ec1e3c
[app-scripts] [14:04:14] console.log: [CodePush] Reported status:
[app-scripts] {"status":0,"appVersion":"2.0.23","deploymentKey":"XXXX"}
[app-scripts] [14:04:16] console.log: [CodePush] An update is available.
[app-scripts] {"appVersion":"2.0.23","deploymentKey":"XXXXX","downloadUrl":"https://codepushupdates.azureedge.net/storagev2/y3-5r2_KinvpU51NBFV4sM75w1d6cb780a48-75f9-45f3-866c-ab4ece1c9e40","isMandatory":false,"label":"v2","packageHash":"4384382d0b96820ecd06766afa36ecaa5bd660d828ee16078171073e9d677409","packageSize":16276063,"failedInstall":false}
[app-scripts] [14:04:16] console.log: [CodePush] Downloading update
[app-scripts] [14:05:34] console.log: [CodePush] Package download success:
[app-scripts] {"deploymentKey":"VScIBCJpjwU0noxrd60UWrwaBDQ5rJbD7nWMKV","label":"v2","appVersion":"2.0.23","isMandatory":false,"packageHash":"4384382d0b96820ecd06766afa36ecaa5bd660d828ee16078171073e9d677409","isFirstRun":false,"failedInstall":false,"localPath":"cdvfile://localhost/files/codepush/download/update.zip"}
[app-scripts] [14:05:34] console.log: [CodePush] Installing update
[app-scripts] [14:05:38] console.log: [CodePush] Applying full update
[app-scripts] [14:05:38] console.error: [CodePush] Preinstall failure. Could not get the package start page
[app-scripts] [14:05:38] console.error: [CodePush] An error has occured while installing the package. Could not get the package start
[app-scripts] page. StackTrace: Error: An error has occured while installing the package. Could not get the package start
[app-scripts] page at preInstallFailure
[app-scripts] (http://192.168.1.64:8100/plugins/cordova-plugin-code-push/bin/www/localPackage.js:246:41) at
[app-scripts] Object.callbackFromNative (http://192.168.1.64:8100/cordova.js:293:52) at processMessage
[app-scripts] (http://192.168.1.64:8100/cordova.js:1114:17) at processMessages
[app-scripts] (http://192.168.1.64:8100/cordova.js:1137:9) at t.invoke
[app-scripts] (http://192.168.1.64:8100/build/polyfills.js:3:14976) at r.run
[app-scripts] (http://192.168.1.64:8100/build/polyfills.js:3:10143) at http://192.168.1.64:8100/build/polyfills.js:3:20242
[app-scripts] at t.invokeTask (http://192.168.1.64:8100/build/polyfills.js:3:15660) at r.runTask
[app-scripts] (http://192.168.1.64:8100/build/polyfills.js:3:10834) at o
[app-scripts] (http://192.168.1.64:8100/build/polyfills.js:3:7894)

This happen both in iOS and Android, both emulator and device.

Last those are my dependencies:

"dependencies": {
"@angular/common": "^5.0.3",
"@angular/compiler": "^5.0.3",
"@angular/compiler-cli": "5.0.3",
"@angular/core": "5.0.3",
"@angular/forms": "5.0.3",
"@angular/http": "5.0.3",
"@angular/platform-browser": "5.0.3",
"@angular/platform-browser-dynamic": "5.0.3",
"@ionic-native/app-version": "^4.17.0",
"@ionic-native/base64-to-gallery": "^4.5.3",
"@ionic-native/camera": "^4.5.2",
"@ionic-native/clipboard": "^4.16.0",
"@ionic-native/code-push": "^4.20.0",
"@ionic-native/core": "4.4.0",
"@ionic-native/crop": "^4.16.0",
"@ionic-native/device": "^4.7.0",
"@ionic-native/email-composer": "^4.17.0",
"@ionic-native/facebook": "^4.15.0",
"@ionic-native/file": "^4.5.2",
"@ionic-native/file-chooser": "^4.5.2",
"@ionic-native/file-transfer": "^4.5.2",
"@ionic-native/globalization": "^4.12.2",
"@ionic-native/in-app-browser": "^4.16.0",
"@ionic-native/keyboard": "^4.5.2",
"@ionic-native/onesignal": "^4.5.3",
"@ionic-native/photo-library": "^4.11.0",
"@ionic-native/screen-orientation": "^4.7.0",
"@ionic-native/social-sharing": "^4.19.0",
"@ionic-native/splash-screen": "4.4.0",
"@ionic-native/status-bar": "4.4.0",
"@ionic/pro": "^1.0.20",
"@ionic/storage": "2.1.3",
"@stomp/ng2-stompjs": "^7.2.0",
"angular2-websocket": "^0.9.6",
"babel-core": "^6.26.3",
"babel-preset-es2015": "^6.24.1",
"babelify": "^8.0.0",
"code-push": "^2.0.6",
"cordova": "8.0.0",
"cordova-android": "7.0.0",
"cordova-base64-to-gallery": "^4.1.3",
"cordova-clipboard": "^1.2.1",
"cordova-ios": "4.5.5",
"cordova-plugin-add-swift-support": "^1.7.2",
"cordova-plugin-app-version": "^0.1.9",
"cordova-plugin-badge": "^0.8.7",
"cordova-plugin-camera": "^4.0.1",
"cordova-plugin-code-push": "^1.11.17",
"cordova-plugin-crop": "git+https://github.com/obeza/cordova-plugin-crop-with-ratio.git",
"cordova-plugin-customurlscheme": "^4.3.0",
"cordova-plugin-device": "^1.1.7",
"cordova-plugin-dialogs": "^2.0.1",
"cordova-plugin-email-composer": "^0.8.15",
"cordova-plugin-facebook4": "^3.1.0",
"cordova-plugin-file": "^5.0.0",
"cordova-plugin-file-transfer": "^1.7.0",
"cordova-plugin-filechooser": "^1.0.1",
"cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^3.0.0",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-photo-library": "^2.1.1",
"cordova-plugin-screen-orientation": "^3.0.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-socialsharing": "^5.4.4",
"cordova-plugin-zip": "^3.1.0",
"cordova-sqlite-storage": "^2.1.4",
"d3": "^5.8.0",
"es6-promise-plugin": "^4.2.2",
"font-awesome": "4.7.0",
"hammerjs": "^2.0.8",
"hermite-resize": "git+https://github.com/viliusle/Hermite-resize.git",
"i": "0.3.6",
"ionic-angular": "3.9.2",
"ionic-select-searchable": "^2.10.0",
"ionic2-super-tabs": "^5.0.2",
"ionicons": "3.0.0",
"ips": "2.1.3",
"ng2-pica": "^1.2.8",
"ng2-translate": "^5.0.0",
"onesignal-cordova-plugin": "^2.2.5",
"patch-package": "^6.0.5",
"pica": "^4.1.1",
"rxjs": "5.5.2",
"sentry-cordova": "^0.13.1",
"sockjs-client": "^1.3.0",
"sw-toolbox": "3.6.0",
"web-animations-js": "^2.3.1",
"zone.js": "0.8.18"
},

I'm new to CodePush but I have implemented it on a react native project and I had no problems, now on Ionic I don't know what else to do. I searched everywhere on google and this is the only place where this problem seem solved.

Thank you

@mohamedsharaf
Copy link

use .sync() without any param fix it

@jackie-d
Copy link

jackie-d commented Mar 12, 2020

Same issue here:

[CodePush] Installing update
codePushUtil.js:36 [CodePush] Applying full update
codePushUtil.js:41 [CodePush] Preinstall failure. Could not get the package start page
codePushUtil.js:41 [CodePush]  An error has occured while installing the package. Could not get the package start page. StackTrace: Error: An error has occured while installing the package. Could not get the package start page
    at preInstallFailure (http://localhost:8100/plugins/cordova-plugin-code-push/bin/www/localPackage.js:249:41)
    at Object.callbackFromNative (http://localhost:8100/cordova.js:289:52)
    at processMessage (http://localhost:8100/cordova.js:1129:17)
    at processMessages (http://localhost:8100/cordova.js:1152:9)
    at ZoneDelegate.invoke (http://localhost:8100/polyfills.js:3709:26)
    at Zone.run (http://localhost:8100/polyfills.js:3474:43)
    at http://localhost:8100/polyfills.js:4205:36
    at ZoneDelegate.invokeTask (http://localhost:8100/polyfills.js:3741:31)
    at Zone.runTask (http://localhost:8100/polyfills.js:3518:47)
    at drainMicroTaskQueue (http://localhost:8100/polyfills.js:3909:35)

My packages:

    "cordova-plugin-code-push": "^1.12.0",
    "@ionic-native/code-push": "^5.22.0",

I also have installed, as other highlight as issue's cause:

"cordova-plugin-ionic-webview": "^4.1.3",

I'm already using sync() without parameter to install the update.

this.codePush.sync().subscribe((syncStatus) => console.log(syncStatus));

@jackie-d
Copy link

Resolved:

The issue happened because I was testing with --livereload option.

Testing must be made without livereload.

i.e.

ionic cordova run android --device

See #517 (comment)

@akshaykatale99
Copy link

akshaykatale99 commented Jun 20, 2021

Not working for me without --livereload also. getting same error.

See #678

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants