-
Notifications
You must be signed in to change notification settings - Fork 897
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
8.6.2 breaks auth/firestore rules #4932
Comments
I can reproduce, I had to roll back k0swe/forester#395. Same symptom, |
Hi @mazlano27, I wasn't able to reproduce the error using the SDK version 8.6.2. Would you mind sharing a minimal, but complete sample project or code snippet that I can run locally to replicate the issue? Also, please include a sample Firestore security rules. |
I'm seeing this as well |
From 8.6.1 to 8.6.2 I see:
I believe its related to auth as well. |
I'm attempting to create a reproducible, minimal sample on Stackblitz, to no avail so far. Others, please feel free to fork it and see if we can isolate the issue. |
In the meantime, I have a reasonably simple reproduction with my real app:
Now to reproduce the undesired behavior:
Now that I think of it, the security rules for this Firestore are such that the logbook collection is accessed by an array of editor IDs. Maybe the Firestore client is short-circuiting the security check when it can't tell if reading the logbook will succeed? |
I have the same issue on my side. I've downgraded to 8.6.1 and it solves the issue. |
I couldn't write to Firestore. I've been fighting for hours thinking it was my fault. |
I have the same issue in my project. Hopefully there's a fix coming quickly. For now I pinned on an older version of firebase. |
Thanks for the repro app! I'll bring this up with the team, tracking internally at b/189114894 |
Perhaps related? angular/angularfire#2838 |
Facing the same issue in firebase version 9 beta 2 as well it seems the only way to fix it is to basically have the security rules set to if true, which is a bad idea. |
apparently adding the outhstate listener fixes my issue in particular. |
My guess would be that this is a "race-condition" due to how Firestore interacts with lazy-loaded Auth (per FWIW for v9 beta 2, we're taking a new approach in AngularFire (see 7.0.0-alpha.0) the main entries are no longer lazy-loaded, that will be entirely up to the developer now that we have tree-shaking. In the upcoming AngularFire 6.2 (angular/angularfire#2679) and 7.0.0-alpha.1 (compat) I'll have a proper work-around for lazy loaded auth+firestore, in that AngularFire will have lazy-loaded variant of AngularFirestore which will be able to force AngularFireAuth to be initialized prior to AngularFirestore (if it's being used). |
I'm still experiencing these symptoms as of v8.6.3 in k0swe/forester#412. |
FYI: I'm also experiencing this issue with v8.6.2 & v8.6.3. In my case the Firestore call is made from a lazy loaded module with a route guard. If it helps, I can share my repo with you @jamesdaniels |
Still facing this issue is 8.6.5 |
I'm getting the same error on any FireStore access attempt, but it ONLY happens in Chrome. Works fine in Firefox. |
I'm having the same issue with v8.6.7 too. Rolling back to 8.6.1 |
I'm also seeing this issue w/ @angular/fire and v8.6.7 |
I was experiencing this issue before with 8.6.2, and I downgraded to 8.6.1 until this problem was resolved... I've upgraded two Angular 12 projects to v8.6.7. The smaller project now works fine, however the (much) larger project still has the same errors, so there is definitely still a timing issue. |
@mazlano27 / @glued / @craigsheppard Can you provide debug logs (via |
In case it's still needed:
|
Still facing this issue is 8.6.7 |
Issue firebase/firebase-js-sdk#4932 is still a problem in Chrome.
Also still a problem in 8.6.8 |
same problem with angularfire 6.1.5 and firebase 8.6.8 but the raw firebase by it self works fine, so there is something going on with angularfire or both |
Nice sleuthing @Feiyang1 |
@xylo04 just wanted to make sure we actually fix this issue before closing it! 😃 So to verify, can you please try the staging release by All on this thread, if it is possible, can you please try |
Can confirm: |
Can confirm 8.7.0-2021528231051 is working in local environment and in deployed web app with SSR(I am also using angular/fire). Thank you @Feiyang1 |
@paulstelzer, @mazlano27 Thanks for confirming! Will close the issue once the release is out. |
@Feiyang1 8.7.0-2021528231051 works here too, thanks! |
We have similar issue with firebase real-time database. Can we confirm if the fix not just for forestore? @Feiyang1 thanks! |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
After upgrading from firebase 8.6.1 → 8.6.2, I get the "ERROR FirebaseError: Missing or insufficient permissions." error when trying to access protected docs/collections. Rolling back to 8.6.1 fixes the issue.
Steps to reproduce:
Upgrade from Firebase 8.6.1 → 8.6.2
My app is running on Angular 12
The text was updated successfully, but these errors were encountered: