react-native-sound icon indicating copy to clipboard operation
react-native-sound copied to clipboard

The operation couldn’t be completed. (OSStatus error 2003334207.)

Open gulsher7 opened this issue 4 years ago • 9 comments

Audio not play in ios please help i mentioned error screenshot below

Screenshot 2021-05-18 at 4 03 23 PM

gulsher7 avatar May 18 '21 10:05 gulsher7

Check your audio format, iOS does not support ogg files 😞

marciok avatar May 25 '21 16:05 marciok

thanks for your reply but i'm using mp3 file here is the link https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3

gulsher7 avatar Jun 08 '21 04:06 gulsher7

Same issue with '.wav' extension

GhayoorUlHaq avatar Jun 23 '21 08:06 GhayoorUlHaq

You need to add audio to Resources in Xcode. Refer to this one. https://github.com/zmxv/react-native-sound/issues/64#issuecomment-346956562

GhayoorUlHaq avatar Jun 23 '21 08:06 GhayoorUlHaq

I'v have the same problem with iOS (on Android it working perfectly).

Have added sound file (.wav) to Resources. Double check and it is all in Copy Bundle Resources in Build Phases.

On iOS if i set Sound.MAIN_BUNDLE or even encodeURIComponent(Sound.MAIN_BUNDLE) it will have an load fail error in XCode output.

When change Sound.MAIN_BUNDLE to '' (empty string). The load fail error disappear but it jump to error callback with error just like @gulsher7 has show. @@

kyoz avatar Aug 18 '21 03:08 kyoz

LMFAO. I'v found out why my audio not play and having this issue. I'm using wav file and it not work. Doesn't know why, but convert everything to .mp3 and it work perfectly.

kyoz avatar Aug 18 '21 07:08 kyoz

For me it was not working for wav. With mp3 it worked: Sound.MAIN_BUNDLE -- without encodeUri, file -- directly in root project folder.

Probably also may add it to Resources and prefix filename or postfix second arg with '/Resources' (but not sure)

duasfh avatar Sep 15 '21 08:09 duasfh

Hey guys I wrote a react-native decoder to solve this: https://github.com/wix-incubator/react-native-opus-decode Enjoy :)

doronpr avatar Jun 01 '22 06:06 doronpr

I've just met this problem today. In my case, I used the react-native-sound library and I put the wrong file path accidently. So it works after I fix it. But I'm not sure if it's the same with your case. Thank you!

cheuchheang avatar Nov 14 '22 09:11 cheuchheang