Error: Android App Bundle is using CAMERA permission after using EAS

When I uploaded EAS-built AAB file after upgrading expo to 41.0.0, i get this error:

Your APK or Android App Bundle is using permissions that require a privacy policy: (android.permission.CAMERA)

Everything was working fine with expo 40 and classic build.

My eas.json:

"builds": {
    "android": {
      "release": {
        "workflow": "managed",
        "releaseChannel": "prod-android-8"
      }
    },
    "ios": {
      "release": {
        "workflow": "managed",
        "releaseChannel": "prod-ios-8"
      }
    }
  }

Versions:

eas --version
  eas-cli/0.16.0 darwin-x64 node-v14.15.5
expo -V
  4.5.0
expo sdk 41.0.0

My app.json:

"android": {
      ...
      "versionCode": 8,
      "permissions": [],

my dependencies:

"dependencies": {
    "@react-native-async-storage/async-storage": "^1.13.0",
    "@react-native-community/datetimepicker": "3.2.0",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/bottom-tabs": "^5.11.8",
    "@react-navigation/native": "^5.9.3",
    "@react-navigation/stack": "^5.14.3",
    "expo": "^41.0.1",
    "expo-apple-authentication": "~3.1.0",
    "expo-crypto": "~9.1.0",
    "expo-firebase-analytics": "~4.0.2",
    "expo-google-app-auth": "^8.1.4",
    "expo-haptics": "~10.0.0",
    "expo-image-picker": "~10.1.4",
    "expo-linking": "~2.2.3",
    "expo-notifications": "~0.11.6",
    "expo-sharing": "~9.1.2",
    "expo-status-bar": "~1.0.4",
    "firebase": "8.2.3",
    "formik": "^2.2.6",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
    "react-native-animatable": "^1.3.3",
    "react-native-circular-progress": "^1.3.7",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-progress": "^4.1.2",
    "react-native-reanimated": "~2.1.0",
    "react-native-safe-area-context": "3.2.0",
    "react-native-screens": "~3.0.0",
    "react-native-svg": "12.1.0",
    "react-native-swiper": "^1.6.0",
    "react-native-web": "~0.13.12",
    "sentry-expo": "^3.1.0",
    "yup": "^0.32.9"
  }

make sure you’re using the latest expo-cli version then run expo config --type introspect in your project and share the result here, with anything sensitive redacted

expo-cli version: 4.5.0

result from the config:

{
  name: 'Edukuu',
  slug: 'edukuu',
  version: '1.5.1',
  orientation: 'portrait',
  icon: './assets/icon.png',
  backgroundColor: '#f9fbfc',
  primaryColor: '#ff7535',
  assetBundlePatterns: [
    '**/*'
  ],
  description: '',
  plugins: [
    'sentry-expo'
  ],
  sdkVersion: '41.0.0',
  platforms: [
    'ios',
    'android',
    'web'
  ],
  splash: {
    image: './assets/splash.png',
    resizeMode: 'contain',
    backgroundColor: '#ffff'
  },
  updates: {
    fallbackToCacheTimeout: 0
  },
  ios: {
    supportsTablet: true,
    usesAppleSignIn: true,
    bundleIdentifier: 'com.edukuu.edukuuapp',
    googleServicesFile: './GoogleService-Info.plist',
    buildNumber: '8',
    config: {
      googleSignIn: {
        reservedClientId: '...'
      }
    },
    infoPlist: {
      CFBundleDevelopmentRegion: '$(DEVELOPMENT_LANGUAGE)',
      CFBundleExecutable: '$(EXECUTABLE_NAME)',
      CFBundleIdentifier: '$(PRODUCT_BUNDLE_IDENTIFIER)',
      CFBundleInfoDictionaryVersion: '6.0',
      CFBundleName: '$(PRODUCT_NAME)',
      CFBundlePackageType: '$(PRODUCT_BUNDLE_PACKAGE_TYPE)',
      CFBundleSignature: '????',
      CFBundleShortVersionString: '1.5.1',
      CFBundleVersion: '8',
      LSRequiresIPhoneOS: true,
      UILaunchStoryboardName: 'SplashScreen',
      UIRequiredDeviceCapabilities: [
        'armv7'
      ],
      UISupportedInterfaceOrientations: [
        'UIInterfaceOrientationPortrait',
        'UIInterfaceOrientationPortraitUpsideDown'
      ],
      UIViewControllerBasedStatusBarAppearance: false,
      UIStatusBarStyle: 'UIStatusBarStyleDefault',
      CFBundleURLTypes: [
        {
          CFBundleURLSchemes: [
            'com.edukuu.edukuuapp'
          ]
        },
        {
          CFBundleURLSchemes: [
            '...'
          ]
        },
        {
          CFBundleTypeRole: 'Editor',
          CFBundleURLName: 'OAuthRedirect',
          CFBundleURLSchemes: [
            'com.edukuu.edukuuapp'
          ]
        }
      ],
      UIUserInterfaceStyle: 'Light',
      UIRequiresFullScreen: true,
      CFBundleDisplayName: 'Edukuu',
      NSAppTransportSecurity: {
        NSAllowsArbitraryLoads: true,
        NSExceptionDomains: {
          localhost: {
            NSExceptionAllowsInsecureHTTPLoads: true
          }
        }
      }
    },
    entitlements: {
      'aps-environment': 'development',
      'com.apple.developer.applesignin': [
        'Default'
      ]
    }
  },
  android: {
    package: 'com.edukuu.edukuuapp',
    googleServicesFile: './google-services.json',
    versionCode: 11,
    permissions: [
      'android.permission.CAMERA',
      'android.permission.READ_EXTERNAL_STORAGE',
      'android.permission.WRITE_EXTERNAL_STORAGE',
      'android.permission.RECORD_AUDIO',
      'android.permission.INTERNET'
    ],
    useNextNotificationsApi: true,
    adaptiveIcon: {
      foregroundImage: './assets/adaptive-icon.png',
      backgroundColor: '#ff7535'
    },
    config: {
      googleSignIn: {
        apiKey: '...',
        certificateHash: '...'
      }
    }
  },
  web: {
    favicon: './assets/favicon.png',
    config: {
      firebase: {
        ...
      }
    }
  },
  extra: {
    IOS_CLIENT_ID: '...',
    ANDROID_CLIENT_ID: '...',
    STANDALONE_ANDROID_CLIENT_ID: '...',
    STANDALONE_IOS_CLIENT_ID: '...'
  },
  hooks: {
    postPublish: [
      {
        file: 'sentry-expo/upload-sourcemaps',
        config: {
          organization: '...',
          project: '...',
          authToken: '...'
        }
      }
    ]
  },
  _internal: {
    isDebug: false,
    projectRoot: '/Users/puneetbhakar/Desktop/coding/polity',
    staticConfigPath: '/Users/puneetbhakar/Desktop/coding/polity/app.json',
    packageJsonPath: '/Users/puneetbhakar/Desktop/coding/polity/package.json',
    dynamicConfigPath: {},
    pluginHistory: {
      'sentry-expo': {
        name: 'sentry-expo',
        version: '3.1.3'
      },
      'react-native-maps': {
        name: 'react-native-maps',
        version: 'UNVERSIONED'
      },
      'expo-ads-admob': {
        name: 'expo-ads-admob',
        version: 'UNVERSIONED'
      },
      'expo-apple-authentication': {
        name: 'expo-apple-authentication',
        version: '3.1.0'
      },
      'expo-contacts': {
        name: 'expo-contacts',
        version: 'UNVERSIONED'
      },
      'expo-notifications': {
        name: 'expo-notifications',
        version: '0.11.6'
      },
      'expo-updates': {
        name: 'expo-updates',
        version: '0.5.5'
      },
      'expo-branch': {
        name: 'expo-branch',
        version: 'UNVERSIONED'
      },
      'expo-document-picker': {
        name: 'expo-document-picker',
        version: 'UNVERSIONED'
      },
      'expo-facebook': {
        name: 'expo-facebook',
        version: 'UNVERSIONED'
      },
      'expo-splash-screen': {
        name: 'expo-splash-screen',
        version: '0.10.2'
      },
      'expo-firebase-core': {
        name: 'expo-firebase-core',
        version: '3.0.0'
      },
      'expo-app-auth': {
        name: 'expo-app-auth',
        version: '10.1.2'
      },
      'expo-image-picker': {
        name: 'expo-image-picker',
        version: '10.1.4'
      },
      'expo-file-system': {
        name: 'expo-file-system',
        version: '11.0.2'
      }
    },
    modResults: {
      android: {
        gradleProperties: [
          {
            type: 'comment',
            value: 'Project-wide Gradle settings.'
          },
          {
            type: 'empty'
          },
          {
            type: 'comment',
            value: 'IDE (e.g. Android Studio) users:'
          },
          {
            type: 'comment',
            value: 'Gradle settings configured through the IDE *will override*'
          },
          {
            type: 'comment',
            value: 'any settings specified in this file.'
          },
          {
            type: 'empty'
          },
          {
            type: 'comment',
            value: 'For more details on how to configure your build environment visit'
          },
          {
            type: 'comment',
            value: 'http://www.gradle.org/docs/current/userguide/build_environment.html'
          },
          {
            type: 'empty'
          },
          {
            type: 'comment',
            value: 'Specifies the JVM arguments used for the daemon process.'
          },
          {
            type: 'comment',
            value: 'The setting is particularly useful for tweaking memory settings.'
          },
          {
            type: 'comment',
            value: 'Default value: -Xmx10248m -XX:MaxPermSize=256m'
          },
          {
            type: 'property',
            key: 'org.gradle.jvmargs',
            value: '-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8'
          },
          {
            type: 'empty'
          },
          {
            type: 'comment',
            value: 'When configured, Gradle will run in incubating parallel mode.'
          },
          {
            type: 'comment',
            value: 'This option should only be used with decoupled projects. More details, visit'
          },
          {
            type: 'comment',
            value: 'http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects'
          },
          {
            type: 'comment',
            value: 'org.gradle.parallel=true'
          },
          {
            type: 'empty'
          },
          {
            type: 'comment',
            value: 'AndroidX package structure to make it clearer which packages are bundled with the'
          },
          {
            type: 'comment',
            value: "Android operating system, and which are packaged with your app's APK"
          },
          {
            type: 'comment',
            value: 'https://developer.android.com/topic/libraries/support-library/androidx-rn'
          },
          {
            type: 'property',
            key: 'android.useAndroidX',
            value: 'true'
          },
          {
            type: 'empty'
          },
          {
            type: 'comment',
            value: 'Automatically convert third-party libraries to use AndroidX'
          },
          {
            type: 'property',
            key: 'android.enableJetifier',
            value: 'true'
          },
          {
            type: 'empty'
          },
          {
            type: 'comment',
            value: 'Version of flipper SDK to use with React Native'
          },
          {
            type: 'property',
            key: 'FLIPPER_VERSION',
            value: '0.54.0'
          }
        ],
        manifest: {
          manifest: {
            '$': {
              'xmlns:android': 'http://schemas.android.com/apk/res/android',
              package: 'com.edukuu.edukuuapp'
            },
            'uses-permission': [
              {
                '$': {
                  'android:name': 'android.permission.INTERNET'
                }
              },
              {
                '$': {
                  'android:name': 'android.permission.SYSTEM_ALERT_WINDOW'
                }
              },
              {
                '$': {
                  'android:name': 'android.permission.READ_PHONE_STATE'
                }
              },
              {
                '$': {
                  'android:name': 'android.permission.VIBRATE'
                }
              },
              {
                '$': {
                  'android:name': 'android.permission.MODIFY_AUDIO_SETTINGS'
                }
              },
              {
                '$': {
                  'android:name': 'android.permission.READ_EXTERNAL_STORAGE'
                }
              },
              {
                '$': {
                  'android:name': 'android.permission.WRITE_EXTERNAL_STORAGE'
                }
              },
              {
                '$': {
                  'android:name': 'android.permission.CAMERA'
                }
              },
              {
                '$': {
                  'android:name': 'android.permission.RECORD_AUDIO'
                }
              },
              {
                '$': {
                  'android:name': 'android.permission.ACCESS_NETWORK_STATE'
                }
              },
              {
                '$': {
                  'android:name': 'android.permission.WAKE_LOCK'
                }
              },
              {
                '$': {
                  'android:name': 'com.google.android.c2dm.permission.RECEIVE'
                }
              }
            ],
            application: [
              {
                '$': {
                  'android:name': '.MainApplication',
                  'android:label': '@string/app_name',
                  'android:icon': '@mipmap/ic_launcher',
                  'android:roundIcon': '@mipmap/ic_launcher_round',
                  'android:allowBackup': 'true',
                  'android:theme': '@style/AppTheme'
                },
                'meta-data': [
                  {
                    '$': {
                      'android:name': 'expo.modules.updates.EXPO_UPDATE_URL',
                      'android:value': 'https://exp.host/@puneetbhakar/edukuu'
                    }
                  },
                  {
                    '$': {
                      'android:name': 'expo.modules.updates.EXPO_SDK_VERSION',
                      'android:value': '41.0.0'
                    }
                  },
                  {
                    '$': {
                      'android:name': 'expo.modules.updates.ENABLED',
                      'android:value': 'true'
                    }
                  },
                  {
                    '$': {
                      'android:name': 'expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH',
                      'android:value': 'ALWAYS'
                    }
                  },
                  {
                    '$': {
                      'android:name': 'expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS',
                      'android:value': '0'
                    }
                  },
                  {
                    '$': {
                      'android:name': 'expo.modules.updates.EXPO_RELEASE_CHANNEL',
                      'android:value': 'prod-android-11'
                    }
                  }
                ],
                activity: [
                  {
                    '$': {
                      'android:name': '.MainActivity',
                      'android:label': '@string/app_name',
                      'android:configChanges': 'keyboard|keyboardHidden|orientation|screenSize|uiMode',
                      'android:launchMode': 'singleTask',
                      'android:windowSoftInputMode': 'adjustResize',
                      'android:theme': '@style/Theme.App.SplashScreen',
                      'android:screenOrientation': 'portrait'
                    },
                    'intent-filter': [
                      {
                        action: [
                          {
                            '$': {
                              'android:name': 'android.intent.action.MAIN'
                            }
                          }
                        ],
                        category: [
                          {
                            '$': {
                              'android:name': 'android.intent.category.LAUNCHER'
                            }
                          }
                        ]
                      },
                      {
                        action: [
                          {
                            '$': {
                              'android:name': 'android.intent.action.VIEW'
                            }
                          }
                        ],
                        category: [
                          {
                            '$': {
                              'android:name': 'android.intent.category.DEFAULT'
                            }
                          },
                          {
                            '$': {
                              'android:name': 'android.intent.category.BROWSABLE'
                            }
                          }
                        ],
                        data: [
                          {
                            '$': {
                              'android:scheme': 'com.edukuu.edukuuapp'
                            }
                          },
                          {
                            '$': {
                              'android:scheme': 'staging'
                            }
                          }
                        ]
                      }
                    ]
                  },
                  {
                    '$': {
                      'android:name': 'com.facebook.react.devsupport.DevSettingsActivity'
                    }
                  },
                  {
                    '$': {
                      'android:name': 'com.theartofdev.edmodo.cropper.CropImageActivity',
                      'android:theme': '@style/Base.Theme.AppCompat'
                    }
                  }
                ]
              }
            ]
          }
        },
        strings: {
          resources: {
            string: [
              {
                _: 'Edukuu',
                '$': {
                  name: 'app_name'
                }
              }
            ]
          }
        }
      },
      ios: {
        infoPlist: {
          CFBundleDevelopmentRegion: '$(DEVELOPMENT_LANGUAGE)',
          CFBundleExecutable: '$(EXECUTABLE_NAME)',
          CFBundleIdentifier: '$(PRODUCT_BUNDLE_IDENTIFIER)',
          CFBundleInfoDictionaryVersion: '6.0',
          CFBundleName: '$(PRODUCT_NAME)',
          CFBundlePackageType: '$(PRODUCT_BUNDLE_PACKAGE_TYPE)',
          CFBundleSignature: '????',
          CFBundleShortVersionString: '1.5.1',
          CFBundleVersion: '8',
          LSRequiresIPhoneOS: true,
          UILaunchStoryboardName: 'SplashScreen',
          UIRequiredDeviceCapabilities: [
            'armv7'
          ],
          UISupportedInterfaceOrientations: [
            'UIInterfaceOrientationPortrait',
            'UIInterfaceOrientationPortraitUpsideDown'
          ],
          UIViewControllerBasedStatusBarAppearance: false,
          UIStatusBarStyle: 'UIStatusBarStyleDefault',
          CFBundleURLTypes: [
            {
              CFBundleURLSchemes: [
                'com.edukuu.edukuuapp'
              ]
            },
            {
              CFBundleURLSchemes: [
                'com.googleusercontent.apps.825313879301-fsc8t2euqnnvgnrq5ibmvl4j7iisr63p'
              ]
            },
            {
              CFBundleTypeRole: 'Editor',
              CFBundleURLName: 'OAuthRedirect',
              CFBundleURLSchemes: [
                'com.edukuu.edukuuapp'
              ]
            }
          ],
          UIUserInterfaceStyle: 'Light',
          UIRequiresFullScreen: true,
          CFBundleDisplayName: 'Edukuu',
          NSAppTransportSecurity: {
            NSAllowsArbitraryLoads: true,
            NSExceptionDomains: {
              localhost: {
                NSExceptionAllowsInsecureHTTPLoads: true
              }
            }
          }
        },
        entitlements: {
          'aps-environment': 'development',
          'com.apple.developer.applesignin': [
            'Default'
          ]
        },
        expoPlist: {
          EXUpdatesReleaseChannel: 'prod-android-11',
          EXUpdatesSDKVersion: '41.0.0',
          EXUpdatesURL: 'https://exp.host/@puneetbhakar/edukuu',
          EXUpdatesEnabled: true,
          EXUpdatesCheckOnLaunch: 'ALWAYS',
          EXUpdatesLaunchWaitMs: 0
        }
      }
    }
  },
  mods: {
    android: {
      manifest: [AsyncFunction: interceptingMod] {
        isProvider: true
      },
      strings: [AsyncFunction: interceptingMod] {
        isProvider: true
      },
      gradleProperties: [AsyncFunction: interceptingMod] {
        isProvider: true
      }
    },
    ios: {
      infoPlist: [AsyncFunction: interceptingMod] {
        isProvider: true
      },
      entitlements: [AsyncFunction: interceptingMod] {
        isProvider: true
      },
      expoPlist: [AsyncFunction: interceptingMod] {
        isProvider: true
      }
    }
  }
}

ah i see. yeah this permission is coming from expo-image-picker:

you can use patch-package to remove this, although you will have to do it in the build directory: expo/withImagePicker.js at 3473d31837b312cfdf2200aa43d918c7fdfbebb9 · expo/expo · GitHub

we’ll make it easier to opt out of these permissions in the future

@notbrent thanks a lot for the help.