0
votes

See the image

I used the firestore API to get data from FireBase. But encountered the error as above. I checked the read and write data on Cloud FireStore and found that read permission was allowed but I don't know why it still can't be done. Please help me. thank you so much.

This is my sample code: See the image

1
Please don't post screenshots of your code, or other textual content. Instead post the actual text, and use the formatting tools of Stack Overflow to mark it up. - Frank van Puffelen

1 Answers

0
votes

first, you should use catch method, to avoid unhandled promise error. So

.then(() => {}).catch((error) => console.log(error))

second if you got permission error, then you should set your firestore rules correctly. If you are in development state then i suggest set values true like this:

allow read, write : true;