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
fix: SSL error when using the client with the emulator #297
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what's wrong, but when trying your code against the emulator, I still got errors:
E0226 11:38:32.777295000 4749241856 ssl_transport_security.cc:1439] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.
E0226 11:38:33.843773000 4749241856 ssl_transport_security.cc:1439] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.
E0226 11:38:35.286951000 4749241856 ssl_transport_security.cc:1439] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.
E0226 11:38:38.925703000 4749241856 ssl_transport_security.cc:1439] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.
And the emulator complains about:
[pubsub] INFO: Unknown request URI: /bad-request
[pubsub] Feb 26, 2021 11:39:01 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[pubsub] INFO: Detected non-HTTP/2 connection.
[pubsub] Feb 26, 2021 11:39:01 AM io.gapi.emulators.netty.NotFoundHandler handleRequest
[pubsub] INFO: Unknown request URI: /bad-request
My gcloud SDK version is 329.0.0.
@anguillanneuf Strange, I cannot reproduce this, it works just fine (both with gcloud SDK 327.0.0 and yours 329.0.0). Can you double check that it's indeed the code from the PR branch that is run and that I'm trying to figure out if and where our test setups differ.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plamut Ah I'm so sorry. I created a branch of the name plamut-iss-290
but I never pulled in your code. Your fix is working for me.
Fixed breaking changes introduced by gcloud-aio dependency. Note: Pinned google_cloud_pubsub~=2.2.0 in setup.py because of an SSL issue in the Pub/Sumb emulator. google_cloud_pubsub fix is merged, but not on pypi: googleapis/python-pubsub#297
Fixed breaking changes introduced by gcloud-aio dependency. Closes bmoscon#433 Note: Pinned google_cloud_pubsub~=2.2.0 in setup.py because of an SSL issue in the Pub/Sumb emulator. google_cloud_pubsub fix is merged, but not on pypi: googleapis/python-pubsub#297
Fixed breaking changes introduced by gcloud-aio dependency. Closes bmoscon#433 Note: Pinned google_cloud_pubsub~=2.2.0 in setup.py because of an SSL issue in the Pub/Sumb emulator. google_cloud_pubsub fix is merged, but not on pypi: googleapis/python-pubsub#297
Fixed breaking changes introduced by gcloud-aio dependency. Closes #433 Note: Pinned google_cloud_pubsub~=2.2.0 in setup.py because of an SSL issue in the Pub/Sumb emulator. google_cloud_pubsub fix is merged, but not on pypi: googleapis/python-pubsub#297
Fixes #290.
This PR makes sure that insecure gRPC channel is used when running against the emulator. To verify the fix, run the code example as described in the issue description.
The PR also includes a lot of unrelated synth changes in the second commit, but that's because #258 and #267 could not be merged yet, the CLA status is stuck. If this PR is merged, we could even close the other two.
PR checklist: