-
Notifications
You must be signed in to change notification settings - Fork 36
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
Downloaded episode playback stops after losing internet access #1314
Comments
Possibly blocked by #1179 |
Still haven't been able to reproduce this issue. I'm wondering if it could be related to device settings rather than app logic. |
I'm experiencing it on Android 12 (LineageOS MicroG 19.1) on Moto G7 Power. I haven't used the app in a long time, then it just started happening when I recently started using it again.
Reproduced again after deleting and redownloading. |
@jncosideout I just tried but couldn't reproduce the bug on a Google Android Pixel 4a. I tried the following:
I let the phone play for 30 minutes, and it never stopped playing... If you haven't already, can you update to the latest Podverse F-Droid v4.10.2? I'm doubtful an upgrade will fix it for you, but a lot has changed since 4.8.0. Also, are you using an SD card with Podverse? Since this is a LineageOS issue, it may be difficult for @kreonjr and I to work on. I just installed GrapheneOS for the first time a few weeks ago on a Pixel 3 though. I'll try testing on that soon. |
Yes I am using an SD card for podcast downloads on Podverse. Maybe it's not related to LOS since I use a Moto G7 Power and the user who reported #1461 also has a Moto G Power of some kind. I will update to 4.10.2 and report back. But first I'll try to repro without downloading to SD. |
ok I updated to 4.10.4 and tested a downloaded episode and it failed again after a min or so of playback. I still had downloads set to SD. Deleted the all episodes and tried again after switching downloads from SD -> device storage and tried again. Still doesn't work. |
@jncosideout thanks for the update. Hmm this is difficult without the ability to reproduce the bug locally. We'll be rolling out major updates to our audio and video player in 4.11.0 beta. If you'd have a chance to retest with that beta I'd appreciate it. I'm not aware of a fix for this specific issue in the update, but the audio/video libraries we're upgrading contain a ton of changes, so we're lucky a fix is included. I should have it ready for beta within the next few days. |
cool, I just heard about that upgrade on PC2.0 # 116. Looking forward to it! |
@jncosideout this might be fixed in v4.12.0. If it is isn't fixed, then it might be worth re-testing after #1611 is finished. |
@jncosideout 4.12.0 is available on Podverse now. If you have a chance I'd appreciate if you can confirm if you're still running into this issue. |
Updated to 4.12.0 and still encountered the error.
|
@jncosideout thanks again...dang I just tried all of those steps, and made sure the phone doesn't have internet access, even turned off wifi on my computer, and still can't reproduce the issue. The only thing I can think of causing this is some kind of file storage path issue...where the downloaded episodes for some reason aren't being found on your device...or some strange player issue, where it doesn't want to accept the downloaded episode format for some reason. Until I can reproduce the issue I'm pretty stuck unfortunately :( |
@jncosideout this is a long shot...but if the issue is still happening for you, can you try turning battery settings to "Unrestricted" for the app sometime, and retest? It seems like Android can do funky things for media player apps due to battery optimization settings. It doesn't make sense to me that would be related, but doublesymmetry/react-native-track-player#818 (comment) made me think it might be possible. |
Ok I just tried Unrestricted battery for the app and it didn't work. I also tried turning off and on Settings > Downloads > To external storage to reset the path before testing again, no luck. |
@jncosideout alright, dang 😞 thanks for trying. Will keep investigating. |
I just did two tests to see how long it plays if I start a downloaded episode with wi-fi on, then immediately shut wi-fi off and resume play:
In every case, after a few min it shuts down with the same I'll do this test a few more times to get some averages. |
those last two tests were on Wi-fi. Then I did two on cellular (which I rarely use)
I don't think the variables I'm testing have much effect. But I think the tests show that when it plays, it is in streaming mode, and the length of time played after disconnecting from all networks is only a function of how much data was buffered. |
also, the first of these last 4 tests was right after I finished downloading an episode. The subsequent 3 tests were done while playing that episode, not on other episodes or after starting a new download. I just changed those variable, then went back to the app |
@jncosideout ok thanks again for your help. Hmm the only thing I can imagine is that there is a file path or file permissions issue preventing our checkIfFileIsDownloaded function from finding downloaded episodes for some Android devices. The I don't want to make you do any more testing 😬 but I am wondering:
Other info...we are using the react-native-background-downloader library which is deprecated and has not been updated for years. Whether it fixes this issue or not, we should upgrade to the actively maintained fork. #1722 Issues for me to look into if they are related... |
I'm testing with Hog Story's feed. The first one was the episode Adam appeared on, # 333, on Jan 3rd. But the latest tests I ran were the latest episodes from that feed. Most of these tests I did with SD card downloads, but I have tested 'on device' downloads before. I'll try saving to device again if you want. I'm an iOS dev, btw. I have done one sample learning project before and set up Android Studio. Maybe I can do some debugging (if I can free up time). Is it an easy env to setup? |
@jncosideout any help trying to debug the code would be appreciated! We are up past our ears in work to do. I think it is actually pretty easy to get Podverse running locally, but I don't know if anyone has done it outside our core team? These docs have not been updated in years, but you can find a startup guide here: https://github.com/podverse/podverse-rn/blob/master/Contributing.md One thing that might be missing for that doc is our If you would be up for pairing, even if it is just to iron out our Contributing documentation and make sure it is up-to-date, and you're able to run the app on your machine, I'd greatly appreciate it, and could hop on a screenshare or chat through Matrix or Discord. |
Cool. I'll give it a shot and let you know how far I get. Then we can do a screenshare onboarding. |
Tested with local storage downloads instead of SD Card today (still on v4.12.3) and did not get the "playback stops" error. So it must be caused by saving downloads to an external card. |
@jncosideout very interesting. Thanks that should help narrow things down a lot. Unfortunately I still don't know when I'll have time to work on this, but it is a critical bug we need to fix... |
Please refer to #1737 for what appears to be a duplicate of this bug. |
This has been a huge problem for a long time, but it only seems to affect some listeners. I have never been able to reproduce the issue, and none of us are actually Android developers, so we've been stumped. We're looking into posting to freelancer websites to see if we can afford to hire people to fix bugs like this. Unfortunately I don't think @kreonjr and I will be able to solve this one on our own. |
Hey @mitchdowney, I have managed to reproduce this issue a couple of times using an Android emulator. Setup
Reproduce issue
After a few minutes, playback stops. It looks to me that, once the download is complete, Podverse is still attempting to play the streaming version rather than the freshly downloaded one. Checking the logs, I see see a couple of significant errors. When attempting to play:
And later on:
The download is working though as I can see the files in the device explorer: |
@amugofjava thanks so much for the investigation. Your test case sounds like #1717, and while #1717 is definitely causing this issue sometimes, I'm not sure it explains all of our offline playback issues (but maybe?). In any case I'm going to try to fix this scenario today. |
@amugofjava I attempted to apply a fix for the other offline playback failure issue I described, and I think that may help, but the steps you described sound like something else. I just tried reproducing the bug with the steps you provided, and I could not make it happen while using Android Emulator > Pixel 3a > API 34 > Android 13. I tested with No Agenda and Podnews Weekly Review. I let No Agenda play for 5+ minutes, and skipped the position forward and backwards with no issues. I also just tried reproducing the bug with Android Emulator > Pixel 3a > API 29 > Android 10, and couldn't reproduce it with that version either. I wonder what is different about our test environment? |
Hi @mitchdowney, Hmmm, it could be a difference in test environment. My main dev box is a PC running Ubuntu. I have a Mac too, but I don't have a Play Store version of the emulators on there. If you can send me an APK I would be happy to repeat the testing on my Mac too. I've tried again this morning on an Android 13 emulator, with 3GB SD Card provisioned and a fresh install of Podverse from the Play Store (production track). I managed to reproduce it consistently. I've included a screen recording below in case it is something I am doing - could it be the way I am setting up Podverse to use the SD Card? When you tested, did Android prompt you to select a folder to store the episodes and, if so, which folder did you choose? podnews_testing_android13_linux_30.webm |
This is still one of our biggest problems we need to solve on Android. Unfortunately I haven't had the time to dive deep into it, and I haven't been able to reproduce it yet. The good news, hopefully, is we're creating a bounty program, and this will be a pretty high priority bounty will offer to people, to see if someone wants to fix this for pay. I have only added a placeholder file for it in our bounty directory so far, but I hope to add details to these bounty files in the near future. https://github.com/podverse/podverse-ops/tree/master/bounties/mobile-android |
Another flight experience ruined by this bug rearing its ugly head 😫
|
Fix for this should be in v4.16.0 |
So far so good for me, tested over the weekend, offline play works fine on latest Podverse (with same phone and environment as last year) 👍 |
@jncosideout that's great to hear! This was by far one of our worst bugs on Android...many thanks to @lovegaoshi for the fix. If you see any erroring downloads, we are running into an issue with "too many redirects" for podcasts that redirect 6+ times for tracking domains. For more info you could follow #2161 |
I thought this was fixed in a previous release, but it is still being reported...
The text was updated successfully, but these errors were encountered: