java.lang.AssertionErrorAssertions.java:21
See original GitHub issueHello,
We recently upgraded to React Native 0.26.0 and since our production release have been seeing a large ramp up in the following crashes (This is from Bugsnag):
java.lang.AssertionError
at com.facebook.infer.annotation.Assertions.assertNotNull(Assertions.java:21)
at com.facebook.react.uimanager.events.EventDispatcher$DispatchEventsRunnable.run(EventDispatcher.java:305)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:148)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:187)
at java.lang.Thread.run(Thread.java:818)
I dove in and saw that in EventDispatcher.java, mRCTEventEmitter is null and there’s nothing catching the exception. My urge is to check if it’s null and do something like this…
if (mRCTEventEmitter == null) {
mRCTEventEmitter = mReactContext.getJSModule(RCTEventEmitter.class);
}
but that can’t be right - i don’t know why it’s null in the first place.
We’re not having these problems in iOS.
Thanks in advanced, and i hope i’ve provided enough info - please ask if i haven’t
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Exception in thread "main" java.lang.AssertionError
I ran into this very unhelpful error while compiling a project, and discovered that the problem was a reference to a non-existent static...
Read more >AssertionError (Java Platform SE 7 ) - Oracle Help Center
Constructs an AssertionError with its detail message derived from the specified int , which is converted to a string as defined in section...
Read more >5 | Handling java.lang.AssertionError - YouTube
assertion error javaJAVA & WEB | Session 16 | Assertion in Java ...
Read more >What is java.lang.AssertionError in junit java
In this JUnit Tutorial in java we will learn when java.lang.AssertionError occurs with example in java junit. What is hierarchy of java.lang.
Read more >Source for java.lang.AssertionError - developer.classpath.org!
42: * An assertion error normally occurs as a result of the <code>assert</code> 43: ; 47: * the string <code>"" + <em>expression</em></code>. This...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I encountered a similar problem, when dealing with map positioning, the program is running out, so far has not found the problem, the following I posted the error log, someone can help me?
Hi there! This issue is being closed because it has been inactive for a while.
But don’t worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/javalangassertionerrorassertionsjava21
Product Pains has been very useful in highlighting the top bugs and feature requests: https://productpains.com/product/react-native?tab=top
Also, if this issue is a bug, please consider sending a pull request with a fix.