-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
UNAUTHENTICATED errors against Cloud Spanner emulator in v1.45.0 #29233
Comments
Same issue with https://github.com/googleads/google-ads-php. |
Is anyone looking into this? |
@HannahShiSFB Can you please take a look? |
Sure |
@HannahShiSFB Any early thoughts you could share? Is there currently any plans to fix this? |
This is caused by #25586 which removed insecure channel. Regardless whether Spanner connects to emulator or production server, gax-php always create a CredentialsWrapper (https://github.com/googleapis/gax-php/blob/v1.12.0/src/GapicClientTrait.php#L434) and add it to callstack (https://github.com/googleapis/gax-php/blob/v1.12.0/src/GapicClientTrait.php#L610). This PR uses an InsecureCredentialsWrapper which return null in getAuthorizationHeaderCallback so the credential callback will not be set, so this can work for emulator via an insecure channel. |
@dennycd @stanley-cheung I want to propose an easy fix of Spanner, but I can't fork https://github.com/googleapis/google-cloud-php and create a PR there. Could you help me with it? Thanks |
@HannahShiSFB I could probably help with it. Can you tell me what is the issue you're facing in creating a PR for |
sorry for the confusing. It works now. I will create a PR right now |
@HannahShiSFB Could you provide the link to this PR? |
I'm getting the same error against firestore emulator as well. Is there any workaround I can use? For instance how do I make the client use a "secured channel"? |
Based on googleapis/google-cloud-php#3911 (comment) it seems the workaround is to downgrade grpc. It did solve the problem for me. |
Thx for waiting. It's googleapis/google-cloud-php#5224 |
Closing the issue as it is fixed from cloud / spanner side. |
We have seen this error before in v1.36 #25810
What version of gRPC and what language are you using?
grpc v1.45.0
PHP
What operating system (Linux, Windows,...) and version?
Alpine Linux
What runtime / compiler are you using (e.g. python version or version of gcc)
PHP version: 8.0.17
What did you do?
Update grpc from 1.44.0 to 1.45.0 and run it against Spanner Emulator.
What did you expect to see?
No errors.
What did you see instead?
The text was updated successfully, but these errors were encountered: