-
Notifications
You must be signed in to change notification settings - Fork 369
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
Using verifyIdToken()` with the second argument causes serverless function to timeout #929
Comments
Can you reproduce the issue locally or in any other environment? Without a repro (or at least some error logs and more context) I don't think we can do much about this issue, since it works normally in our test environments. |
Weirdly, the issue cant be reproduced on a local machine. It only occurs when it's published on Netlify. broken: working: I think those logs are accessible if you have a Netlify account Here are some example headers which can be used against both endpoints;
Cant guarantee that test JWT will be usable for long term though. |
Can't really speculate as to why something wouldn't work in a specific environment. Have you tried reaching out to the Netlify Support or developer community? |
I have indeed, I've posted the same issue on the Netlify community forums - https://community.netlify.com/t/netlify-function-timeout-after-10-seconds-when-published/18220 And I've spent a few hours troubleshooting this issue on the Firebase slack where we were able to pinpoint the issue to that |
Ok, that forum post actually helped.
You need to clean up the App instance ( This is not required in most environments. But it appears it's required in Netlify. |
nice, that worked! I included It does seem like quite a daunting method to call though, just my own personal thoughts. However, thank you helping me finally get to bottom of this issue. |
Yeah, it's not the best name, but we are stuck with it for historical reasons. Most applications don't need to call it explicitly (notably none of the Google Cloud Functions code require it). But some environments can be more picky about calling it. |
I’m having a similar timeout issue on Netlify, but when using the JavaScript Web SDK. Is there an equivalent |
We started to see this error at 2022-09-23 09:49:08.055 PDT in the firebase-admin@11.0.1 package, running in a node:16 container within GKE. Setting the |
Steps to reproduce:
Using
verifyIdToken(idToken, true)
with the second argument to check if the token has been revoked causes Netlify serverless Function to timeout.Relevant Code:
Publish the following code below to a Netlify function, then hit the endpoint which includes a valid JWT with an "Authorization" header and the lambda function will consistently timeout.
However if you remove the second argument from
verifyIdToken()
and republish the function again, there are no issue at all.The text was updated successfully, but these errors were encountered: