Skip to content
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

A frame must be used to navigate to a Page - Error on app resume #5318

Closed
NickIliev opened this issue Jan 24, 2018 · 1 comment · Fixed by #5330
Closed

A frame must be used to navigate to a Page - Error on app resume #5318

NickIliev opened this issue Jan 24, 2018 · 1 comment · Fixed by #5330

Comments

@NickIliev
Copy link
Contributor

NickIliev commented Jan 24, 2018

Reproducible with tns-core-modules@4.0.0-2018-01-23-03

Steps to reproduce the issue:

  • use this application or create hello world application (the hello world needs to stay longer in the background)
  • bring it to the background (navigate in app and bring to the background- no matter if "Keep Activities" is on or off)
  • start some other heavy application (e.g. large gallery or Facebook app) and let it consume some resources.
  • bring back the NativeScript applicaiton - it will show the splash screen and then throw the error
E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.nativescript.curiosity, PID: 13558
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.curiosity/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: 
Calling js method onCreate failed

Error: A Frame must be used to navigate to a Page.
File: "file:///data/data/org.nativescript.curiosity/files/app/tns_modules/tns-core-modules/ui/frame/frame.js, line: 803, column: 16

StackTrace: 
    Frame: function:'ZoneAwareError', file:'file:///data/data/org.nativescript.curiosity/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 994, column: 33
    Frame: function:'setActivityContent', file:'file:///data/data/org.nativescript.curiosity/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 803, column: 23
    Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.curiosity/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 640, column: 9
    Frame: function:'', file:'file:///data/data/org.nativescript.curiosity/files/app/tns_modules/tns-core-modules/profiling/profiling.js', line: 95, column: 23
    Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.curiosity/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25


    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
    at android.app.ActivityThread.-wrap11(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
    Caused by: com.tns.NativeScriptException: 
Calling js method onCreate failed

Error: A Frame must be used to navigate to a Page.
File: "file:///data/data/org.nativescript.curiosity/files/app/tns_modules/tns-core-modules/ui/frame/frame.js, line: 803, column: 16

StackTrace: 
    Frame: function:'ZoneAwareError', file:'file:///data/data/org.nativescript.curiosity/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 994, column: 33
    Frame: function:'setActivityContent', file:'file:///data/data/org.nativescript.curiosity/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 803, column: 23
    Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.curiosity/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 640, column: 9
    Frame: function:'', file:'file:///data/data/org.nativescript.curiosity/files/app/tns_modules/tns-core-modules/profiling/profiling.js', line: 95, column: 23
    Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.curiosity/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25


    at com.tns.Runtime.callJSMethodNative(Native Method)
    at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1088)
    at com.tns.Runtime.callJSMethodImpl(Runtime.java:970)
    at com.tns.Runtime.callJSMethod(Runtime.java:957)
    at com.tns.Runtime.callJSMethod(Runtime.java:941)
    at com.tns.Runtime.callJSMethod(Runtime.java:933)
    at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:13)
    at android.app.Activity.performCreate(Activity.java:6999)
    at android.app.Activity.performCreate(Activity.java:6990)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
        ... 9 more

Full Verbose logcat error-log-verbose.txt.zip

Screenshot error:
screenshot_20180124-131553

@NickIliev NickIliev changed the title A frame must be used to navigate to a Page = Error on app resume A frame must be used to navigate to a Page - Error on app resume Jan 24, 2018
@NickIliev NickIliev added this to the next milestone Jan 25, 2018
@ghost ghost removed the bug label Jan 25, 2018
@lock
Copy link

lock bot commented Aug 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants