-
Notifications
You must be signed in to change notification settings - Fork 956
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
PERMISSION_DENIED in firebase emulator using Google Auth provider #3258
Comments
Same here... =/ |
I'm also having the same issue, just linking another issue here firebase/firebase-js-sdk#4721 |
@jean-smaug thanks for reporting this, just 2 follow up questions:
|
Not asked to me, but I can give my experience:
|
I can confirm what @pikax said.
|
For me at least, it only happens with v8.3.2 of the Firebase js sdk. 8.3.1 works fine against current tools, so it may be an sdk regression. |
Tested in |
Thanks for all the info everyone! Sounds like an issue with the JS SDK 8.3.2 release ... we're going to dig into it. |
Hi all, we've located the problem in Firestore Emulator and we are working on a fix. In the meantime, downgrading to Firestore JS SDK v8.3.1 is a possible workaround. |
This should be fixed in Firebase CLI v9.9.0. |
Solved by |
I'm still seeing this on |
@yuchenshi we are continuing to get reports of this issue, from @kroikie as well as here: Is there some other path we didn't consider? |
@kroikie Do you have a project where I could try to replicate the problem, or is it closed source? I'm struck by this, as Sam mentions, and wondering whether it's my system, my code, or what... |
@samtstern I'm also running into this issue with https://github.com/ideacrew/active-branch-tracker feel free to clone, then (after
Log in with I have a few rules related to auth, and so with the help of the super handy debug function, here's the firestore-deub.log has for the request object: Apr 21, 2021 4:05:46 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Apr 21, 2021 4:05:48 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Apr 21, 2021 4:05:48 PM com.google.net.webchannel.server.common.CorsFilter populateCustomHeaders
WARNING: Invalid $httpHeaders: X-Goog-Api-Client:gl-js/ fire/8.3.3
X-Firebase-GMPID:
Content-Type:text/plain
Authorization:Bearer eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJuYW1lIjoiVGVzdCBVc2VyIiwicGljdHVyZSI6Imh0dHBzOi8vaW1hZ2VzLnVuc3BsYXNoLmNvbS9waG90by0xNTM1NzEzODc1MDAyLWQxZDBjZjM3N2ZkZT9peGlkPU1Yd3hNakEzZkRCOE1IeHdhRzkwYnkxd1lXZGxmSHg4ZkdWdWZEQjhmSHclM0QmaXhsaWI9cmItMS4yLjEmYXV0bz1mb3JtYXQmZml0PWNyb3Amdz0xMDAmcT04MCIsInJvbGUiOiJhZG1pbiIsImVtYWlsIjoidGVzdHVzZXJAZXhhbXBsZS5jb20iLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImF1dGhfdGltZSI6MTYxOTAzNDMxMywidXNlcl9pZCI6InI5TWMwU2Fsc1VXNlEyblM0eDVudjd2UjdKZVMiLCJmaXJlYmFzZSI6eyJpZGVudGl0aWVzIjp7ImVtYWlsIjpbInRlc3R1c2VyQGV4YW1wbGUuY29tIl19LCJzaWduX2luX3Byb3ZpZGVyIjoicGFzc3dvcmQifSwiaWF0IjoxNjE5MDM0MzEzLCJleHAiOjE2MTkwMzc5MTMsImF1ZCI6ImFjdGl2ZS1icmFuY2hlcy1yZXBvcnQiLCJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vYWN0aXZlLWJyYW5jaGVzLXJlcG9ydCIsInN1YiI6InI5TWMwU2Fsc1VXNlEyblM0eDVudjd2UjdKZVMifQ.
map_value {
fields {
key: "auth"
value {
null_value: NULL_VALUE
}
}
fields {
key: "fields"
value {
null_value: NULL_VALUE
}
}
fields {
key: "headers"
value {
map_value {
}
}
}
fields {
key: "inTransaction"
value {
bool_value: false
}
}
fields {
key: "method"
value {
string_value: "get"
}
}
fields {
key: "path"
value {
path_value {
segments {
simple: "databases"
}
segments {
simple: "(default)"
}
segments {
simple: "documents"
}
segments {
simple: "users"
}
segments {
simple: "r9Mc0SalsUW6Q2nS4x5nv7vR7JeS"
}
}
}
}
fields {
key: "time"
value {
timestamp_value {
seconds: 1619035548
nanos: 467000000
}
}
}
}
Apr 21, 2021 4:05:48 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection. |
@akauppi @markgoho @kroikie we found the problem and have a fix. It's being fixed in two places: Right now neither fix has been released but when the next JS SDK and Emulator release go out either fix should be sufficient to stop this issue from happening. Right now the only workaround is to downgrade your JS SDK to 8.3.1 or lower, as mentioned. |
@samtstern Appreciating that the fix was found. Is there any estimate you can share about the release to the users? April or May? |
@akauppi can't promise anything! We don't have fixed release timelines. If you look at our history though you can see we do releases every 1-2 weeks: https://github.com/firebase/firebase-tools/releases So I don't think you'll have to wait long. |
I'm assuming it still hasn't been merged since I'm having this problem on a fresh project. One question though - how do I downgrade the JS SDK to 8.3.1 or lower? update: stupid me, it was the angular client. Downgraded, works great! |
Still have the issue with firebase cli 9.12.1. Had to downgrade firebase JS to 8.3.1 to make it work but with that version it tries to verify the user online and not with the emulator |
same issue here as well with "firebase": "^7.0 || ^8.0", |
Same here Firebase CLI: 9.16.5 Functions: firebase-admin: 9.11.0 Client: firebase: 8.10.0 Platform: MacOS Big Sur 11.5.2 UPDATE: solved with client 8.3.1 |
Hi! How is this still a thing? |
@gthemiller The original issue has been resolved and closed. Please kindly open a new issue and provide details using the template if you're still experiencing this issue. Thanks! |
Also still seeing this sporadically. One system it works fine, another request.auth is always null |
I fixed my issue this way:
The error disappeared :D |
@NayamAmarshe this is actually the correct answer and you win one internet. Also note that you may need to upgrade Java after doing this. The reason it works is that |
[REQUIRED] Environment info
firebase-tools:
9.8.0
Platform: MacOS Catalina 10.15.6
[REQUIRED] Test case
I'm trying to insert data in firebase firestore emulator.
I'm using two emulators : firestore and auth.
User is logged using Google auth provider. So I created a mock user that have Google as auth provider.
But I can't insert data with firestore auth rules.
[REQUIRED] Steps to reproduce
My app is a next.js app.
So
next start
andfirebase emulators:start
.In my code I try to do the following
[REQUIRED] Expected behavior
I'm expecting to have my data inserted -
[REQUIRED] Actual behavior
An error is sent
Here are the logs displayed in console
The text was updated successfully, but these errors were encountered: