Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.delete() not sufficient for node process to disconnect #859

one19 opened this issue May 23, 2018 · 2 comments

.delete() not sufficient for node process to disconnect #859

one19 opened this issue May 23, 2018 · 2 comments


Copy link

one19 commented May 23, 2018


  • Operating System version: MacOS 10.13.4
  • Environment: Node command line interface
  • Firebase SDK version: at least 4.4.0 and beyond
  • Firebase Product: database/auth


calling .delete() not sufficient for node process to disconnect.

Steps to reproduce:

What I've thought all along was a pretty standard use for a small cli module:

const ref = await firebase.initializeApp({...});
await ref.auth().signInWithEmailAndPassword(...);

const currentStatusObj = await ref

const newKey = await ref

await firebase
        ... multiple paths using path/newKey

return ref.delete()

Except ref.delete() doesn't allow the node process to exit. Ever.

I've had to hack around it with a process.exit() callback for a while now. But now I'm 11 messages into a firebase-functions support issue because using the firebase module in an isomorphic way (functions & cli) causes delays of 20 -> 40 seconds if you return early (even on a hot start). I'd love to narrow down the cause, and to see if this crazy hangup issue that Version 3.4.1 says was fixed is the culprit.

And, just to check, I removed the nice function wrappers and ref passing, and firebase still wouldn't exit on a nor does .goOffline()

Relevant Code: (isomorphic firebase interaction module) (function environment where it's not invoked via command line)

firebase web sandbox doesn't provide an adequate location for realizing use case of a node environment.

Copy link

a-xin commented Jun 26, 2018

I had a similar issue where node was not terminating. In my case, I had to also call auth().signOut():

const app = firebase.initializeApp(...);

  .then(() => firebase.database().goOffline())
  .then(() => firebase.auth().signOut())
  .then(() => app.delete())

Copy link

one19 commented Jun 28, 2018

ohmygosh i forgot that I had this as an open ticket! You're absolutely right, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

4 participants