Expo: Audio recording example: "audio is not enabled"

Created on 13 May 2017  路  3Comments  路  Source: expo/expo

When trying to exp publish the https://github.com/expo/audio-recording-example, or following the audio recording documentation, I find myself getting the following error.

The permission has been accepted, when prompted.

10:29:23 AM: Possible Unhandled Promise Rejection (id: 0): Cannot complete operation because audio is not enabled. http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:70783:32 loadModuleImplementation@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:109:12 guardedLoadModule@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:63:45 Audio@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:2599:19 componentDidMount@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:111822:12 measureLifeCyclePerf@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:21232:14 http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:21369:31 notifyAll@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:18229:28 close@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:18140:35 closeAll@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:17978:29 perform@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:17942:24 perform@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:17933:24 flushBatchedUpdates@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:17567:24 flushBatchedUpdates@[native code] closeAll@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:17978:29 perform@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:17942:24 batchedUpdatesWithControlledComponents@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:14628:26 _receiveRootNodeIDEvent@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:14514:40 receiveTouches@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:14544:54 __callFunction@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:3450:47 http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:3321:29 guard@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:3285:7 callFunctionReturnFlushedQueue@http://192.168.1.45:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles:3320:12 callFunctionReturnFlushedQueue@[native code]

Most helpful comment

and happend after this.recording.startAsync() called

I get this as well, and the error is unhelpful. Any ideas how to fix it?

Start encountered an error: recording not started
- node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:80:57 in <unknown>
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:400:4 in __invokeCallback
- ... 4 more stack frames from framework internals

All 3 comments

I get the same error, and find that https://github.com/expo/audio-recording-example, has use the expo 17.0.0 sdk
look here: https://blog.expo.io/expo-sdk-v17-0-0-is-now-available-2c4f13362816

but I get another error ,when I use audio-recording-example with 17.0.0 sdk
I get error in android(ios just ok):

Possible Unhandled Promise Rejection (id: 0):
Error: Start encountered an error: recording not started
createErrorFromErrorData@http://192.168.0.122:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=android&dev=true&hot=false&minify=false:3275:24
http://192.168.0.122:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=android&dev=true&hot=false&minify=false:3233:49
__invokeCallback@http://192.168.0.122:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=android&dev=true&hot=false&minify=false:3554:21
http://192.168.0.122:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=android&dev=true&hot=false&minify=false:3400:32
__guard@http://192.168.0.122:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=android&dev=true&hot=false&minify=false:3489:11
invokeCallbackAndReturnFlushedQueue@http://192.168.0.122:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=android&dev=true&hot=false&minify=false:3399:19
invokeCallbackAndReturnFlushedQueue@[native code]

when I press record button.
and happend after this.recording.startAsync() called

and another question: how to choose speaker or receiver before audio play?
I get sound play from speaker in android(16.0.0 sdk), and receiver in ios(17.0.0 & 16.0.0 sdk)

@liu0fanyi That fixed it, thank you :)

and happend after this.recording.startAsync() called

I get this as well, and the error is unhelpful. Any ideas how to fix it?

Start encountered an error: recording not started
- node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:80:57 in <unknown>
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:400:4 in __invokeCallback
- ... 4 more stack frames from framework internals
Was this page helpful?
0 / 5 - 0 ratings