Skip to content Skip to sidebar Skip to footer

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:

  1. Download the secret key from the firebase console.

enter image description here

  1. Save the downloaded .json file in the path "./your project path/functions".

  2. 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"
    });
    

enter image description here

  1. Deploy the function.

Post a Comment for "How To Fix "missing Or Insufficient Permissions At Http2callstream""