NativeScript / ui-kit

Various UI plugins including SwiftUI, Jetpack Compose, Flutter, Ionic Portals, HighCharts and more.
Apache License 2.0
11 stars 4 forks source link

[NativeScript/nativescript-ui-charts] [Android] [NS 8.5.3] Error when closing modal with chart #4

Open vicmasa opened 1 year ago

vicmasa commented 1 year ago

Hello everyone.

  1. When placing a chart in a modal, and selecting on the Android "back" button, the following error occurs:

  2. we also place in the modal, a close event, which should not affect the button, we place it as stoppropagation, and the modal closes anyway.

I attach here the public project, where I isolated the code. Attached here a sample video.

OS: macOS 13.3.1
CPU: (8) arm64 Apple M1 Pro
Shell: /bin/zsh
node: 19.8.1
npm: 9.5.1
nativescript: 8.5.3

# android
java: 11.0.17
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found

# ios
xcode: 14.3/14E222b
cocoapods: 1.12.1
python: 2.7.18
python3: 3.9.6
ruby: 2.7.8
platforms: 
  - DriverKit 22.4
  - iOS 16.4
  - macOS 13.3
  - tvOS 16.4
  - watchOS 9.4

Dependencies

"dependencies": {
  "@nativescript/core": "~8.5.0",
  "@nativescript/theme": "~3.0.2",
  "@nativescript/ui-charts": "^0.4.0"
},
"devDependencies": {
  "@nativescript/android": "8.5.0",
  "@nativescript/ios": "8.5.1",
  "@nativescript/webpack": "~5.0.14"
}

ERROR: An uncaught Exception occurred on "main" thread. Calling js method onDismiss failed TypeError: Cannot read properties of null (reading 'removeOnLayoutChangeListener')

StackTrace: onUnloaded(file:///data/data/org.nativescript.ns853/files/app/vendor.js:44493:25) at (file:///data/data/org.nativescript.ns853/files/app/vendor.js:18313:76) at callFunctionWithSuper(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18304:9) at callUnloaded(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18313:14) at unloadView(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18490:18) at (file:///data/data/org.nativescript.ns853/files/app/vendor.js:18238:18) at eachChildView(file:///data/data/org.nativescript.ns853/files/app/vendor.js:29688:28) at eachChild(file:///data/data/org.nativescript.ns853/files/app/vendor.js:21142:14) at onUnloaded(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18237:14) at onUnloaded(file:///data/data/org.nativescript.ns853/files/app/vendor.js:19397:15) at (file:///data/data/org.nativescript.ns853/files/app/vendor.js:18313:76) at callFunctionWithSuper(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18304:9) at callUnloaded(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18313:14) at unloadView(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18490:18) at (file:///data/data/org.nativescript.ns853/files/app/vendor.js:18238:18) at eachChildView(file:///data/data/org.nativescript.ns853/files/app/vendor.js:29688:28) at eachChild(file:///data/data/org.nativescript.ns853/files/app/vendor.js:21142:14) at onUnloaded(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18237:14) at onUnloaded(file:///data/data/org.nativescript.ns853/files/app/vendor.js:19397:15) at (file:///data/data/org.nativescript.ns853/files/app/vendor.js:18313:76) at callFunctionWithSuper(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18304:9) at callUnloaded(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18313:14) at unloadView(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18490:18) at (file:///data/data/org.nativescript.ns853/files/app/vendor.js:18238:18) at eachChildView(file:///data/data/org.nativescript.ns853/files/app/vendor.js:15668:13) at eachChildView(file:///data/data/org.nativescript.ns853/files/app/vendor.js:31713:15) at eachChild(file:///data/data/org.nativescript.ns853/files/app/vendor.js:21142:14) at onUnloaded(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18237:14) at onUnloaded(file:///data/data/org.nativescript.ns853/files/app/vendor.js:19397:15) at (file:///data/data/org.nativescript.ns853/files/app/vendor.js:18313:76) at callFunctionWithSuper(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18304:9) at callUnloaded(file:///data/data/org.nativescript.ns853/files/app/vendor.js:18313:14) at DialogFragmentImpl.onDismiss(file:///data/data/org.nativescript.ns853/files/app/vendor.js:19283:19) at com.tns.Runtime.callJSMethodNative(Native Method) at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1302) at com.tns.Runtime.callJSMethodImpl(Runtime.java:1188) at com.tns.Runtime.callJSMethod(Runtime.java:1175) at com.tns.Runtime.callJSMethod(Runtime.java:1153) at com.tns.Runtime.callJSMethod(Runtime.java:1149) at com.tns.gen.androidx.fragment.app.DialogFragment_vendor_19197_28_DialogFragmentImpl.onDismiss(DialogFragment_vendor_19197_28_DialogFragmentImpl.java:30) at androidx.fragment.app.DialogFragment$3.onDismiss(DialogFragment.java:133) at android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1470) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7898) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

NathanWalker commented 1 year ago

Thanks @vicmasa will look at this one with the other updates as well.

InvianInternational commented 1 year ago

Hi @NathanWalker, does anyone have any updates?