-
Notifications
You must be signed in to change notification settings - Fork 63
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
GRPC-JS Error: Metadata key contains illegal characters #527
Comments
Thank you for opening this issue. I'm transferring the issue to nodejs-logging since interactions with the logging API are not done by this library but are instead done using the |
Hi @daaain can I ask what version of |
@callmehiphop just had a look, apparently it was an older version according to
I'll bump the version and report back! |
Wait, it looks like that fix was in The thing I noticed though is that it fixes encoding for values, but not keys, so maybe that's the issue? I honestly have no idea where these non-ASCII characters come from and not sure if URL encoding them would help, but I guess it's still better to have normalised strings for keys than the library exploding 🤷♀ Edit: oh no, it's only the test which tests for values only, but the actual method does encode the keys too... |
Oh, and also noticed that googleapis/nodejs-datastore#415 and googleapis/nodejs-pubsub#667 and googleapis/nodejs-pubsub#680 are similar, but wondering if the issue is solved for those guys after all? |
@daaain oh whoops, that was a typo on my part, |
This fix includes grpc/grpc-node#962 which is a work around for a bad metadata keys problem that many customer see across several libraries (googleapis/nodejs-datastore#415, googleapis/nodejs-logging#527, googleapis/nodejs-pubsub#667 are just a few).
This fix includes grpc/grpc-node#962 which is a work around for a bad metadata keys problem that many customer see across several libraries (googleapis/nodejs-datastore#415, googleapis/nodejs-logging#527, googleapis/nodejs-pubsub#667 are just a few).
Hi @daaain, We have released google-gax v1.1.5 that pulls @grpc/grpc-js v0.5.2 in which the invalid headers (that are coming from Node.js http2 module) are printed in a warning, but do not throw exception. Please upgrade your dependencies, it should fix the problem for you. |
Environment details
node:10.15.0
Docker image)@google-cloud/logging-winston
version: 1.1.0Steps to reproduce
I've been seeing this error coming up sporadically, with different characters in the key each time:
It only appeared once we had a deployment with logging using this library, so I'm pretty sure it's the logging transport, but can't be 100% as the stack trace starts in the
grpc-js
dependency.Since I don't know where it is coming from, I don't really know how debug it. I'm guessing because the work is offloaded to the next tick I wouldn't even be able to catch the library error in my client code either 🤷♀
I found this related upstream issue: grpc/grpc-node#519
The text was updated successfully, but these errors were encountered: