0

I am trying to use the queuing module base on top of Firebase. I use the following code to push tasks

import admin from "firebase-admin";


admin.initializeApp({
  credential: admin.credential.cert(process.env.GOOGLE_APPLICATION_CREDENTIALS),
  databaseURL: 'gs://xxx.appspot.com/'
});


var db = admin.database();
var ref = db.ref("queue");

ref.child('tasks').push({"name": "this is a push from the client"}).then(function(){ process.exit();});

But nothing is happening. The task is not pushed and the pushing task does not exit or throw any error

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
user567
  • 3,712
  • 9
  • 47
  • 80
  • Firebase Queue was essentially obsoleted by Cloud Functions. In fact, this is the very first thing you'll see in the [readme](https://github.com/FirebaseExtended/firebase-queue/). – Doug Stevenson May 13 '22 at 13:05

1 Answers1

0

This configuration looks wrong:

databaseURL: 'gs://xxx.appspot.com/'

URLs for the Realtime Database start with https:// and end with either firebaseio.com or firebasedatabase.app. So I recommend double checking the configuaration data in the Firebase console and grabbing the value from the correct key.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807