-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android crashing in production: java.lang.IllegalStateException #238
Comments
+1 |
i have the same issue
|
+1 In my case, the crash is happening when I go to Youtube by tapping the Youtube button and then come back to my app. |
Same +1 |
Same Error with me. |
Same here |
I got the same problem when I rotated the phone |
Is there any update on this? It still happens on my production app. |
Same issue here. Any fixes? |
Same ... |
+1 |
|
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 |
@HashDot What version of react-native-youtube are you using? I'm using v1.1.0 and it doesn't work. |
@Khuongnb I use v1.1.0 |
this solved my crash problem, but now the video stay as a black space, cant do anything like, play |
@lefrankleal check out my blog article: https://hashdot.co/blog/react-native-youtube |
hi @HashDot, i followed your tutorial, but once i come back to the previous screen, the video played for 1 sec then stop, UNAUTHORIZED_OVERLAY error :( |
I also attempted to follow @HashDot tutorial but now it will play for 1second and then stop. It does not crash but it doesn't work either. Has any solved this? If not looks like I'll be using another video player. |
Theres a youtube button that'll open separate youtube app. If youtube app is closed, the app crashes. None of the above solution worked for me. |
You can just tweak it with state. have a initial state of loading true, then componentWillUnmount() {
in your render function just dont render the YoutubePlayer if the state is loading. if you want to navigate to other screen just setState({ loading : true}, () => //navigate ) |
@samulon13 is the loading state you mentioned associated with rendering the component like so?
This crashes for me. What are you returning? |
{this.state.loading ? : <Youtube ... />} |
i also use Backhandler and set the loading to true again when ever the system go back. Because in application the number of navigation to push depends on the number of nodes that was created by the admin. |
Bugfix for issue davidohayon669#312 & davidohayon669#238: "Unable to instantiate fragment..."
We had this trouble and fixed it by tweaking Also, to replicate the crash – on the device/simulator i would be on our app, then switch to a memory-hungry webpage that ate up 100s of megs and then switch back to our app. |
I solved like this <YouTube |
yes same for me any help or update how you solved |
didn't work unauthorized overlay |
I still get this error. The error almost never occurs in debug mode. It occurs more often when attached to the metro serverwith debug off, It occurs a lot of the time in production builds, virtually always on first load. Setting resumePlayAndroid to false results in a black screen instead of a crash. This is a little better but not much. |
That doesn't work for me either. The app crashes frequently and always on the first run. |
This worked for me, thanks. react-navigation v6
You can add some conditions to make sure this happens on Android only. |
it work for me. |
I just recently launched my React Native Android app into production and several users are experiencing the following crash:
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!
The text was updated successfully, but these errors were encountered: