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

In version 0.11.1 this issue continue in IOS "code": "ENSOSSTATUSERRORDOMAIN-10875", "domain": "NSOSStatusErrorDomain", "message": "The operation couldn’t be completed. (OSStatus error -10875.)

Open FayyazAliKhan1 opened this issue 3 years ago • 10 comments

:beetle: In version 0.11.1 this issue continue in IOS "code": "ENSOSSTATUSERRORDOMAIN-10875", "domain": "NSOSStatusErrorDomain", "message": "The operation couldn’t be completed. (OSStatus error -10875.)

:beetle: What is the observed behavior?

:beetle: What is the expected behavior?

:beetle: Please post your code:

// Please post your code

:bulb: Does the problem have a test case?

:bulb: Possible solution

:bulb: Is there a workaround?

:bulb: If the bug is confirmed, would you be willing to create a pull request?

Is your issue with...

  • [ Yes] iOS
  • [ No] Android
  • [- ] Windows

Are you using...

  • [ YES] React Native CLI (e.g. react-native run-android)
  • [ ] Expo
  • [ ] Other: (please specify)

Which versions are you using? 0.64.2

  • React Native Sound:
  • React Native:
  • iOS:
  • Android:
  • Windows:

Does the problem occur on... Both

  • [ ] Simulator
  • [ ] Device

If your problem is happening on a device, which device?

  • Device:

FayyazAliKhan1 avatar Dec 08 '21 08:12 FayyazAliKhan1

Hello, I am facing the same issue that @FayyazAliKhan1 is facing in IOS device (Iphone 6s) and I am using the latest version 0.11.1. It works like charm in Android but not IOS. I have also tried to downgrade the version to 0.11.0, but still I am facing the same issue. Would you please help me out here?

dippathak26 avatar Dec 24 '21 05:12 dippathak26

@dippathak26 0.11.0 is fine clear this library from pods nodemodules and lock file and install it using @0.11.0 specific

FayyazAliKhan1 avatar Dec 25 '21 17:12 FayyazAliKhan1

@FayyazAliKhan1 Hi, I have done all what you have mentioned and now I am using [email protected], but still it's throwing me the same error in iOS. It works fine in Android. It would be kind of you, if you have any solution for this. Please check the attached screenshot. Thank you :) Screenshot 2021-12-24 at 12 22 09 PM

dippathak26 avatar Dec 27 '21 11:12 dippathak26

Pass second argument as '' for ios and Sound.DOCUMENT or other values for android. Please see the below code

var whoosh = new Sound(path + '/audio/test.mp3', Platform.OS === 'ios' ? '' : Sound.DOCUMENT, (error) => {
                  if (error) {
                    console.log('failed to load the sound', error);
                    return;
                  }
                });

My issue got resolved by doing this.

gilshaan avatar Mar 29 '22 10:03 gilshaan

any update ?

vuhoangminh199 avatar Apr 19 '22 17:04 vuhoangminh199

Having the same issue on iOS with version 0.11.2. On Android it works fine.

flogy avatar May 16 '22 11:05 flogy

Having same problem. any update?

abdoerrahiem avatar May 24 '22 07:05 abdoerrahiem

When upgrading from 0.11.0 to 0.11.2 I also ran into this issue. What I found that worked was changing my MainBundleDir from const MainBundleDir = Platform.OS === 'ios' ? encodeURI(RNSound.MAIN_BUNDLE) : null to const MainBundleDir = Platform.OS === 'ios' ? RNSound.MAIN_BUNDLE : null

Removing encodeUri worked because it is now being escaped in the native code, whereas in version 0.11.0 it was not.

lmarques6 avatar Sep 30 '22 15:09 lmarques6

When upgrading from 0.11.0 to 0.11.2 I also ran into this issue. What I found that worked was changing my MainBundleDir from const MainBundleDir = Platform.OS === 'ios' ? encodeURI(RNSound.MAIN_BUNDLE) : null to const MainBundleDir = Platform.OS === 'ios' ? RNSound.MAIN_BUNDLE : null

Removing encodeUri worked because it is now being escaped in the native code, whereas in version 0.11.0 it was not.

Where do you do that?

qtipee avatar Oct 03 '22 07:10 qtipee

You can make audioPath => decodeURI(audioPath) and Sound.MAIN_BUNDLE into "" (empty string) for IOS

ghost avatar Mar 13 '23 09:03 ghost