PHp 8.4 testcases are failing with SSL wrong version error
HeenaBansal20 opened this issue · 5 comments
HeenaBansal20 commented
testcases working with PHP 8.3 failing with PHP 8.4 with wrong version number error.
Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: cURL error 35: OpenSSL/3.0.2: error:0A00010B:SSL routines::wrong version number (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://gcpubsub:8538/v1/projects/project-gcps-beb18c354408c9820e2a1636000c9f60/topics/topic-gcpsa-beb18c354408c9820e2a1636000c9f60?%24alt=json%3Benum-encoding%3Dint in tests/google-pubsub/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:275
002+ Stack trace:
003+ #0 tests/google-pubsub/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(205): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
004+ #1 tests/google-pubsub/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(157): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlMultiHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
005+ #2 tests/google-pubsub/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(267): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlMultiHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
006+ #3 tests/google-pubsub/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(180): GuzzleHttp\Handler\CurlMultiHandler->processMessages()
007+ #4 tests/google-pubsub/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(206): GuzzleHttp\Handler\CurlMultiHandler->tick()
008+ #5 tests/google-pubsub/vendor/guzzlehttp/promises/src/Promise.php(251): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
009+ #6 tests/google-pubsub/vendor/guzzlehttp/promises/src/Promise.php(227): GuzzleHttp\Promise\Promise->invokeWaitFn()
010+ #7 tests/google-pubsub/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending()
011+ #8 tests/google-pubsub/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList()
012+ #9 tests/google-pubsub/vendor/guzzlehttp/promises/src/Promise.php(69): GuzzleHttp\Promise\Promise->waitIfPending()
013+ #10 tests/google-pubsub/vendor/google/cloud-pubsub/src/V1/Client/PublisherClient.php(346): GuzzleHttp\Promise\Promise->wait()
014+ #11 [internal function]: Google\Cloud\PubSub\V1\Client\PublisherClient->createTopic(Object(Google\Cloud\PubSub\V1\Topic), Array)
015+ #12 tests/google-pubsub/vendor/google/cloud-core/src/RequestHandler.php(118): call_user_func_array(Array, Array)
016+ #13 tests/google-pubsub/vendor/google/cloud-pubsub/src/Topic.php(252): Google\Cloud\Core\RequestHandler->sendRequest('Google\\Cloud\\Pu...', 'createTopic', Object(Google\Cloud\PubSub\V1\Topic), Array)
017+ #14 tests/google-pubsub/vendor/google/cloud-pubsub/src/PubSubClient.php(256): Google\Cloud\PubSub\Topic->create(Array)
018+ #15 tests/google-pubsub/pubsub-administrative.php(20): Google\Cloud\PubSub\PubSubClient->createTopic('topic-gcpsa-beb...')
019+ #16 tests/include/common.inc(11)
020+ #17 tests/google-pubsub/pubsub-administrative.php(14):
021+ #18 {main}
022+ thrown in tests/google-pubsub/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 275
PHP version : 8.4.0beta5.
I'll provide the testcase to reproduce issue shortly.
HeenaBansal20 commented
testcase to reproduce the issue:
use Google\Cloud\PubSub\PubSubClient;
use Google\Cloud\PubSub\Topic;
$projectId = 'project-pubsub-‘ . md5(time());
$topicName = 'topic-pubsub-‘ . md5(time());
$subscriptionName = 'sub-pubsub-‘ . md5(time());
$snapshotName = 'snap-pubsub-‘ . md5(time());
$credentials = __DIR__ . '/dummy_app_credentials.json';
use ($projectId, $credentials, $topicName, $subscriptionName, $snapshotName)
$pubsub = new PubSubClient([
'projectId' => $projectId,
'credentials' => $credentials,
]);
$topic = $pubsub->createTopic($topicName);
$subscription = $topic->subscribe($subscriptionName);
$snapshot = $pubsub->createSnapshot($snapshotName, $subscription);
try {
$topic->update([]);
} catch (Exception $ex) {
// fails - it's not implemented by the emulator
}
try {
$subscription->update([]);
} catch (Exception $ex) {
// fails - it's not implemented by the emulator
}
$snapshot->delete();
$subscription->delete();
$topic->delete();
HeenaBansal20 commented
composer lock file.txt
Composer lock file attached.
HeenaBansal20 commented
similar issue reported here but for me it is working in 8.3.11 php version with google/cloud-pubsub v2.5.2
bshaffer commented
Hello @HeenaBansal20 ! Thanks for logging this.
I will look into this, but just a few things that stood out to me looking at the error message
Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: cURL error 35: OpenSSL/3.0.2: error:0A00010B:SSL routines::wrong version number (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
Error 35 cURL error is usually an environmental error. See the curl docs for more info:
CURLE_SSL_CONNECT_ERROR (35)
A problem occurred somewhere in the SSL/TLS handshake. You really want the error buffer and read the message there as it pinpoints the problem slightly more. Could be certificates (file formats, paths, permissions), passwords, and others.
Additionally. here:
for https://gcpubsub:8538/v1/projects/project-gcps-beb18c354408c9820e2a1636000c9f60/topics/topic-gcpsa-beb18c354408c9820e2a1636000c9f60?%24alt=json%3Benum-encoding%3Dint in tests/google-pubsub/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:275
...where is this URL coming from? Why is the error being thrown in a guzzle test (CurlFactory.php
)?