question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

P0 issue: accessing .auth() throwing error that util.promisify() was not receiving a function! breaks several of our applications

See original GitHub issue

[REQUIRED] Step 2: Describe your environment

  • Operating System version: Linux (Heroku Dyno)
  • Firebase SDK version: ^9.0.0
  • Firebase Product: auth
  • Node.js version: 10.6.0
  • NPM version: 6.7.0

[REQUIRED] Step 3: Describe the problem:

My Heroku Server randomly started crashing recently and wont boot back up (even though it works perfectly fine locally). If I comment out const firebaseAdmin = firebaseApp.auth() , then it deploys with no crash, but as soon as I comment it back in, it crashes. This is breaking our applications and so this has become a P0 issue for us. Any help would be greatly appreciated. I will post screenshots of the error and the line of code I commented out that fixed the error. Thank you!

Steps to reproduce:

Deploy a heroku server and import the firebase-admin sdk and call the .auth() method with the same node and npm env. This issue has arisen within the past week, I’m not sure exactly when it started.

Relevant Code:

Error: Screen Shot 2021-05-25 at 7 20 00 PM

Fixed by commenting out: Screen Shot 2021-05-25 at 7 20 48 PM

I’ve gone through and tested it several times over, and consistently this ^ is the line of code causing it to crash.

Again this is NOT happening locally but for some reason only on a deployed heroku dyno instance.

Any help on this would be SUPER appreciated because it is currently breaking several of our apps

our firebaseApp firebase configuration has been working perfectly up until around last week and the error does not get thrown until .auth() is called so Im inclined to believe we have everything set up properly, unless something has changed recently about how it should all be setup configuration wise

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pfinazzocommented, May 26, 2021

I downgraded my firebase-admin package to 8.4.0 and it works, so hopefully that can help narrow it down! Something deployed between 8.4.0 and now is definitely the source of the issue!

0reactions
lahirumarambacommented, May 26, 2021

Updated the Node.js requirement in our package.json. The changes are now released with Admin SDK v9.9.0. @pfinazzo: Thank you for letting us know about this issue! Upgrading your node environment to 10.13.0 or higher should fix this. Please let us know if you run into further issues. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Runtime error "Type error: util.promisify is not a function" #485
I'm getting this error on my personal PC (not on my work machine), so it could very well be a local issue of...
Read more >
NodeJs util.promisify is not a function - Stack Overflow
The same error if var query = util.promisify(mysql.query);. I´m new programming but I'm trying to learn. javascript · mysql ...
Read more >
Node.js util.promisify() Method - GeeksforGeeks
It is basically used to convert a method that returns responses using a callback function to return responses in a promise object.
Read more >
Chapter 5: Technology and Privacy Policy
This paper first describes how accountability and anonymity can be balanced to allow user control as much as possible, community norms when the...
Read more >
Troubleshooting Node.js Deploys - Heroku Dev Center
Your Node.js deploy failed - now what? Start with these simple steps to troubleshoot a build issue. Check the buildpack. Is the app...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found