-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
ERROR FirebaseError: Missing or insufficient permissions. #2838
Comments
Partial progress! Maybe. I changed the app.component.html to include a
Now, when logged in, the So this SEEMS like some kind of state or timing issue? I've seen this has been reported twice before, but both issues were closed with no explanation that I could see. I also have seen this issue posted on StackExchange but the solutions do not seem to address the specific problem I am running into. |
I have the same problem since I updated Firebase to version 8.6.2. When I downgrade Firebase back to version 8.6.1, the problem is gone. |
I made some changes that seemed to (in theory) move the call to the database inside of the subscription to the auth call per the Firebase documentation. Result?
app.component.ts
app.component.html
|
I have solved the missing data issue, however, the app.component.ts
** app.component.html**
|
I'm seeing this issue too |
Same problem for me. Like @stenzengel suggest, downgrade to version 8.6.1 fix the problem. |
Reopened by request from @fatalcaron . |
My guess would be that it's the above linked firebase-js-sdk issue, I'll leave the issue open until we get a fix. |
Adding the auth state listener fixed my issue for some reason. |
Added a comment on the JS SDK issue that explains what I think is happening, in more depth, and how future AngularFire versions will ensure that this type of issue doesn't affect us in the future firebase/firebase-js-sdk#4932 (comment) |
|
Had the same issue and spent half the day trying to resolve before finding this open issue. reverting back to [email protected] from For some context, our code updates the user on Firestore as soon as credentials are passed to the client via |
If anyone still has issues on [email protected], reverting to the [email protected], that worked in an old git commit of mine, worked. Not sure how far up the issue begins though. |
This issue appears to be back in AngularFire 6.1.5, although the stack dump looks a little different this time:
Versions
Steps to ReproduceTo test this out, I built the most basic app I could following the:
Also, verified that this app works as expected if the firestore rules are changed to allow anonymous reads:
app.component.html
app.component.ts
QuestionShould be able to access Firestore as long as the user is authenticated, based on these Firestore rules?
|
Raw Firebase Works As Expected!With the following code, I have isolated this issue to (1) a bug (?) in AngularFire or (2) my inability to properly implement AngularFire in the code provided in my prior comment. app.component.ts
app.component.html
|
Modified the constructor on the app.component.ts
Browser console output
If there is anything else I can do to help isolate this issue, please let me know. Otherwise, I am giving up on AngularFire and reverting my project to raw Firebase for now so I can keep moving my project forward. |
Put test application into the following public GitHub repository. Posted on StackOverflow. Posted on Reddit. |
Thanks, Jeff - I can chime in with a "me too", and say that I was able to work around it by delaying my db subs via a significant I am also using |
As others have commented, the issue seems to be with |
I spent the last 5 hours debugging my code... I wish I have seen this thread earlier. |
only works on 8.6.1 for me |
same issue here, 8.6.1 works for me. |
Hi Did you find any solution for this? It is showing the same error for me. Already wasted two days but unable to find any solution. |
Hi @himalay-chauhan , no solution has been found for the version stated. However, many have confirmed that going back to version 8.6.1 works. At this point, that seems to be the best solution from what I have seen posted here. Good luck! |
Thanks @JeffThurston for quick response. I already tried that but I'm still getting the same error. |
I am finding that raw Firebase is working well for me, as noted in this comment. |
@JeffThurston Okay. I will try that too. Thanks! |
@JeffThurston It worked. Thank you very much! |
same problem here with the latest angularfire and firebase combined, 1st solution is to just downgrade firebase to 8.6.1. 2nd is to just use firebase and not angularfire. 3rd you can use both firebase and angularfire and not downgrade anything just add this code to your login service where you use signInwithEmailandPassword, |
FYI, the issue was fixed inside firebase lib (firebase/firebase-js-sdk#4932) and will be released with version 8.7.0. If you cannot wait, just install [email protected].
|
Closing as it's been fixed in the JS SDK. |
Version info
Angular:
Firebase:
Some have reported that version 8.6.2 exhibits these errors. See comments below.
AngularFire:
Other (e.g. Ionic/Cordova, Node, browser, operating system):
How to reproduce these conditions
Steps to set up and reproduce
Sample data and security rules
Sample data
Debug output
Errors in the JavaScript console
Expected behavior
If the rules are changed to allow unauthenticated reads, the output should look like this:
Actual behavior
The text was updated successfully, but these errors were encountered: