how to solve Curl error: HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
ThuretGbenougan opened this issue · comments
Thuret commented
Curl error: HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
Short Description:
- when i try to execute this $ticker = $api->prices(), i have Curl error: HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1). i use laravel v8
Platform:
- windows
php version:
- 8.1.3
code in my controller
use Binance\API;
$api = new \API("<api key>","<secret>");
$ticker = $api->prices();
print_r($ticker); // List prices of all symbols
result
Curl error: HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
thank you
Dave commented
Hi,
Can you please provide the extract stack tracce error.
It should look something along the lines of
[09-Jul-2013 18:26:16 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'The requested file does not exists.' in C:\sites\wonderfulproject\script.php:40
Stack trace:
#0 {main}
thrown in C:\sites\wonderfulproject\script.php on line 40
you can also downgrade to http1.1 by using
curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl protocol error usually is a system problem and not related to the application itself