Thanks to visit codestin.com
Credit goes to github.com

Skip to content

_onNavigatingTo TypeError: Cannot read property 'resolvedPage' of undefined #9204

Open
@hiperbou

Description

@hiperbou

Environment
tns-core-modules has 6.5.25
tns-android has 6.5.3

Describe the bug
Runtime exception due to unchecked null.
Somehow the variable "backstackEntry" is null at this point:

this._onNavigatingTo(backstackEntry, true);

Most likely because backstack[backstack.length - 1] returns undefined here because the length is 0:

backstackEntry = backstack[backstack.length - 1];

To Reproduce
Unknown, it's happening to users in production. Maybe trying to go back repeatedly?

Additional context

com.tns.NativeScriptException: Calling js method run failed
TypeError: Cannot read property 'resolvedPage' of undefined
t._onNavigatingTo(:37:1212954)
t.performGoBack(:37:1212451)
t._processNextNavigationEntry(:37:1212100)
t._processNextNavigationEntry(:37:107712)
t._processNavigationQueue(:37:1211284)
t.setCurrent(:37:109498)
(:37:2105307)
(:37:1207022)
run(:37:1207081)
com.tns.Runtime.callJSMethodNative(Native Method)
com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
com.tns.Runtime.callJSMethodImpl(Runtime.java:1173)
com.tns.Runtime.callJSMethod(Runtime.java:1160)
com.tns.Runtime.callJSMethod(Runtime.java:1138)
com.tns.Runtime.callJSMethod(Runtime.java:1134)
com.tns.gen.java.lang.Runnable.run(Runnable.java:17)
android.os.Handler.handleCallback(Handler.java:789)
android.os.Handler.dispatchMessage(Handler.java:98)
android.os.Looper.loop(Looper.java:164)
android.app.ActivityThread.main(ActivityThread.java:6944)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions