android: com.tns.NativeScriptException - MetaData cannot be opened.

Been seeing this crash report at an alarming rate lately image image image

java.lang.RuntimeException: 
  at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6214)
  at android.app.ActivityThread.access$1200 (ActivityThread.java:236)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1784)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:214)
  at android.app.ActivityThread.main (ActivityThread.java:7037)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)
Caused by: com.tns.NativeScriptException: 
  at com.tns.Runtime.initNativeScript (Native Method)
  at com.tns.Runtime.init (Runtime.java:627)
  at com.tns.Runtime.init (Runtime.java:601)
  at com.tns.Runtime.initRuntime (Runtime.java:591)
  at com.tns.Runtime.initializeRuntimeWithConfiguration (Runtime.java:566)
  at com.tns.RuntimeHelper.initRuntime (RuntimeHelper.java:163)
  at com.tns.NativeScriptApplication.onCreate (NativeScriptApplication.java:20)
  at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1154)
  at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6209)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 80 (43 by maintainers)

Most upvoted comments

Ok, after much testing and trying many different things this week and a LOT of googling; I finally figured out solidly what exactly is happening and a PR has been created! Yay!

In a nutshell; the answer is for the app to exit with no error code in this specific corner case event (basically what it used to do before NS 6.2 added NEEDED error tracking to this section of the code).

For those interested in the details:

  • The Local Notification plugin has a bootup receiver notification, but not just ANY phone bootup receiver notification, but the newer Android 7 bootup receiver notification even if phone is still locked ultra secure version DIRECT_BOOT . (https://developer.android.com/training/articles/direct-boot) this allows a app to startup while the phone has started up and has never been unlocked and only a few types of apps are supposed to use it…

Sounds cool huh? 😀 In DIRECT_BOOT the normal storage is supposed to remain locked and unavailable; so then the application cannot get access to any files. They even have a special api that a DIRECT_BOOT receiver can use for secure storage. Apparently, in Android 9 most vendors finally enforced that the application actually cannot get access to any files and can ONLY use the access to the special API for storage.

  • When this receiver is triggered the receiver code loads and does what it is supposed to; however it is also triggering the native side of the NativeScript app to also boot. So when that part attempts to boot, it fails. It has no access to its files and the metadata is the first set of files it attempts to load. However, in all reality this part of the code does NOT need to actually run when the receiver is triggered at bootup. Unfortunately, The OS doesn’t know any better, so it just triggers it (or at least that appears to be what is triggering it) when it fired the receiver.

So the end results after much testing is:

Device Unlocked at startup: Receiver -> NativeScript -> Load MetaData -> Exit Normally

Device Locked at startup: Receiver -> NativeScript -> Load MetaData -> Error 2 -> Exit normally in this special corner case.

Both cases basically act the same now, and the user should not see any negative behavior nor should you see the google ding your app for crashes…

@NathanaelA We released our app with the android runtime v6.5.3 a few days ago. No more alarming crash rates.

Thanks again for all your time on this.

Just updated to 6.5.2, sadly tns run android fails with:

Error executing Metadata Generator: java.nio.IntBuffer.clear()Ljava/nio/IntBuffer;
Detailed log here: ../testcrash/platforms/android/build-tools/buildMetadata.log

Unable to apply changes on device: 9A231FFAZ00184. Error is: Command ./gradlew failed with exit code 1.

…/testcrash/platforms/android/build-tools/buildMetadata.log:

java.lang.NoSuchMethodError: java.nio.IntBuffer.clear()Ljava/nio/IntBuffer;
	at com.telerik.metadata.Writer.writeTree(Writer.java:349)
	at com.telerik.metadata.Generator.main(Generator.java:60)

Steps to reproduce:

tns create testcrash --js
cd testcrash
tns platform add android // now 6.5.0 is added
tns platform remove android
tns platform add android // latest version 6.5.2 is added
tns run android

Is there anything else that needs to be updated?

tns info   
✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 6.7.4 and the latest available version is 6.7.8.
✔ Component tns-core-modules has 6.5.8 version and is up to date.
✔ Component tns-android has 6.5.2 version and is up to date.

@jessorlisa - Yes, actually I plan on trying to release a 6.5.2 version this weekend that contains just this patch, then at the same time a new 6.6.0 version that contains the new v8 engine upgrade and it will also include this patch.

WooHoo - Lock screen seems to matter for my testing. Activated it and locked the device; rebooted. And the error showed up. Same thing, logged in, locked the screen, restarted error showed up again. YAY!!!

@7ammer - James, the Pixel phone is supposed to arrive tomorrow afternoon at the local fedex facility; I should be able to pick it up Thursday; and actually see if I can duplicate it Thursday night. 😃

NativeScriptException is a generell exception for everything but different issues, we should split up the Thread into different issues, otherwise we loose overview and never solve anything.

The Stack + Exception Message really matters currently, since nativescript doesnt implement sub exceptions what i already said here.

Why is google not reporting the full message? If this is known, nativescript should maybe implement subclasses of the NativeScriptException, to identify further whats the cause of issues like this…

@saschaarthur - This is a custom runtime that Shiva (@shiv19) who opened this thread is currently running and he mentioned to me he is no longer seeing this issue, which originally I thought was AWESOME, what was changed so we can get a PR to get it fixed for everyone! 😀 So, I finally had a chance to go through the changes, and it was my whole point I was pointing out, is that the issue is still happening to his customers, it is just is masked.

Please note; Richard, has done other really good work; and some of his changes are actually in the runtimes and have stabilized other issues. But this was a whole new set of patches as he was trying to eliminate some “misc” type random errors… He went a little bit too far in this case, and as such I’m sure his google dashboard looked awesome for the number of errors he was seeing, but his customers would be actually seeing it quit out w/o any logging for a whole range of issues…

That is the reason why I haven’t PRed those changes to the runtime. I’m aware that it is just masking it. It was put in there just as a workaround while I wait for the actual fix.

It seems I got the exact same issue on my newest build, which is odd, is that I previously made a perfectly working release with 6.2.0, a week ago… Today I tried with 6.2.0 and 6.5.0 android runtime, and I’m getting the issue on all the phones I can test on.

If I do not build the release with --env.snapshotInDocker and --env.snapshot, it’s working perfectly fine (except longer startup time).

Here is the crash log :

05-05 20:04:18.979  2423  2423 E AndroidRuntime: FATAL EXCEPTION: main
05-05 20:04:18.979  2423  2423 E AndroidRuntime: Process: fr.wikodit.xxxxx, PID: 2423
05-05 20:04:18.979  2423  2423 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{fr.wikodit.xxxxx/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Failed to create JavaScript extend wrapper for class 'com/tns/NativeScriptActivity'
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2850)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3059)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1724)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7000)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: Caused by: com.tns.NativeScriptException: Failed to create JavaScript extend wrapper for class 'com/tns/NativeScriptActivity'
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at com.tns.Runtime.createJSInstanceNative(Native Method)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at com.tns.Runtime.createJSInstance(Runtime.java:820)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at com.tns.Runtime.initInstance(Runtime.java:793)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at com.tns.NativeScriptActivity.<init>(NativeScriptActivity.java:13)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at java.lang.Class.newInstance(Native Method)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.Instrumentation.newActivity(Instrumentation.java:1181)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2840)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	... 9 more

Working:

tns build android --bundle --release --env.release --env.production --env.aot

Not Working:

tns build android --bundle --release --env.snapshotInDocker --env.snapshot  --env.release --env.production --env.aot

I also noticed something odd, I compared the code diff, between previous week and now, and nothing changed (even within the package-lock). However the working aab release previous week was around 13/15mb, and the current (snapshoted, and not working) release is only around 9/11mb. No code has been removed, rather some code has been added, and no plugin or packages have been added or removed.

The only thing I can think of, is that I pruned docker images/containers within the week. (even

It seems I got the exact same issue on my newest build, which is odd, is that I previously made a perfectly working release with 6.2.0, a week ago… Today I tried with 6.2.0 and 6.5.0 android runtime, and I’m getting the issue on all the phones I can test on.

If I do not build the release with --env.snapshotInDocker and --env.snapshot, it’s working perfectly fine (except longer startup time).

Here is the crash log :

05-05 20:04:18.979  2423  2423 E AndroidRuntime: FATAL EXCEPTION: main
05-05 20:04:18.979  2423  2423 E AndroidRuntime: Process: fr.wikodit.xxxxx, PID: 2423
05-05 20:04:18.979  2423  2423 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{fr.wikodit.xxxxx/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Failed to create JavaScript extend wrapper for class 'com/tns/NativeScriptActivity'
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2850)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3059)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1724)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7000)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: Caused by: com.tns.NativeScriptException: Failed to create JavaScript extend wrapper for class 'com/tns/NativeScriptActivity'
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at com.tns.Runtime.createJSInstanceNative(Native Method)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at com.tns.Runtime.createJSInstance(Runtime.java:820)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at com.tns.Runtime.initInstance(Runtime.java:793)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at com.tns.NativeScriptActivity.<init>(NativeScriptActivity.java:13)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at java.lang.Class.newInstance(Native Method)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.Instrumentation.newActivity(Instrumentation.java:1181)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2840)
05-05 20:04:18.979  2423  2423 E AndroidRuntime: 	... 9 more

Working:

tns build android --bundle --release --env.release --env.production --env.aot

Not Working:

tns build android --bundle --release --env.snapshotInDocker --env.snapshot  --env.release --env.production --env.aot

I also noticed something odd, I compared the code diff, between previous week and now, and nothing changed (even within the package-lock). However the working aab release previous week was around 13/15mb, and the current (snapshoted, and not working) release is only around 9/11mb. No code has been removed, rather some code has been added, and no plugin or packages have been added or removed.

The only thing I can think of, is that I pruned docker images/containers within the week. (even that I’m not sure of)

i think thats something else or at least not matching the stack everyone else has here and doesnt belong here and should be an own issue?

However, in case actual notifications are an issue;

Notifications themself are not an issue. It is enough to add the plugin via tns plugin add nativescript-local-notifications - without any implementation.

Hello,

After further investigation we were able to reproduce it.

Last stable version is 6.1.2. On all versions above you can reproduce it following:

  • Open your app (version> 6.1.2).
  • run “adb logcat --buffer=crash” (stacktrace logging, optional)
  • Reboot your device
  • run “adb logcat --buffer=crash” (stacktrace logging, optional)

we were able to fetch a full stacktrace like this with following error message:

04-30 12:12:38.665  3354  3354 E AndroidRuntime: FATAL EXCEPTION: main
04-30 12:12:38.665  3354  3354 E AndroidRuntime: Process: com.xxx.mobile, PID: 3354
04-30 12:12:38.665  3354  3354 E AndroidRuntime: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: metadata folder couldn't be opened!
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6079)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at android.app.ActivityThread.access$1300(ActivityThread.java:207)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1758)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:106)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:193)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6898)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
04-30 12:12:38.665  3354  3354 E AndroidRuntime: Caused by: com.tns.NativeScriptException: metadata folder couldn't be opened!
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at com.tns.Runtime.initNativeScript(Native Method)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at com.tns.Runtime.init(Runtime.java:627)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at com.tns.Runtime.init(Runtime.java:601)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at com.tns.Runtime.initRuntime(Runtime.java:591)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at com.tns.Runtime.initializeRuntimeWithConfiguration(Runtime.java:566)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at com.tns.RuntimeHelper.initRuntime(RuntimeHelper.java:163)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:19)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1165)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6074)
04-30 12:12:38.665  3354  3354 E AndroidRuntime:        ... 8 more

Why is google not reporting the full message? If this is known, nativescript should maybe implement subclasses of the NativeScriptException, to identify further whats the cause of issues like this…

Also we had following crash on nativescript 6.1.2 (maybe off topic, maybe related, but it happened only once and its not reproducable):

04-30 12:52:18.004  7977  7977 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x572 in tid 7977 (om.xxx.mobile), pid 7977 (om.xxx.mobile)
04-30 12:52:18.109  8026  8026 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-30 12:52:18.109  8026  8026 F DEBUG   : Build fingerprint: 'samsung/d2seea/d2s:10/QP1A.190711.020/N975FXXU3CTC9:user/release-keys'
04-30 12:52:18.110  8026  8026 F DEBUG   : Revision: '24'
04-30 12:52:18.110  8026  8026 F DEBUG   : ABI: 'arm64'
04-30 12:52:18.111  8026  8026 F DEBUG   : Timestamp: 2020-04-30 12:52:18+0200
04-30 12:52:18.111  8026  8026 F DEBUG   : pid: 7977, tid: 7977, name: om.xxx.mobile  >>> com.xxx.mobile <<<
04-30 12:52:18.111  8026  8026 F DEBUG   : uid: 10390
04-30 12:52:18.111  8026  8026 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x572
04-30 12:52:18.111  8026  8026 F DEBUG   : Cause: null pointer dereference
04-30 12:52:18.111  8026  8026 F DEBUG   :     x0  00000000d2801168  x1  0000000000000572  x2  0000007fe6bfa300  x3  0000000000000571
04-30 12:52:18.111  8026  8026 F DEBUG   :     x4  0000000000000000  x5  0000000000000000  x6  0000007910a89200  x7  0000007910a89000
04-30 12:52:18.111  8026  8026 F DEBUG   :     x8  0000000000000000  x9  0000000000000001  x10 0000000000004001  x11 0000000000000000
04-30 12:52:18.111  8026  8026 F DEBUG   :     x12 0000000000000000  x13 0000000000000000  x14 ffffffffffffffff  x15 00000000000000e0
04-30 12:52:18.111  8026  8026 F DEBUG   :     x16 0000007a020c6160  x17 0000007a08bfb3f8  x18 0000007a082fc000  x19 0000007fe6bfac10
04-30 12:52:18.111  8026  8026 F DEBUG   :     x20 0000007fe6bfa850  x21 0000000000000000  x22 0000007fe6bfac10  x23 00000000ffffffff
04-30 12:52:18.111  8026  8026 F DEBUG   :     x24 00000079118415c8  x25 0000000000000000  x26 0000007a077700b0  x27 0000000000000001
04-30 12:52:18.111  8026  8026 F DEBUG   :     x28 0000007fe6bfcb20  x29 0000007fe6bfa330
04-30 12:52:18.111  8026  8026 F DEBUG   :     sp  0000007fe6bfa330  lr  000000791173a6f4  pc  000000791173a708
04-30 12:52:18.115  8026  8026 F DEBUG   :
04-30 12:52:18.115  8026  8026 F DEBUG   : backtrace:
04-30 12:52:18.115  8026  8026 F DEBUG   :       #00 pc 0000000000cb1708  /data/app/com.xxx.mobile-XVZOEoQhsGUe5MfcemPIxw==/lib/arm64/libNativeScript.so (BuildId: c32f555a4cc76af68f68df53be8a35d41f5938eb)
04-30 12:52:18.115  8026  8026 F DEBUG   :       #01 pc 0000000000cb26b0  /data/app/com.xxx.mobile-XVZOEoQhsGUe5MfcemPIxw==/lib/arm64/libNativeScript.so (_Unwind_RaiseException+112) (BuildId: c32f555a4cc76af68f68df53be8a35d41f5938eb)
04-30 12:52:18.115  8026  8026 F DEBUG   :       #02 pc 00000000008c69ac  /data/app/com.xxx.mobile-XVZOEoQhsGUe5MfcemPIxw==/lib/arm64/libNativeScript.so (__cxa_throw+112) (BuildId: c32f555a4cc76af68f68df53be8a35d41f5938eb)
04-30 12:52:18.115  8026  8026 F DEBUG   :       #03 pc 000000000028e7e4  /data/app/com.xxx.mobile-XVZOEoQhsGUe5MfcemPIxw==/lib/arm64/libNativeScript.so (BuildId: c32f555a4cc76af68f68df53be8a35d41f5938eb)
04-30 12:52:18.115  8026  8026 F DEBUG   :       #04 pc 0000000000000572  <unknown>

java.lang.RuntimeException: at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6465) at android.app.ActivityThread.access$1300 (ActivityThread.java:219) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1859) at android.os.Handler.dispatchMessage (Handler.java:107) at android.os.Looper.loop (Looper.java:214) at android.app.ActivityThread.main (ActivityThread.java:7356) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:930) Caused by: com.tns.NativeScriptException: at com.tns.Runtime.initNativeScript (Native Method) at com.tns.Runtime.init (Runtime.java:627) at com.tns.Runtime.init (Runtime.java:601) at com.tns.Runtime.initRuntime (Runtime.java:591) at com.tns.Runtime.initializeRuntimeWithConfiguration (Runtime.java:566) at com.tns.RuntimeHelper.initRuntime (RuntimeHelper.java:163) at com.tns.NativeScriptApplication.onCreate (NativeScriptApplication.java:19) at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1189) at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6460)

This is from the Play Console. And yes, my latest production release is the first to include Local-Notifications. I haven’t seen these errors before.

And this is the list of devices:

Galaxy A40 (a40) 11 28,9%
Pixel 2 (walleye) 7 18,4%
Galaxy S10e (beyond0) 5 13,2%
OnePlus 7 Pro (OnePlus7Pro) 5 13,2%
OnePlus 6 (OnePlus6) 3 7,9%
Galaxy S10 (beyond1) 3 7,9%
Galaxy A30 (a30) 2 5,3%
Galaxy Note10+ (d2s) 1 2,6%
OnePlus6T (OnePlus6T)

Just so you are aware, I have cleaned up the issue and hide comments (including some of mine 😀) that are out of scope; and moved @ptrxwsmitt Patricks issue into a new issue. :

As for status of this;

  1. I do know why the error is being thrown in 6.2+; it is because this error message actually didn’t exist in the prior version of NS and so the app silently exited. So this same issue was occurring in prior version, it just was a silent exit.

  2. I’m waiting for the phone to get here; none of my test phones exhibit this issue, so I have a Pixel on the way — unfortunately where I live shipping is SLOW. As soon as I get a device we can see if we can determine the actual why. I have a few ideas why this is failing but without being able to duplicate it – I can’t really test or fix it…

@Peterf89 & @neil-119 Do you have a callstack, and/or can you confirm you are using the Local-notifications plugin?

I’m seeing the same issue with the metadata folder not being able to be opened on Pixel 3 XL. Downgrading tns-android did not work. Any workarounds? It’s a new project.

EDIT: I deleted the platforms folder and then downgraded the NS Android runtime with tns platform add android@6.1.0 and it’s working now. Any ideas?

@saschaarthur - This is a custom runtime that Shiva (@shiv19) who opened this thread is currently running and he mentioned to me he is no longer seeing this issue, which originally I thought was AWESOME, what was changed so we can get a PR to get it fixed for everyone! 😀 So, I finally had a chance to go through the changes, and it was my whole point I was pointing out, is that the issue is still happening to his customers, it is just is masked.

Please note; Richard, has done other really good work; and some of his changes are actually in the runtimes and have stabilized other issues. But this was a whole new set of patches as he was trying to eliminate some “misc” type random errors… He went a little bit too far in this case, and as such I’m sure his google dashboard looked awesome for the number of errors he was seeing, but his customers would be actually seeing it quit out w/o any logging for a whole range of issues…

Why is google not reporting the full message? If this is known, nativescript should maybe implement subclasses of the NativeScriptException, to identify further whats the cause of issues like this…

As @saschaarthur mentioned this would be really helpful 👍

@NathanaelA @saschaarthur

I have been able to narrow it further down. I compared @7ammer’s plugin list with our own, the only overlapping plugins are:

  • nativescript-local-notifications
  • nativescript-plugin-firebase

The issue arises with nativescript-local-notifications. To reproduce please follow the steps below:

tns create testcrash --js
cd testcrash
tns plugin add nativescript-local-notifications
tns run android
adb logcat --buffer=crash

Restart device

adb logcat --buffer=crash

You should see the reported crash. It happens with nativescript >= 6.2.

@all Are you also using the nativescript-local-notifications plugin?

deleted mine, to not confuse anyone else

@shiv19 ok sorry looked at the last message! Sorry