-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Expo AV loadAsync never rejects if a file fails to load #20333
Comments
I'm having a similar issue on my expo-av Video component which I cannot track down. Sometimes, no alert pops up. Like every third or fourth try!
|
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed. |
Hi, adding a comment here to prevent the issue from being closed. |
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed. |
It's still there in sdk 49...sigh!! Also if internet connectivity drops it keeps trying to load and never throws an error |
experiencing the same with
the whole execution stalls and in the console you can see just This is reproducible only when using the Expo Go client in an iOS simulated device. On a real device with the Expo Go client it properly throws an error. Any recommendations to check if a file is play-able before calling createAsync, are appreciated! |
This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed. |
Hello again bot. This issue is still present in sdk 49 with the latest expo-av version. |
I'm having the same issue. |
Same issue for me, Users on ios getting app hang as the promise never rejects. I think in my case the uri points to a file that iOS has made unavailable either through icloud removing the local file or some other feature in ios. Anyone got any workarounds? Gonna have to see if maybe I can stat the file before loading it |
what's the file name? I just found out if the file name has spaces it doesn't work...removing the spacing it started to work, maybe is something related to the encoding of the url? replacing the string with |
Yeah you are getting a succesful load as you fixed your uri, but it should reject if the uri is invalid right, the problem is the promise never rejects just hangs. at least thats what I see, if you hardcode your uri to some incorrect location your promise resolve reject or hang? |
yeah you are right, it should still throw the error or at least timeout is the url is wrong...I wrote just to give a workaround to who read this post (I've just spent the day on this 😂 ) |
Im getting around it with RNFS for now. I'd imagine RNFS.exists would be enough but im not to sure how iOS manages storage if its in icloud, so I went nukelear and made sure I could read the file, was a pretty horrible bug stopping the app launching
|
I just checked, and found out I have the same file name space bug too, Thanks i'll implement your suggestion, Android works fine with spaces |
Okay so of my space in the filename bug, I actuallly needed to use Seems RNFS doesnt want encoded URI's |
I can confirm that the issue still exists on SDK 49. It's an unacceptable major bug. Why has it been ignored for over a year? Has anyone found a workaround? |
Far from ideal but I had to go with
|
Thank you for your reply, but can't go with this because I'm loading a bunch of audio files simultaneously and this can lead to a lot of timers being added into memory at the same time, I'm in a performance enhancement cycle of my app and this is the last thing I would do |
This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed. |
Preventing this from closing. Updated the snack to use the latest av version, the issue continues clinging tenaciously to its existence. |
Summary
Howdy! I am having the same issue described in #18627. If Audio.Sound's loadAsync method is given a uri for a file which does not exist or can't be played, it never rejects.
I'm only working in iOS, so I'm not sure if this is true for Android or web. I'm seeing it in both sdk version 46 and 47.
I tried the snack in the linked issue, and the reject does not occur on my simulator or when I run through an iOS device in the snack using the Tap to Play. Real devices also have this issue.
What platform(s) does this occur on?
iOS
Environment
Minimal reproducible example
Here's a delicious snack
https://snack.expo.dev/@wavy-jeff/load-ye-a-sound
For another example, here's a public repo
https://github.com/onwavy/sound-loading-example
The text was updated successfully, but these errors were encountered: