-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Compat + emulators isn't working well #2932
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
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
Your Firestore and functions emulator tokens are in the wrong format. They’re inconsistent with auth, so you’re trying to hit prod with emulated credentials. Use
‘Tis a silly API I know but it’s the one that shipped 😉 |
Please reopen this issue@jamesdaniels I am not sure if this is correct. I started off with the Using your format will e.g. open the Auth pop-up at Also: How do you explain the "Permission denied" error I am receiving? I am not sure if I understand:
What are emulator-tokens here? Also:
I am not trying to hit production, I am trying to get Firestore working. As I stated, the Auth emulatore is working correctly with my configuration. What do you mean by "emulated" credentials? |
Change providers: [
// Firebase
{provide: USE_AUTH_EMULATOR, useValue: envFirebase.useEmulators ? ['http://localhost:9099'] : undefined},
{provide: USE_FUNCTIONS_EMULATOR, useValue: envFirebase.useEmulators ? ['http://localhost:5001'] : undefined},
{provide: USE_FIRESTORE_EMULATOR, useValue: envFirebase.useEmulators ? ['http://localhost:8080'] : undefined},
], to providers: [
// Firebase
{provide: USE_AUTH_EMULATOR, useValue: envFirebase.useEmulators ? ['http://localhost:9099'] : undefined},
{provide: USE_FUNCTIONS_EMULATOR, useValue: envFirebase.useEmulators ? ['localhost', 5001] : undefined},
{provide: USE_FIRESTORE_EMULATOR, useValue: envFirebase.useEmulators ? ['localhost', 8080] : undefined},
], |
@tja4472 Copy pasted your suggestion but I still get the same. I'm not seeing any logs in http://localhost:4000/firestore/requests Here are my rules from
This is what's set in "firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
}, Well.. the error message changed slightly but essentially I'm still getting "permission denied": |
I have now created a repository from scratch. There's a single button that you can use i.o. to try out the Google sign-in. If you want to reproduce the issue I have just clone https://github.com/falk-stefan/angularfire-i2932 |
I'm able to reproduce, it turns out my sample still had a v9 release candidate... this seems like an issue with the JS SDK however, I'll investigate. |
Updating my |
confirmed fixed, no trouble with your repo if firebase-tools is updated. |
@jamesdaniels Thanks a lot! 👍 |
Uh oh!
There was an error while loading. Please reload this page.
It's been two completely wasted days now. I have not the slightest idea what could be wrong with my setup or what kind of information I am missing here but please somebody put me out of my misery here.
Version info
Angular: 12
Firebase: 9.0.1
AngularFire: 7.0.3
Other (e.g. Ionic/Cordova, Node, browser, operating system):
Node: 16
How to reproduce these conditions
You can clone this repository and give it a try yourself.
I don't really know. All I did was run
firebase init
, and fire ap the base with:All I am trying to to is save a new user to the Firestore:
Using
Debug output
After the user got created in the Authentication Service I am seeing this in my console.
** Errors in the JavaScript console **
Also:
The interesting thing is that I see this in https://console.firebase.google.com/project/project/firestore/usage/last-24h/reads:
Even though I started using Emulators from the very beginning.
These are my Firestore settings:
which are the same as my local settings:
The text was updated successfully, but these errors were encountered: