Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[firebase-app-check] Firestore: PERMISSION_DENIED error (android) #88

Closed
gookhans opened this issue May 18, 2022 · 2 comments
Closed

[firebase-app-check] Firestore: PERMISSION_DENIED error (android) #88

gookhans opened this issue May 18, 2022 · 2 comments

Comments

@gookhans
Copy link

I am using app-check for Firestore and Storage. I have a problem with Firestore(only android). When I send query to enforced Firestore, I get: Error: Uncaught (in promise): Error: PERMISSION_DENIED: Missing or insufficient permissions.

firestore and storage works fine with app-check on iOS,
storage works with app-check on Android.

My code:

   if (isAndroid) {
        AppCheck.setProviderFactory();
    }

    firebase()
        .initializeApp()
        .then((app) => {
            if (isAndroid) {
                firebase().appCheck().activate(true);
            }
    });

I even try run this code in angular main.ts for early activate, but I get same error.
What is the cause of the problem?
Thanks.

@triniwiz
Copy link
Member

Try the following , you can grab the token with the following cmd

adb logcat | grep DebugAppCheckProvider

@gookhans
Copy link
Author

Try the following , you can grab the token with the following cmd

adb logcat | grep DebugAppCheckProvider

I was trying on a real device when I get error.

I will try with debug provider on emulator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants