Closed
Description
- Operating System version: Windows 10
- Firebase SDK version: no SDK used
- Library version: [email protected]
- Firebase Product: Realtime database
[REQUIRED] Step 3: Describe the problem
I built a script to download data from the Realtime database, on Mac. Here things work fine. But when tested the script on Windows I get the following error:
@firebase/database: FIREBASE WARNING: {"code":"app/invalid-credential","message":"Credential implementation provided to initializeApp() via the \"credential\" property failed to fetch a valid Google OAuth2 access token with the following error: \"Failed to parse access token response: Error: Server responded with status 400.\"."}
Steps to reproduce:
Build a script that access data from Realtime database, using firebase-admin
. Run it on Windows.
Relevant Code:
var admin = require("firebase-admin");
var serviceAccount = require("./adminsdk.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://<project-id>.firebaseio.com"
});
var db = admin.database();
var dataRef = db.ref("ref");
Metadata
Metadata
Assignees
Labels
No labels