Skip to content
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

undefined is not an object (evaluating 'RNSound.IsAndroid') #471

Closed
aspitsyn opened this issue Jul 31, 2018 · 15 comments
Closed

undefined is not an object (evaluating 'RNSound.IsAndroid') #471

aspitsyn opened this issue Jul 31, 2018 · 15 comments

Comments

@aspitsyn
Copy link

aspitsyn commented Jul 31, 2018

Hi,
I run react-native expo and IPhone X emulator on MacOS but I keep getting
"undefined is not an object (evaluating 'RNSound.IsAndroid')" error on emulator IPhone X.
Can anyone help please with that issue?
screenshot 2018-07-31 08 18 40

react-native-cli: 2.0.1
react-native: 0.55.4
react-native-sound: 0.10.9

@tmilewski
Copy link

I'm running into this exact same issue and all I have is

var Sound = require('react-native-sound')

@AilsonFreire
Copy link

You need to link your library. Use "react-native link react-native-sound"

@aspitsyn
Copy link
Author

aspitsyn commented Aug 4, 2018

AilsonFreire, I have checked that option, no effect.

@Udbhav12
Copy link

Udbhav12 commented Aug 4, 2018

I too faced this problem. 'react-native link react-native-sound' didn't work for me

I managed to resolved this error by following the manual linking steps

@aspitsyn
Copy link
Author

aspitsyn commented Aug 6, 2018

Udbhav12, how you managed to resolve that issue, could you please describe the manual linking steps?

@Udbhav12
Copy link

Udbhav12 commented Aug 6, 2018

@aspitsyn - Manual installation notes are mentioned in the docs. Refer to the below link

https://github.com/zmxv/react-native-sound/wiki/Installation

@jean-noelp
Copy link

Manual installation does not work for me.
It seems there might be a kind of conflict with "react-native-audio"...

@jean-noelp
Copy link

A solution which worked for me :

  • check the manual installation
  • remove node_modules
  • yarn install
  • rebuild & install android package

@ArtemKosiakevych
Copy link

Have you tried to install Pods after linking?

@tetreault
Copy link

This is happening for me, and my project is iOS only. Running on my iPhone X.

@jnosornov
Copy link

jnosornov commented Jan 5, 2019

It might be something related to permissions, I managed to solved it by adding permissions to Manifest in android folder, using the next line of code.

<uses-permission android:name="android.permission.RECORD_AUDIO" />

But I am not sure about Expo implementation, do not know if it comes configured out of the box. Go check react-native-sound npm package read me description.

@internetegir
Copy link

Udbhav12, how you managed to resolve that issue, could you please describe the manual linking steps?

have you find any solution & resolve the issue ?

@rahamin1
Copy link

I have the same problem on android.
I did a manual installation of the package.

@manishsxnaa
Copy link

I am resolved this issue by manually link library in X code, actually i did react-native link that is not giving any error so assume it's linked but when i have checked xcode then see this library is not linked so when i have linked manually and create new build then it's working perfectly.

@paulmelnikow
Copy link
Collaborator

If you're still having this problem, could you please post a link to a project that reproduces the problem, give information about your environment, and say what steps you have already tried?

This is the most common issue faced by react-native-sound users and it would be good to add documentation listing the possible resolutions. A pull request would be welcome; I've opened #592 to track that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests