Audio recorder: "Prepare encountered an error: recorder not prepared"

I started a simple audio recording app using the Expo Audio app, and as far as I can tell I’m doing the right thing with Recorder, but I get the error “Prepare encountered an error: recorder not prepared”

This is confusing because I would assume trying to prepare a recorder would not need an already-prepared recorder, and even more troubling, there are no google results for it other than the code listings: expo "recorder not prepared" - Google Search

Here’s my code: https://github.com/thedaniel/sexy-priest

To reproduce the error, load the app and click “confess”

I am running it through the expo app on an iPhone 7.

this is example how you can recorder whit Expo Audion API (GitHub - expo/audio-recording-example: Audio Recording Example)

1 Like

I deduced the problem from the sample code and figured out why I went wrong. The docs for Expo.Audio in the docs site didn’t make it clear that Audio.setAudioModeAsync MUST be called.

1 Like