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

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.

[Update: ] By the way, it work again after clicking center button on the iphone.

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;
  };

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.