-
Notifications
You must be signed in to change notification settings - Fork 874
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
docRef.get() fails with FirebaseError: false for 'get' @ L5 #3686
Comments
Your tests look good. The second test case name is misleading though -- based on the test you wrote, I assume you're asserting that a user can read their own private post instead. But either way, the issue should be within your security rules. Would you mind posting your security rules here? And to get your started, can you verify that your rules has been updated to allow reads from anyone in the |
@yuchenshi Thank you very much. I changed the rule for verifying your suggestion to
Please make the error handling for issues like this more clear to the dev because it is not clear where to look and I spent a lot of time trying different setup's with firebase versions and so on. PS: the above tests are of course just for getting started but now I can start developing real tests :) Thank you! |
I think the error message can definitely be improved here. It's Would you mind filing a bug against the Firestore Emulator at https://github.com/firebase/firebase-tools and describe what information / error message would make it more actionable for you? I'm going to close this one since there is no action on the JS SDK itself, only Firestore Emulator. |
Sure. Here we go firebase/firebase-tools#2577 :) |
Describe your environment
Describe the problem
Running Security Rules Tests fail both with
FirebaseError: false for 'get' @ L5 at new FirestoreError (node_modules/@firebase/firestore/dist/index.node.cjs.js:1205:28) at fromRpcStatus (node_modules/@firebase/firestore/dist/index.node.cjs.js:5240:12) at fromWatchChange (node_modules/@firebase/firestore/dist/index.node.cjs.js:5476:35) at PersistentListenStream.onMessage (node_modules/@firebase/firestore/dist/index.node.cjs.js:15743:27) at /home/roman/projects/asd/test/security_rules/node_modules/@firebase/firestore/dist/index.node.cjs.js:15676:30 at /home/roman/projects/asd/test/security_rules/node_modules/@firebase/firestore/dist/index.node.cjs.js:15712:28 at /home/roman/projects/asd/test/security_rules/node_modules/@firebase/firestore/dist/index.node.cjs.js:14143:20 at processTicksAndRejections (internal/process/task_queues.js:93:5)
Steps to reproduce:
firebase emulators:start
npm test
Relevant Code:
package.json
test,js
The text was updated successfully, but these errors were encountered: