Repository navigation
Closed
Description
From @ludcila on August 8, 2018 14:21
Please, provide the details below:
Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?
Yes
Found some similar issues:
- Android listview error: There is no entry with key in the realized views cache ProgressNS/nativescript-ui-feedback#741
- https://stackoverflow.com/questions/50901650/nativescript-list-view-crash-using-android
Tell us about the problem
The app crashes when:
- Using a ListView with multiple templates
- There is a model update that causes an item to switch from one template to another
- The app is put into background and/or navigation occurs (using slide transition)
Please provide the following version numbers that your issue occurs with:
- CLI: 4.1.2
- Cross-platform modules: 4.1.1
- Runtime(s): 4.1.3
This seems to happen only on Android 8.0.
Did the error happen while the app was being constructed? (buildtime error)
No
Did the error happen while the app was executing? (runtime error)
Yes
An uncaught Exception occurred on "main" thread.
com.tns.NativeScriptException:
Calling js method getView failed
Error: There is no entry with key 'org.nativescript.widgets.StackLayout{4b534d0 V.E...... ........ 0,-133-1080,28}' in the realized views cache for template with key'visited'.
File: "file:///data/data/org.nativescript.nsissue741/files/app/tns_modules/tns-core-modules/ui/list-view/list-view.js, line: 241, column: 20
StackTrace:
Frame: function:'ZoneAwareError', file:'file:///data/data/org.nativescript.nsissue741/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 1298, column: 33
Frame: function:'ListViewAdapter.getView', file:'file:///data/data/org.nativescript.nsissue741/files/app/tns_modules/tns-core-modules/ui/list-view/list-view.js', line: 241, column: 27
at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101)
at com.tns.Runtime.callJSMethodImpl(Runtime.java:983)
at com.tns.Runtime.callJSMethod(Runtime.java:970)
at com.tns.Runtime.callJSMethod(Runtime.java:954)
at com.tns.Runtime.callJSMethod(Runtime.java:946)
at com.tns.gen.android.widget.BaseAdapter_view_195_32_ListViewAdapter.getView(BaseAdapter_view_195_32_ListViewAdapter.java:52)
at android.widget.AbsListView.obtainView(AbsListView.java:2428)
at android.widget.ListView.makeAndAddView(ListView.java:2083)
at android.widget.ListView.fillUp(ListView.java:829)
at android.widget.ListView.fillGap(ListView.java:766)
at android.widget.AbsListView.trackMotionScroll(AbsListView.java:5520)
at android.widget.ListView.trackMotionScroll(ListView.java:1991)
at android.widget.AbsListView.scrollIfNeeded(AbsListView.java:3660)
at android.widget.AbsListView.onTouchMove(AbsListView.java:4086)
at android.widget.AbsListView.onTouchEvent(AbsListView.java:3904)
at android.view.View.dispatchTouchEvent(View.java:11788)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2647)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2974)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:549)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1953)
at android.app.Activity.dispatchTouchEvent(Activity.java:3548)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:502)
at android.view.View.dispatchPointerEvent(View.java:12027)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5278)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5067)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4581)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4634)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4600)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4727)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4608)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4784)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4581)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4634)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4600)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4608)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4581)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7169)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7143)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7104)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7325)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:192)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:181)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:7248)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:7353)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:981)
at android.view.Choreographer.doCallbacks(Choreographer.java:790)
at android.view.Choreographer.doFrame(Choreographer.java:715)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
Please tell us how to recreate the issue in as much detail as possible.
Sample project to reproduce the issue:
https://github.com/ludcila/ns-listview-issue
Copied from original issue: NativeScript/android#1145
Metadata
Metadata
Assignees
Labels
No labels
Activity
tsonevn commentedon Aug 9, 2018
Hi @ludcila,
Thank you for the provided sample project.
I tested it on my side and was able to recreate the problem. I will mark this as a bug. For now, I would suggest, to keep track of the issue for further info.
tsonevn commentedon Aug 9, 2018
This issue was moved to NativeScript/nativescript-angular#1479
AdamAtri commentedon Mar 14, 2019
I'm having the same issue, but I'm on nativescript-core (v4.2.1)
tsonevn commentedon Mar 19, 2019
Hi @AdamAtri,
Can you try upgrading your project to the latest NativeScript and check if you will be able to recreate the issue?
lock commentedon Mar 18, 2020
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.