There is a crash that is showing up repeatedly in Firebase crash reporting for my React Native Android app. However, I am at a loss as to what would be causing it, as the stack trace doesn't cite any of my code. Does anyone know what might be the cause? I am on React Native 0.47.1
The stack trace is as follows:
Exception java.lang.RuntimeException: java.lang.InterruptedException
com.facebook.react.common.futures.SimpleSettableFuture.getOrThrow (SimpleSettableFuture.java:102)
com.facebook.react.bridge.queue.MessageQueueThreadImpl.startNewBackgroundThread (MessageQueueThreadImpl.java:199)
com.facebook.react.bridge.queue.MessageQueueThreadImpl.create (MessageQueueThreadImpl.java:146)
com.facebook.react.bridge.queue.ReactQueueConfigurationImpl.create (ReactQueueConfigurationImpl.java:87)
com.facebook.react.bridge.CatalystInstanceImpl.<init> (CatalystInstanceImpl.java:101)
com.facebook.react.bridge.CatalystInstanceImpl.<init> (CatalystInstanceImpl.java:42)
com.facebook.react.bridge.CatalystInstanceImpl$Builder.build (CatalystInstanceImpl.java:574)
com.facebook.react.ReactInstanceManager.createReactContext (ReactInstanceManager.java:999)
com.facebook.react.ReactInstanceManager.access$600 (ReactInstanceManager.java:109)
com.facebook.react.ReactInstanceManager$4.run (ReactInstanceManager.java:802)
java.lang.Thread.run (Thread.java:761)
Caused by java.lang.InterruptedException:
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly (AbstractQueuedSynchronizer.java:1301)
java.util.concurrent.CountDownLatch.await (CountDownLatch.java:203)
com.facebook.react.common.futures.SimpleSettableFuture.get (SimpleSettableFuture.java:66)
com.facebook.react.common.futures.SimpleSettableFuture.getOrThrow (SimpleSettableFuture.java:100)
com.facebook.react.bridge.queue.MessageQueueThreadImpl.startNewBackgroundThread (MessageQueueThreadImpl.java:199)
com.facebook.react.bridge.queue.MessageQueueThreadImpl.create (MessageQueueThreadImpl.java:146)
com.facebook.react.bridge.queue.ReactQueueConfigurationImpl.create (ReactQueueConfigurationImpl.java:87)
com.facebook.react.bridge.CatalystInstanceImpl.<init> (CatalystInstanceImpl.java:101)
com.facebook.react.bridge.CatalystInstanceImpl.<init> (CatalystInstanceImpl.java:42)
com.facebook.react.bridge.CatalystInstanceImpl$Builder.build (CatalystInstanceImpl.java:574)
com.facebook.react.ReactInstanceManager.createReactContext (ReactInstanceManager.java:999)
com.facebook.react.ReactInstanceManager.access$600 (ReactInstanceManager.java:109)
com.facebook.react.ReactInstanceManager$4.run (ReactInstanceManager.java:802)
java.lang.Thread.run (Thread.java:761)
This problem also occur for many others as well and the cause is various. You can find the discussion about it here. Since I really don't know what your app does so here is some possible reasons:
react-native-navigation
(you can try change it back to react-navigation
)react-native-image-crop-picker
or react-native-image-picker
(Which produce the same error that make your app crash on some device and it throw InterruptedException
If the problem is number 2 you can try to fix it by alter MainApplication.java
:
@Override
public boolean clearHostOnActivityDestroy() {
return false;
}
The fix in number 2 was also reference from here under acintyo
answer.
As for changing the react-native
version you can try it but I do not recommend it since after reading through the issues mentioned above, I saw that many version also experienced this issues (most of them are 0.49.+ or 0.45.x)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With