question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

expo-av: [Error: Prepare encountered an error: recorder not provided.]

See original GitHub issue

Summary

At first, it works so I could record but after that, I could not record again because of the below error.

[Error: Prepare encountered an error: recorder not provided.]

Thank you.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

bare

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

45

Environment

React-native: 0.68.1
expo: >=45.0.0-0 < 46.0.0
expo-av: ^11.2.3

I tested it on iphone 6s 15.4.1.

Reproducible demo

This is my code base.

const startRecording = async () => {
    try {
      await Audio.requestPermissionsAsync();
      await Audio.setAudioModeAsync({
        allowsRecordingIOS: true,
        playsInSilentModeIOS: true,
        staysActiveInBackground: false,
      });

      const { recording, status } = await Audio.Recording.createAsync(
        Audio.RECORDING_OPTIONS_PRESET_HIGH_QUALITY
      );

    } catch (error) {
      console.log("Failed to start Recording", error);
    }
  };

  const stopRecording = async () => {
    await recording.stopAndUnloadAsync();
    const uri = recording.getURI();
    return uri;
  };

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
byCedriccommented, May 23, 2022

Thanks @devbalmuda! That’s right, it’s one of the limitations of an iOS simulator. See: https://docs.expo.dev/workflow/ios-simulator/#limitations

1reaction
devbalmudacommented, May 21, 2022

Expo team said the iOS simulator does not support the recording… so you need to test with the real phone i think. You can see the details on below link. https://docs.expo.dev/versions/v45.0.0/sdk/audio/

Read more comments on GitHub >

github_iconTop Results From Across the Web

IOS audio recording expo av - Expo SDK - Forums
EXPO AV. The audio recording not working on ios and gives this error. Failed to start recording, [Error: Prepare encountered an error: Error...
Read more >
Expo-av audio recording - Stack Overflow
I'm trying to record audio with expo-audio but it's showing an error when I start recording ...
Read more >
expo-av - npm
Expo universal module for Audio and Video playback. Latest version: 13.0.2, last published: 25 days ago. Start using expo-av in your project ...
Read more >
Expo-av audio recording : r/reactnative - Reddit
I'm trying to record audio with expo-audio but it's showing an error when I start recording Error: Only one Recording object can be...
Read more >
expo-av | Yarn - Package Manager
expo-av. Expo universal module for Audio and Video playback ... Bug fixes. Others. 13.0.2 — 2022-11-29. Bug fixes. Fixed error for duplicated META-INF ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found