question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

com.facebook.infer.annotation.Assertions.assertNotNull Assertions.java, line 19 java.lang.AssertionError: Tried to start a task on a react context that has already been destroyed

See original GitHub issue

I am facing a crash in the react-native android app which is not able to reproduce. The crash is happening only in production. I tried different things but not able to find the cause of the problem Here is the stack trace I got in App-Center Crashlytics

Assertions.java, line 19
java.lang.AssertionError: Tried to start a task on a react context that has already been destroyed
com.facebook.infer.annotation.Assertions.assertNotNull Assertions.java:19
com.facebook.react.jstasks.HeadlessJsTaskContext.startTask HeadlessJsTaskContext.java:98
com.facebook.react.jstasks.HeadlessJsTaskContext.startTask HeadlessJsTaskContext.java:87
io.invertase.notifee.NotifeeReactUtils.lambda$startHeadlessTask$1 NotifeeReactUtils.java:161
io.invertase.notifee.-$$Lambda$NotifeeReactUtils$KgQWh76krkFzoFdkyOWh2Uc96Ig.call
io.invertase.notifee.-$$Lambda$LL5T3_qcdZ0KgAbnpHFtVQIbufQ.run
android.os.Handler.handleCallback Handler.java:873
android.os.Handler.dispatchMessage Handler.java:99
android.os.Looper.loop Looper.java:201
android.app.ActivityThread.main ActivityThread.java:6826
java.lang.reflect.Method.invoke Method.java
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run RuntimeInit.java:547
com.android.internal.os.ZygoteInit.main ZygoteInit.java:873

As far I can see this crash is related to some HeadlessJsTaskContext. I am using @notifee/react-native for handling notifications coming from FCM. all the notifications states (Foreground, Background and Killed ) are working fine when tested but this crash count is kept increasing

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
julestruongcommented, Aug 22, 2022

any news on this ? The error happens to me too. But i’m not displaying any notification , i just installed it.

0reactions
github-actions[bot]commented, Dec 6, 2022

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

com.facebook.infer.annotation.Assertions Java Examples
This page shows Java code examples of com.facebook.infer.annotation. ... "Tried to start a task on a react context that has already been destroyed");...
Read more >
Java Assertions.assertNotNull Examples, com.facebook.infer ...
Java Assertions.assertNotNull - 30 examples found. These are the top rated real world Java examples of com.facebook.infer.annotation.Assertions.
Read more >
Building context-nested routes with React Router 6
The issue here is that the code is attempting to render two routes on the same path, but only one route can match...
Read more >
Custom pluggable types for ... - The Checker Framework Manual
They should be written on their own line in the source code, ... The castNonNull method throws AssertionError if Java assertions are enabled ......
Read more >
(PDF) Java for Absolute Beginners | Iuliana Cosmina
A class that does not need to be instantiated, but groups together fields and methods for other classes to inherit, or provide a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found