NativeScript / nativescript-app-sync

♻️ Update your app without going through the app store!
MIT License
125 stars 24 forks source link

Fixes crash on restart (Android) #77

Closed mayerlench closed 1 year ago

mayerlench commented 2 years ago

When the option to restart the app on install is clicked the app closes and does not restart.

Then when you manually launch the app you get the below error

An uncaught Exception occurred on "main" thread. Unable to start activity ComponentInfo{org.finitydevs.link/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed TypeError: Cannot read property 'nativeView' of undefined

Appsync was using a timer-based method to launch the app and quit the current one When I switched to using an android Intent makeRestartActivityTask all the problems were resolved and the app restarts with its new assets beautifully

This only applies to Android

cla-bot[bot] commented 2 years ago

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign the CLA at https://www.nativescript.org/cla. CLA has not been signed by users: @mayerlench. After signing the CLA, you can ask me to recheck this PR by posting @cla-bot check as a comment to the PR.

mayerlench commented 2 years ago

@cla-bot check

cla-bot[bot] commented 2 years ago

The cla-bot has been summoned, and re-checked this pull request!