-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
serve() error: "Uncaught InvalidData" #7891
Comments
This is exactly what I am thinking too. This could definitely use a more helpful error message. |
Just verified: indeed it is the case that if |
If anyone could point me in the right direction, I'd be happy to investigate and see if I can come up with a solution. Where could I start looking for where this error might be occurring? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I've been trying to run Deno in Google Cloud Run and while I could get my code to run locally using Docker, I kept getting the same error when trying to run in Cloud Run.
Code:
The errors I received in Cloud Run are (may be a bit messed up, I tried unescaping the logs):
My Dockerfile is:
This Dockerfile worked fine locally but I got an error when using in CloudRun. I was able to resolve the error by changing the argument to
serve()
to a string, like this:I'm not sure quite what's happening, but it appears the validation is failing when passing in an object as the argument with the same data as the string.
From digging around in the source, it seems like this may be where the error is coming from.
Theory: The biggest difference between Cloud Run and my local setup is that Cloud Run pulls the value of
PORT
from an environment variable, which makes it a string, whereas my fallback value is a number (used locally). So, my guess is that somewhere in Deno, there is code expecting a number for the port, and when that check fails, this error occurs. I don't have the time to look at this further tonight but I can check tomorrow.The text was updated successfully, but these errors were encountered: