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 crashing in production: java.lang.IllegalStateException

See original GitHub issue

I just recently launched my React Native Android app into production and several users are experiencing the following crash:

java.lang.IllegalStateException

screen shot 2017-11-15 at 7 20 04 am

It seems to be coming from the react-native-youtube module. I’m not sure how to go about debugging this. I can’t seem to reproduce it locally on any of my physical devices, and because it’s Java and not JavaScript, I’m a bit unfamiliar.

If you could help point me in the right direction, I would really appreciate it!

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:8
  • Comments:33

github_iconTop GitHub Comments

16reactions
HashDotcommented, Mar 21, 2019

You can set “resumePlayAndroid” to false to prevent the app to crash. The problem with this solution is, you get a black rectangle instead of a crash.

Here a gist how I solved the problem with “This YouTubePlayer has been released” and Black Screen.

https://gist.github.com/HashDot/e47ad8366d9193901c9c7538276874a2

6reactions
sangameshrentlycommented, Nov 9, 2020

I solved like this

<YouTube key = {Math.random()}

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crash on Production App - java.lang.IllegalStateException
It looks like this can be caused when the Activity's onCreate gets called without a call to the Application's onCreate. I think @jason-simmons ......
Read more >
I can't find the reason of the IllegalStateException error in my ...
I have dozens of java and xml files in my project. It has hundreds of onclick methods. Only 1% of daily sessions have...
Read more >
Why does my multi-process Android app crash with a "java ...
onCreate() is called. If the process name is the application id (example: “com. example. app”) then you can call Helpshift's “install” call in...
Read more >
Expo App Crash on Production in some devices
heres the crash log : java.lang.IllegalStateException: at com.facebook.react.bridge.ReactContext.handleException (ReactContext.java:387)
Read more >
Crashes | Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
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