Skip to content
Advertisement

index.esm2017.js:370 Uncaught (in promise) FirebaseError: Missing or insufficient permissions in ReactJs

Complete error

JavaScript

Get https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel?database=projects%2Fnetflixclone-001%2Fdatabases%2F(default)&gsessionid=Il1qOZrt3xwI9HsitxL5j4_GdibS-ga9&VER=8&RID=rpc&SID=MgLGFVuM420X7FPF_SYqrg&CI=0&AID=0&TYPE=xmlhttp&zx=fhlml28c0sd1&t=1 net::ERR_FAILED 200

Rules(cloud firestone)

JavaScript

seedData Code(data.js)

JavaScript

firebase.prod.js class

JavaScript

All other pages working fine

Advertisement

Answer

Your security rules just do not allow anyone to read or write to your database. If your set your rule to true as shown below, it should allow your to write:

JavaScript

Now the problem is anyone on the internet can read or write to your series collection. It’s hard for me to write rules for this since there’s no detail about who can read/write to this collection. I’d recommend reading about Firestore Security Rules to restrict access to authorized users only.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement