-
-
Notifications
You must be signed in to change notification settings - Fork 972
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] lateinit property player has not been initialized #1633
Comments
What version are you using? Please try to reproduce in the example app. |
Closing due to unresponsiveness. |
@jspizziri Sorry for replying late, I'm using version |
@minhchienwikipedia Please upgrade to RC4 and retest |
I encountered a similar bug on the nightly release. When it crashes, I'm trying to empty the queue and add one new item. From logcat:
|
I think in my case, it's crashing when I do |
Confirmed the version |
@jspizziri I'm getting this error on v3.1.0 only after uploading new tracks and creating sounds for
|
@KrisLau can you reproduce this issue in the example app? |
@jspizziri Ok i'll try that out! I also created an issue #1693 |
@KrisLau lets keep this on this issue. If you can reproduce it in the example app reliably I'll reopen this one and we can handle it right here. |
@jspizziri Ok i'll close that one then! |
@jspizziri Working on that repro but I just realized I forgot to include this part in the previous comment:
|
@KrisLau it looks like you might be having an issue with multiple installations of ExoPlayer (expo-av + rntp). Please look at other issues for how people have worked around this. |
@jspizziri I tried looking around at some other issues like #1652 but their error cause is different I think from their error log printing Also not sure if this is relevant but I saw google/ExoPlayer#4902 which I'm not sure if it is related at all. |
@jspizziri Managed to repro it with a similar error at https://github.com/KrisLau/reproExoplayer. Error from Android Studio logcat:
You just need to connect android studio to the emulator before clicking the "expo-av play" button. (it doesn't use the |
Still facing this issue after exiting app (with no player initialization). |
@jspizziri I just tested removing this package and just using
I'll keep looking into it (Also it looks like #1694 and #1639 (comment) are similar issue to this). |
@jspizziri Sorry I've tried a bunch of things but i don't think I'm any closer to figuring out what is causing it. I'm just not very good |
I believe I found a fix, but my kotlin knowledge is -100 so maybe before making a PR someone could test? @KrisLau @jspizziri I changed the lines Lines 472 to 476 in 6b25dfe
Where we need to check if plater actually is initialised being a
and I suspect the No more crashes with this error for me, but please try and I'll make a PR if all goes well 🙏 |
@rbor Just tested it on my local machine and it doesn't seem to work for me. This is the repo I used to test the change: https://github.com/KrisLau/reproExoplayer |
@KrisLau I edited the file directly in my node_modules, cleaned and compiled again. For me the crash was showing on app hot reload reload. |
@rborn Don't trust any crashes that happen on hot reload to also happen in production. Best to test a fresh run instead. |
@puckey my crashlytics is full of them 😅 |
Just to chime in, from my test, this happened around 2 - 3 minutes when users put app in the background (I have another headless task running). Trackplayer has been setup but not use |
#1678 suggests that it might be a version mismatch for exoplayer but I'm not sure ahhaha |
Ok yeah it's definitely a exoplayer version mismatch: https://stackoverflow.com/questions/68496246/is-it-possible-to-have-two-different-versions-of-a-same-library-coexist. if there's any guidance on how to upgrade exoplayer please let me know |
@KrisLau But this is when you use another lib that has exoplayer, in my case I only have RNTP |
@rborn For RNTP, i think someone else in the thread already mentioned that there are other solved issues for that |
@KrisLau do you have a link ? 🙏 ❤️ |
I have no clue which issue they were referring to but a quick search of RNTP pulls up this: #1679 which might be it |
If anyone who has any knowledge of using exoplayer, a pull request to expo-av would be greatly appreciated. I tried upgrading it myself but I have no clue what I'm doing and I'm causing more errors hahaha. My issue in expo-av: expo/expo#18937 |
@mpivchev do we need to wrap access of |
All, it looks like this was fixed via #1700. Please test via the nightly build, and let us know if the problem persists. |
For anyone interested, Expo maintainers are planning on upgrading the exoplayer version: |
Have you solved it now? Now I have met this problem and I am very anxious |
@yanhongchang-1105 Expo-AV has fixed this already on their end so if that's what's causing it for you upgrade your expo-av version. If it is something else you will have to check that library and open an issue there. React native track player cant do anything |
My users got issue
lateinit property player has not been initialized
, and Android onlyThis is my
setupPlayer
functionAnd I put this function in useEffect of App.js file
Can you guys help me to fix this issue?!
The text was updated successfully, but these errors were encountered: