firebase-admin-node: [bug] Fails to login firebase-admin after updating to 5.13.0

  • Operating System version: Windows 8.1
  • Firebase SDK version: 5.13.0
  • Library version: Unknown
  • Firebase Product: firebase-admin-node

Steps to reproduce:

After updating firebase-admin-node from 5.12.1 to 5.13.0, the library fails to recognize the service account that I put in (I checked and it is valid) and go back to check the default credentials.

UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.

Rolling back to 5.12.1 solves the issue.

Relevant Code:

import * as admin from 'firebase-admin';
const serviceAccount = require('../../service-account-key.json');

admin.initializeApp({
  credential: admin.credential.cert(serviceAccount),
  databaseURL: 'https://project.firebaseio.com'
});
const db = admin.firestore();
db.settings({timestampsInSnapshots: true});

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 16 (9 by maintainers)

Most upvoted comments

I’m seeing some regressions related to the new Firestore version. @schmidt-sebastian can you take a look? Following results are from my mac:

$ cat index.js
const Firestore = require('@google-cloud/firestore');
console.log('success');

$ npm install @google-cloud/firestore@0.15.2
$ node index.js 
assert.js:42
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: missing path
    at Module.require (module.js:594:3)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/hkj/Projects/firebase-admin-node/temp/node_modules/@google-cloud/firestore/build/src/index.js:24:20)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)

$ rm -r node_modules
$ npm install @google-cloud/firestore@0.14.0
$ node index.js 
success