Skip to content

Fixes crash on restart (Android) #77

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

Merged
merged 1 commit into from
Dec 7, 2022

Conversation

mayerlench
Copy link
Contributor

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
Copy link

cla-bot bot commented Feb 22, 2022

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
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla: yes label Feb 22, 2022
@cla-bot
Copy link

cla-bot bot commented Feb 22, 2022

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

@rigor789 rigor789 merged commit b3ff38b into NativeScript:master Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants