-
Notifications
You must be signed in to change notification settings - Fork 8
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
BearerToken error handling fail #117
Comments
@hporchet do you have a reproducible example? I'd like to write a test around this if possible. It seems as though this could happen if there were nested/sequential Where are you seeing the problem manifest? |
I have seen this problem when i was on windows and the server return NOT_IMPLEMENTED to all grpc call. The request was correctly send but the not implemented raise a STATUS_EXCEPTION at the apply level. |
Hmm... That makes sense. We probably shouldn't be catching all |
I think a simple log of the error before call fail() on debug mode seems enough, it just need to be easily find when a problem occur. |
The cause of this, at least in my situation, is because I have other dependencies that also use protobufs, specifically firebase-admin. Google hasn't updated their clients yet to use protobufs v4. See grpc/grpc-java#11015. Because of that, the authzed client was hitting the protobufs-java v3 library pulled in by firebase-admin. I made a copy of the BearerToken object and added some logging and found this
isStringEmpty exists in GeneratedMessageV3 but wasn't added in GeneratedMessage until v4. The solution can be found on https://cloud.google.com/java/docs/bom#gradle, but the short version is to add the bom
to force Google cloud api dependencies to use protobufs v4. So far I'm not seeing any issues in firebase and the BearerToken is working again. |
Closing as a dependency issue unrelated to authzed-java |
I'm gonna reopen - @kylelutze's issue was related to a dependency, but @hporchet's issue was related to something else, and the behavior of catching all throwables in this code obscures the actual issue. I'm still not entirely sure what we should be catching there and I need to do some research. |
When the application of the metadata is in error, the fail method crash : apply() or fail() already called and hide the exception of the apply method.
The text was updated successfully, but these errors were encountered: