Firebase admin sdk on Apple silicon not working

Viewed 414

I'm having problems with the firebase admin sdk on Apple silicon (m1 processor). I'm getting a Google auth error and I have not been able to understand what is causing the problem.

The same code works fine on my intel Mac.

I'm using Node js v15.4.0 which was built on my m1 machine. (I was not able to build v14). I suspect that the admin sdk does not work with node v15 bit I haven't confirmed that.

Has anyone encountered this problem or know why it is happening?

I get the following error when trying to read from firestore.

/Users/don/.nvm/versions/node/v15.4.0/bin/node /Users/don/Dropbox/Business/PicSaver/code/cloudfunctions/functions/lib/server.js uploads
Debugger listening on ws://127.0.0.1:60075/cf9ace29-cc18-4be3-bcc9-59b4b64ca470
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.

Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.
    at GoogleAuth.getApplicationDefaultAsync (/Users/don/Dropbox/Business/PicSaver/code/cloudfunctions/functions/node_modules/google-auth-library/build/src/auth/googleauth.js:157:19)
    at processTicksAndRejections (node:internal/process/task_queues:93:5)
    at async GoogleAuth.getClient (/Users/don/Dropbox/Business/PicSaver/code/cloudfunctions/functions/node_modules/google-auth-library/build/src/auth/googleauth.js:490:17)
    at async GrpcClient._getCredentials (/Users/don/Dropbox/Business/PicSaver/code/cloudfunctions/functions/node_modules/google-gax/build/src/grpc.js:87:24)
    at async GrpcClient.createStub (/Users/don/Dropbox/Business/PicSaver/code/cloudfunctions/functions/node_modules/google-gax/build/src/grpc.js:212:23)
Waiting for the debugger to disconnect...
0 Answers
Related