[GH-ISSUE #147] SpotifyWebAPIException: cURL transport error: 35 Encountered end of file in /var/app/current/public/vendor/jwilsson/spotify-web-api-php/src/Request.php:215 #92

Closed
opened 2026-02-27 19:26:00 +03:00 by kerem · 5 comments
Owner

Originally created by @csimpi on GitHub (Jan 21, 2019).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/147

Hi, I'm randomly getting this error message.
When I catch the SpotifyWebAPIException and trying to get the error code, I'm getting error code 0 and the message is below:
SpotifyWebAPI\SpotifyWebAPIException: cURL transport error: 35 Encountered end of file in /var/app/current/public/vendor/jwilsson/spotify-web-api-php/src/Request.php:215

Originally created by @csimpi on GitHub (Jan 21, 2019). Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/147 Hi, I'm randomly getting this error message. When I catch the `SpotifyWebAPIException` and trying to get the error code, I'm getting error code 0 and the message is below: `SpotifyWebAPI\SpotifyWebAPIException: cURL transport error: 35 Encountered end of file in /var/app/current/public/vendor/jwilsson/spotify-web-api-php/src/Request.php:215`
kerem closed this issue 2026-02-27 19:26:00 +03:00
Author
Owner

@jwilsson commented on GitHub (Jan 22, 2019):

Hi!
It looks like something with the TLS communication to Spotify is wrong. How are you running your app? Behind a proxy or something similar?

<!-- gh-comment-id:456537775 --> @jwilsson commented on GitHub (Jan 22, 2019): Hi! It looks like something with the TLS communication to Spotify is wrong. How are you running your app? Behind a proxy or something similar?
Author
Owner

@csimpi commented on GitHub (Jan 22, 2019):

Hi, thank you for your answer!
Yes, this is happening when I'm testing on AWS Elastic Beanstalk only, on my local I've never got this error.

<!-- gh-comment-id:456539006 --> @csimpi commented on GitHub (Jan 22, 2019): Hi, thank you for your answer! Yes, this is happening when I'm testing on AWS Elastic Beanstalk only, on my local I've never got this error.
Author
Owner

@jwilsson commented on GitHub (Jan 23, 2019):

Hmm, I found this issue which looks like the same type of error. Using some of the steps from there could you try adding these lines to the cURL options array here: github.com/jwilsson/spotify-web-api-php@4937bd7fd8/src/Request.php (L174)

$options = [
  ...
  CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4,
  CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1_2, // And try with CURL_SSLVERSION_TLSv1_1 as well (not really recommended, but just to try to narrow it down)
];

Could you try some combinations of those options and see what happens? Thanks!

<!-- gh-comment-id:456694404 --> @jwilsson commented on GitHub (Jan 23, 2019): Hmm, I found [this issue](https://github.com/googleapis/google-cloud-php/issues/91) which looks like the same type of error. Using some of the steps from there could you try adding these lines to the cURL options array here: https://github.com/jwilsson/spotify-web-api-php/blob/4937bd7fd8edd132debdf5ba49ca8cf4c50a1fe7/src/Request.php#L174 ```php $options = [ ... CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4, CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1_2, // And try with CURL_SSLVERSION_TLSv1_1 as well (not really recommended, but just to try to narrow it down) ]; ``` Could you try some combinations of those options and see what happens? Thanks!
Author
Owner

@csimpi commented on GitHub (Jan 23, 2019):

Hi thank you, I'll try them and let you know the results, I'm really glad you are trying to help me out :)

<!-- gh-comment-id:456865512 --> @csimpi commented on GitHub (Jan 23, 2019): Hi thank you, I'll try them and let you know the results, I'm really glad you are trying to help me out :)
Author
Owner

@jwilsson commented on GitHub (Mar 26, 2019):

Closing this due to a lack of activity.

<!-- gh-comment-id:476810304 --> @jwilsson commented on GitHub (Mar 26, 2019): Closing this due to a lack of activity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-web-api-php#92
No description provided.