Error: Problems validating fields in app.json (SDK 48)

636 views Asked by At

i just upgraded to sdk48 and i get the following errors:

Error: Problems validating fields in app.json. Learn more.

• should NOT have additional property 'facebookScheme'.

• should NOT have additional property 'facebookAppId'.

• should NOT have additional property 'facebookDisplayName'.

My app.json is:

{
  "expo": {
    "name": "Solebich",
    "description": "Solebich.de Design Community",
    "slug": "solebich",
    "privacy": "unlisted",
    "version": "1.19.0",
    "orientation": "portrait",
    "primaryColor": "#ffffff",
    "scheme": "sli",
    "icon": "./assets/icons/app-icon.png",
    "facebookScheme": "fb#########",
    "facebookAppId": "#########",
    "facebookDisplayName": "Solebich",
    "androidStatusBar": {
      "barStyle": "dark-content",
      "backgroundColor": "#FFFFFF"
    },
    "notification": {
      "color": "#fba9b5",
      "icon": "./assets/icons/notification-icon-bw.png"
    },
    "splash": {
      "icon": "./assets/icons/loading-icon.png",
      "hideExponentText": true
    },
    "plugins": [
      "@react-native-firebase/app",
      "@react-native-firebase/perf",
      "@react-native-firebase/crashlytics",
      ["./podfile.plugin", "custom"],
      "sentry-expo",
      [
        "expo-image-picker",
        {
          "photosPermission": "Du kannst bereits gemachte Fotos auf SoLebIch teilen.",
          "cameraPermission": "Du kannst Fotos machen und auf SoLebIch teilen."
        }
      ]
    ],
    "updates": {
      "fallbackToCacheTimeout": 0,
      "checkAutomatically": "ON_ERROR_RECOVERY"
    },
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "de.solebich.app",
      "buildNumber": "1",
      "infoPlist": {
        "NSLocationAlwaysUsageDescription": "Die App benötigt deine Erlaubnis, um dir Benachrichtigungen zu deinen Inhalten senden zu dürfen.",
        "NSCameraUsageDescription": "Du kannst Fotos machen und auf SoLebIch teilen.",
        "NSPhotoLibraryUsageDescription": "Du kannst bereits gemachte Fotos auf SoLebIch teilen.",
        "CFBundleLocalizations": [
          "de"
        ],
        "CFBundleAllowMixedLocalizations": true,
        "CFBundleDevelopmentRegion": "de"
      },
      "associatedDomains": [
        "applinks:www.solebich.de",
        "applinks:solebich.de"
      ],
      "appStoreUrl": "https://itunes.apple.com/de/app/solebich/id1340857642?mt=8",
      "usesAppleSignIn": true,
      "config": {
        "googleMobileAdsAppId": "#########"
      },
      "googleServicesFile": "./GoogleService-Info.plist",
      "jsEngine": "hermes"
    },
    "android": {
      "googleServicesFile": "./google-services.json",
      "package": "de.solebich.app",
      "versionCode": 42,
      "permissions": [
        "READ_EXTERNAL_STORAGE",
        "WRITE_EXTERNAL_STORAGE",
        "CAMERA",
        "NOTIFICATIONS"
      ],
      "playStoreUrl": "https://play.google.com/store/apps/details?id=de.solebich.app",
      "config": {
        "googleMobileAdsAppId": "#########"
      }
    },
    "hooks": {
      "postPublish": [
        {
          "file": "sentry-expo/upload-sourcemaps",
          "config": {
            "organization": "solebich-gmbh",
            "project": "app-0b",
            "authToken": "####################################"
          }
        }
      ]
    },
    "platforms": [
      "android",
      "ios",
      "web"
    ],
    "extra": {
      "eas": {
        "projectId": "##########-#########-#########"
      }
    }
  }
}

Also the facebook login stopped working and i get the error:

[Unhandled promise rejection: Error: Cannot use the AuthSession proxy because the project full name is not defined. Please ensure you have the latest version of expo-constants installed and rebuild your native app. You can verify that originalFullName is defined by running expo config --type public and inspecting the output.]

I expected it to build and work correctly.

In the documentation for SDK 48 i find the following:

The URI redirect must be added to your app.config.js or app.json as facebookScheme: 'fb<YOUR FBID>'.

https://docs.expo.dev/versions/latest/sdk/auth-session/#facebook

1

There are 1 answers

1
FaysalB On

You need to have the following in your plugins array:


[
        "react-native-fbsdk-next",
        {
          "appID": "appid",
          "clientToken": "clienttoken",
          "displayName": "appname",
          "scheme": "fb appid",
          "advertiserIDCollectionEnabled": false,
          "autoLogAppEventsEnabled": false,
          "isAutoInitEnabled": true,
          "iosUserTrackingPermission": "This identifier will be used to deliver personalized ads to you."
        }
      ],

This is regarding facebook login, and remove whatever you had earlier