How To Fix "missing Or Insufficient Permissions At Http2callstream"
I'm trying to update firestore document from cloud function using nodejs, but getting error error Logs : Error: Missing or insufficient permissions. at Http2CallStream.call.on (/sr
Solution 1:
The problem was solved this way:
- Download the secret key from the firebase console.
Save the downloaded .json file in the path "./your project path/functions".
Add this code to the top of your index.js:
var serviceAccount = require("./[downloaded file name].json"); admin.initializeApp({ credential: admin.credential.cert(serviceAccount), databaseURL: "https://[your project id].firebaseio.com" });
- Deploy the function.
Post a Comment for "How To Fix "missing Or Insufficient Permissions At Http2callstream""