Error: Missing audio recording permissions when using Expo and expo-av

I am developing an app using Expo and I’m encountering an issue with audio recording permissions. When I try to start recording by clicking a button in my app, I receive the following error message in the console:

LOG  Requesting permissions..
LOG  Starting recording..
ERROR  Failed to start recording [Error: Missing audio recording permissions.]

No dialog appears to ask for microphone permission, i also modified the startRecording function on line where it asks for permission, i added .then and .catch but it directly goes to catch statement, meaning the permission is automatically getting denied

I have tried the following steps to resolve the issue:

Added the necessary microphone permission to my app.json file by including the expo-av plugin with the “microphonePermission” configuration.

Verified that the microphone permission message is set “Allow Anonimia to access your microphone.” in the app.json file.

Updated the plugins section in app.json to remove the microphonePermission key with a value of false in the expo-image-picker plugin configuration.

Rebuilt the development client and ensured that I am using the latest version of the expo-cli and expo sdk.

Despite these attempts, the error persists, and I am unable to start recording audio in my app. I would greatly appreciate any insights or guidance on how to resolve this issue. Thank you in advance for your help.

Here is the startRecording function:

async function startRecording() {
        try {
            console.log("Requesting permissions..");
            await Audio.requestPermissionsAsync();
            await Audio.setAudioModeAsync({
                allowsRecordingIOS: true,
                playsInSilentModeIOS: true,
            console.log("Starting recording..");
            const { recording } = await Audio.Recording.createAsync(
            console.log("Recording started");
        } catch (err) {
            console.error("Failed to start recording", err);

And here is my app.json

  "expo": {
    "userInterfaceStyle": "automatic",
    "name": "Anonimia",
    "slug": "anonymous-chat",
    "description": "Anonymous chat app",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "app.anonimia.messenger"
    "plugins": [
          "photosPermission": "Allow Anonimia to open photos",
          "cameraPermission": "Allow Anonimia to open the camera",
          "microphonePermission": "Allow Anonimia to access your microphone."
    "android": {
      "backgroundColor": "#222831",
      "package": "app.anonimia.messenger",
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      "googleServicesFile": "./google-services.json"
    "web": {
      "favicon": "./assets/favicon.png"
    "extra": {
      "eas": {
        "projectId": "682e0444-81fd-45b2-8bec-aecdd8b4e48d"