I initialized the SDK Admin in my code, but when I call an admin function it complains about credentials and tokens. Any idea what this could be caused by?
var serviceAccount = require('../../../path to the actual json file);
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: 'https://<name of my database>.firebaseio.com'
});
Output
Error fetching user data: Error: Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "Error fetching access token: Error while making request: incorrect header check. Error code: Z_DATA_ERROR".
at FirebaseAppError.FirebaseError [as constructor] (error.js?8304:42)
at FirebaseAppError.PrefixedFirebaseError [as constructor] (error.js?8304:88)
at new FirebaseAppError (error.js?8304:122)
at eval (firebase-app.js?0db4:121)