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.

(Android) Crash on react-native 0.49.5 (RuntimeExceptionSimpleSettableFuture)

See original GitHub issue

Is this a bug report?

Yes

Environment

There was a crash on one of our Android users devices (Samsung SM-T110 Android 4.2.2 API 17) while they were using the production version of our app and we received this bug report from their device:

Environment:
  OS: macOS Sierra 10.12.6
  Node: 8.9.1
  Yarn: 1.0.2
  npm: 5.5.1
  Watchman: 3.9.0
  Xcode: Xcode 9.1 Build version 9B55
  Android Studio: 3.0 AI-171.4408382

Packages: (wanted => installed)
  react: 16.0.0-beta.5 => 16.0.0-beta.5
  react-native: 0.49.5 => 0.49.5

Steps to Reproduce

Here’s the exact stack trace:

java.lang.RuntimeException java.lang.InterruptedException 
    SimpleSettableFuture.java:102 com.facebook.react.common.futures.SimpleSettableFuture.getOrThrow
    MessageQueueThreadImpl.java:199 com.facebook.react.bridge.queue.MessageQueueThreadImpl.startNewBackgroundThread
    MessageQueueThreadImpl.java:146 com.facebook.react.bridge.queue.MessageQueueThreadImpl.create
    ReactQueueConfigurationImpl.java:87 com.facebook.react.bridge.queue.ReactQueueConfigurationImpl.create
    CatalystInstanceImpl.java:105 com.facebook.react.bridge.CatalystInstanceImpl.<init>
    CatalystInstanceImpl.java:39 com.facebook.react.bridge.CatalystInstanceImpl.<init>
    CatalystInstanceImpl.java:569 com.facebook.react.bridge.CatalystInstanceImpl$Builder.build
    ReactInstanceManager.java:1015 com.facebook.react.ReactInstanceManager.createReactContext
    ReactInstanceManager.java:107 com.facebook.react.ReactInstanceManager.access$600
    ReactInstanceManager.java:832 com.facebook.react.ReactInstanceManager$4.run
    Thread.java:856 java.lang.Thread.run


Caused by: java.lang.InterruptedException
    AbstractQueuedSynchronizer.java:1277 java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly
    CountDownLatch.java:202 java.util.concurrent.CountDownLatch.await
    SimpleSettableFuture.java:66 com.facebook.react.common.futures.SimpleSettableFuture.get
    SimpleSettableFuture.java:100 com.facebook.react.common.futures.SimpleSettableFuture.getOrThrow
    MessageQueueThreadImpl.java:199 com.facebook.react.bridge.queue.MessageQueueThreadImpl.startNewBackgroundThread
    MessageQueueThreadImpl.java:146 com.facebook.react.bridge.queue.MessageQueueThreadImpl.create
    ReactQueueConfigurationImpl.java:87 com.facebook.react.bridge.queue.ReactQueueConfigurationImpl.create
    CatalystInstanceImpl.java:105 com.facebook.react.bridge.CatalystInstanceImpl.<init>
    CatalystInstanceImpl.java:39 com.facebook.react.bridge.CatalystInstanceImpl.<init>
    CatalystInstanceImpl.java:569 com.facebook.react.bridge.CatalystInstanceImpl$Builder.build
    ReactInstanceManager.java:1015 com.facebook.react.ReactInstanceManager.createReactContext
    ReactInstanceManager.java:107 com.facebook.react.ReactInstanceManager.access$600
    ReactInstanceManager.java:832 com.facebook.react.ReactInstanceManager$4.run
    Thread.java:856 java.lang.Thread.run

Here are the threads:

screen shot 2017-11-24 at 09 08 20 screen shot 2017-11-24 at 09 08 37 screen shot 2017-11-24 at 09 08 53

Actual Behavior

There was a crash

Other hints:

Here’s the breadcrumbs we got that lead to the error: screen shot 2017-11-24 at 09 12 21

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:10
  • Comments:44 (19 by maintainers)

github_iconTop GitHub Comments

13reactions
marcmocommented, Feb 26, 2018

ok bot…as if upgrading to the latest RN version is such an easy task…

5reactions
acintyocommented, Dec 8, 2017

@guyca at Wix said that they use in MainApplication.java

 @Override
    public boolean clearHostOnActivityDestroy() {
        return false;
    }

in Wix app which fixes a lot of issues when external activities/apps are launched, which might be the issue if you’re using a camera component. Has anyone of you using it in your app?

If you do decide to give it a try, you will need to change the app startup as mentioned here for Android.

https://wix.github.io/react-native-navigation/#/android-specific-use-cases?id=compatibility-with-headlessjs

I have updated my app with the above changes and trying to reproduce the bug again. Haven’t been successful yet which is a good sign I guess.

Also, I started to see this issue after I updated to RNN .295 from RNN .253. Not sure if that rings a bell for anyone else.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to disagnose why React Native app crashes only on ...
Running any react-native command now yields the same result: > npx react-native run-android variant=release error Failed to load configuration ...
Read more >
React Native Crash Reporting and Error Tracking
Aggregated React Native crash dashboards and attributes; Symbolicated React Native (JavaScript and native iOS or Android) crash reports; Trend analysis with ...
Read more >
React Native Crash Course | Build a Complete App - YouTube
js, which allows you to build real native mobile apps for both iOS and Android. No prior React Native experience is required, only...
Read more >
Get Started with React Native - Visual Studio App Center
Crashes can't be processed at the time the application crashes. Edit the project's android/app/src/main/assets/appcenter-config.json and replace ...
Read more >
React Native - Sentry Documentation
Features: Automatic Native Crash Error Tracking (using both sentry-cocoa & sentry-android ); Offline storage of events; Events enriched with device data ...
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