-
Notifications
You must be signed in to change notification settings - Fork 227
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
UnhandledPromiseRejectionWarning: Error: Deadline exceeded #679
Comments
Seems to be working fine for me, @anguillanneuf any thoughts on why we might be timing out here? |
@dfang Do you get the same deadline exceeded error for a list subscription (can be in a project or a topic) operation? |
sometimes both but storage.js, copied to here to validate GOOGLE_APPLICATION_CREDENTIALS
|
Sorry @dfang I wasn't able to reproduce this error. To narrow down that this is a client library issue, do you want to try |
Just tried again.
run commands in the same iterm2 tab, bash shell, and source code downloaded from github, not modified. i've rewrite my cloud function with go, but i will keep these examples, let me know if you need more details for bug fix . |
Hi, I got the same error since I'd bump the version to I'm currently digging, will keep you in touch |
I confirm that this regression appear between Error appears in |
Interesting, @alexander-fenster @murgatroid99 any thoughts here? |
There is a comment in endCall(status) {
if (this.finalStatus === null) {
this.finalStatus = status;
/* We do this asynchronously to ensure that no async function is in the
* call stack when we return control to the application. If an async
* function is in the call stack, any exception thrown by the application
* (or our tests) will bubble up and turn into promise rejection, which
* will result in an UnhandledPromiseRejectionWarning. Because that is
* a warning, the error will be effectively swallowed and execution will
* continue */
process.nextTick(() => {
this.emit('status', status);
});
}
} @murgatroid99 so does that mean this unhandled rejection is expected? Can we do anything about it? |
@dfang My first guess would be some network / firewall problem. Pub/Sub library uses gRPC (works over HTTP/2) while storage sends plain old JSONs over HTTP/1. This does not explain why switching from But anyway, just to rule out the possible firewall problems, can you disable it temporarily (manual for OS X) and see if it works? Alternatively, try to do the same on another Mac or on Linux. The sample code likely works but something in your environment causes this timeout error ( |
after turn off firewall,
btw, my proxy works well
|
That code you quoted was supposed to stop these I'm actually going on vacation. Please ping me about this again when I'm back on the 29th. If you have a fix or something before that talk to Nico. |
Hey guys, Could it be related to proxy usage ? We got the issue only on production behind proxy. No problem in local. |
@alexbonhomme I had this idea as well (because @dfang also uses proxy, and also because I was never able to repro this without a proxy). It's a little bit unclear for me how @nicolasnoble / @murgatroid99 (when you're back): is there a change in behavior w/r/t using @dfang Do you have a way to try the code directly, not being behind a proxy? |
@alexander-fenster I'm in china, have to use proxy to access google api. develop on local and deployed it on google cloud functions. btw, i use shadowsocks to bypass GFW. |
Thanks @dfang, we're still trying to figure out what's going on here. I'll keep this issue updated. |
Hey guys, Any fix for this issue? Thanks, |
@mahaben are you getting the same exception, mind sharing a stack trace? I'm curious, are you running behind a proxy as well? |
@bcoe Thanks for your reply. Yes I'm running behind a proxy. Actually, this exception makes the app in a state of not receiving messages at all. Here the exception I got:
|
hey there, not behind a proxy but same issue:
|
Even I was able to replicate it when using the google ML npm module
Any fix for this yet? |
I've set up a local proxy to try to reproduce this (since it seems like a proxy was the common denominator for most of the reports) but I haven't had much luck so far. I'll keep it in my queue to look in more depth. |
My guess right now is that this is some sort of interaction between Node's HTTP/2 implementation and user proxies, but since none of us have been able to repro it here, I'm not sure there's much we can do. :( If anyone can give us detailed info about their proxies (especially if it's something open source like Squid) then we can try with that. |
The real issue is that this becomes an UnhandledPromiseException. Sure, errors happen, but they should not go unhandled. This completely breaks our logging solution. Any errors we catch we tag with the service and the right teams get notified. This error completely side-tracks the logs as it is send to stdout! Please fix this! |
Environment details
@google-cloud/pubsub
version: "^0.30.1",Steps to reproduce
followed this guide to config auth, tried at least 3 times.
I'm sure GOOGLE_APPLICATION_CREDENTIALS and service_account are properly configured.
because cloud-pubsub go examples works on my local laptop.
none of examples work at all. always got "Deadline exceeded"
btw, copied some code, deploy to cloud functions, can publish message to cloud pubsub
The text was updated successfully, but these errors were encountered: