firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.67k stars 1.49k forks source link

Remote Config Permission Denied Error #3378

Closed aodhol closed 5 years ago

aodhol commented 5 years ago

Environment

Describe the problem

Remote Config fetch results in an error:

Error Domain=com.google.remoteconfig.ErrorDomain Code=8003 "RCN Fetch Failure: Server returned error:code: 403. Status: PERMISSION_DENIED. Message: Requests to this API firebaseremoteconfig.googleapis.com method google.firebase.remoteconfig.v1.RemoteConfigService.FetchRemoteConfig are blocked." UserInfo={NSLocalizedDescription=RCN Fetch Failure: Server returned error:code: 403. Status: PERMISSION_DENIED. Message: Requests to this API firebaseremoteconfig.googleapis.com method google.firebase.remoteconfig.v1.RemoteConfigService.FetchRemoteConfig are blocked.}

The same issue is occurring for Auth.

Steps to reproduce:

Launch the App.

Note, prior to updating to the latest, from 4.0.0 all seemed fine and the live App is using that version...

google-oss-bot commented 5 years ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

morganchen12 commented 5 years ago

I suspect this is a project-scoped issue. You should file a ticket at Firebase Support and they'll be able to look at your project logs, including detailed error messages for why your requests are returning 403.

aodhol commented 5 years ago

@morganchen12 Thanks - I suspected as much and filed a ticket with them - the error might want to indicate this though, so that I wouldn't waste your time here :)

aodhol commented 5 years ago

@morganchen12 Unfortunately, the support team said the project is fine...

morganchen12 commented 5 years ago

Interesting. Are you able to reproduce this project using a different Firebase account in the same Xcode project?

aodhol commented 5 years ago

@morganchen12 I am able to reproduce, though they are paid for using the same card..

morganchen12 commented 5 years ago

I don't think payment method should affect this issue. Can you share your project, or a sample repro?

aodhol commented 5 years ago

@morganchen12 I can't, however, support has this info. Case 00002225

morganchen12 commented 5 years ago

Support only has the AppDelegate and your config files, all of which look fine. I was able to copy-paste your AppDelegate into the ABTesting quickstart after removing Branch, Braintree, and Crashlytics (and adding Auth and Messaging) and it ran without error.

Can you create a sample project that reproduces this or share a zip of your full project?

dmandar commented 5 years ago

@aodhol can you confirm if your bundleID in your googleservice-info.plist file is the same as the app you are making fetch requests from? Also, are you using Perf SDK as well?

aodhol commented 5 years ago

@dmandar Yes, they're the same and I'm not using the Perf SDK.

morganchen12 commented 5 years ago

Have you set any key restrictions on your API keys in Cloud console?

Kukiwon commented 5 years ago

I resolved this by replacing the existing GoogleService-Info.plist with a new one downloaded from Firebase (Project Settings -> Download latest Config file).

Looking at the changes between the old and the new file, I noticed that they API keys is different from my older version. This might be the cause of the 403 errors.

dmandar commented 5 years ago

@aodhol are you still seeing the issue? Can you make sure you have the latest GoogleService-Info.plist file as @Kukiwon mentioned?

aodhol commented 5 years ago

@dmandar It's not happening anymore and even without downloading the latest GoogleService-Info.plist so that may be a red-herring. I would like to get to the bottom of it, however..

dmandar commented 5 years ago

Thanks for confirming. Pls reopen if you are able to repro again.