react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

[🐛][Expo][AppCheck] Unable to activate AppCheck in expo project

Open atanaskanchev opened this issue 3 years ago • 0 comments

Issue


I am unable to activate AppCheck in an Expo project following the provided instructions.

Steps:

  1. expo init
  2. yarn add @react-native-firebase/app @react-native-firebase/perf @react-native-firebase/crashlytics @react-native-firebase/app-check
  3. Generate and setup the FIREBASE_APP_CHECK_DEBUG_TOKEN for the Android app
  4. expo prebuild --clean
  5. eas build --profile development --platform android --local

Running on Android Emulator I get [Unhandled promise rejection: Error: [firestore/permission-denied] The caller does not have permission to execute the specified operation.]

Sample Github repo

Project Files

Javascript

Click To Expand

package.json:

{
  "name": "expo_rnfb",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@react-native-firebase/app": "~15.4.0",
    "@react-native-firebase/app-check": "^15.6.0",
    "@react-native-firebase/crashlytics": "~15.4.0",
    "@react-native-firebase/firestore": "^15.6.0",
    "@react-native-firebase/perf": "~15.4.0",
    "expo": "~46.0.9",
    "expo-build-properties": "~0.3.0",
    "expo-dev-client": "~1.2.1",
    "expo-splash-screen": "~0.16.2",
    "expo-status-bar": "~1.4.0",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-native": "0.69.5",
    "react-native-web": "~0.18.7"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

firebase.json for react-native-firebase v6:

# N/A

iOS

Click To Expand

ios/Podfile:

  • [ ] I'm not using Pods
  • [x] I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A

Android

Click To Expand

Have you converted to AndroidX?

  • [ ] my application is an AndroidX application?
  • [ ] I am using android/gradle.settings jetifier=true for Android compatibility?
  • [ ] I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->

Environment

Click To Expand

react-native info output:

 OUTPUT GOES HERE
  • Platform that you're experiencing the issue on:
    • [ ] iOS
    • [ ] Android
    • [ ] iOS but have not tested behavior on Android
    • [ ] Android but have not tested behavior on iOS
    • [ ] Both
  • react-native-firebase version you're using that has this issue:
    • e.g. 5.4.3
  • Firebase module(s) you're using that has the issue:
    • e.g. Instance ID
  • Are you using TypeScript?
    • Y/N & VERSION

atanaskanchev avatar Sep 21 '22 19:09 atanaskanchev