Android build failed due to TypeError: [android.manifest]: withAndroidManifestBaseMod: androidManifest.manifest.hasOwnProperty is not a function

Android build failed with an error code TypeError: [android.manifest]: withAndroidManifestBaseMod: androidManifest.manifest.hasOwnProperty is not a function

I think I have missed something in my app.config.json

app.config.js

 module.exports = {
      expo: {
        name: 'CFlow',
        slug: 'CFlow',
        version: '1.0.0',
        orientation: 'portrait',
        icon: './assets/icon.png',
        android: {
          package: 'com.sh411.CFlow',
          manifest: {
            permissions: ['CAMERA', 'READ_EXTERNAL_STORAGE'],
            usesCleartextTraffic: true,
            application: {
              activity: {
                'android:windowSoftInputMode': 'adjustPan',
              },
            },
          },
        },
        ios: {
          bundleIdentifier: 'com.sh411.CFlow',
        },
        androidStatusBar: {
          backgroundColor: '#ffffff',
          barStyle: 'dark-content',
          translucent: true,
        },
        splash: {
          image: './assets/splash.png',
          resizeMode: 'contain',
          backgroundColor: '#ffffff',
        },
        mods: {
          android: {
            manifest: {
              permissions: ['CAMERA', 'READ_EXTERNAL_STORAGE'],
              usesCleartextTraffic: true,
              application: {
                activity: {
                  'android:windowSoftInputMode': 'adjustPan',
                },
              },
            },
          },
          ios: {
            infoPlist: {
              NSCameraUsageDescription: 'This app uses the camera to take photos',
              NSPhotoLibraryUsageDescription: 'This app needs access to your photo library',
            },
          },
        },
        extra: {
          eas: {
            projectId: 'b1c7ca55-d671-4f7b-a550-xxx',
          },
        },
      },
    };

Error code

android.dangerous: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidIcons ➜ withDangerousMod
- Config syncing
android.dangerous: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withGoogleServicesFile ➜ withDangerousMod
- Config syncing
android.dangerous: withSplashScreen ➜ withAndroidSplashScreen ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidSplashDrawables ➜ withDangerousMod
- Config syncing
android.dangerous: withSplashScreen ➜ withAndroidSplashScreen ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidSplashImages ➜ withDangerousMod
- Config syncing
android.dangerous: withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withNotificationIcons ➜ withDangerousMod
- Config syncing
android.manifest: withDefaultBaseMods ➜ withAndroidBaseMods ➜ withGeneratedBaseMods ➜ withAndroidManifestBaseMod
- Config syncing
  expo:config-plugins:base-mods mods.android.manifest: file path: /Users/sh/CFlowMobile/android/app/src/main/AndroidManifest.xml +83ms
android.manifest: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidIcons ➜ withAndroidManifestIcons ➜ withAndroidManifest
- Config syncing
android.manifest: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withPermissions ➜ withAndroidManifest
- Config syncing
✖ Config sync failed
TypeError: [android.manifest]: withAndroidManifestBaseMod: androidManifest.manifest.hasOwnProperty is not a function

TypeError: [android.manifest]: withAndroidManifestBaseMod: androidManifest.manifest.hasOwnProperty is not a function
    at setAndroidPermissions (/Users/sh/CFlowMobile/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/build/android/Permissions.js:123:33)
  • managed workflow
  • eas 3.9.0
  • Edit in the app.json and app.config.json

why all the permissions, I think Expo does that for you by default if the libraries your are using are Expo managed e.g. ImagePicker from ‘expo-image-picker’;