Skip to content
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

[OpenSSL Error] SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0 #6554

Open
1 task done
JavaJix opened this issue Sep 24, 2023 · 4 comments
Open
1 task done
Labels
B-bug Bug: general classification openssl S-verified Status: Verified by maintainer

Comments

@JavaJix
Copy link

JavaJix commented Sep 24, 2023

NOTE TO INSOMNIA TEAM: see #6554 (comment)

Expected Behavior

Making an https post with a query variable and a JSON body (with the CAR vin number) to the Peugeot site, should receive a JSON reply with the latest car version and if it needs an upgrade

Actual Behavior

When making the https post call Insomnia return the following error (works with postman):

Error: Failure when receiving data from the peer

Reproduction Steps

Post URL: https://api.groupe-psa.com/applications/majesticf/v1/getAvailableUpdate
Query variable: client_id=20a4cf7c-f5fb-41d5-9175-a6e23b9880e5
Json Body to post (i obscured my car VIN number for privacy):

{
"vin": "XXXXXXXXXXXXX",
"softwareTypes": [
{
"softwareType": "ovip-int-firmware-version"
},
{
"softwareType": "map-eur"
}
]
}

Is there an existing issue for this?

Additional Information

Mac Os Version: 13.6 22G120
Mac Studio with M2 Max (12C/38GPU) 32Gb ram and 512Gb ssd.

I've updated Curl and OpenSSL to the latest version with brew but the issue is still there.

Curl version: 8.3.0
OpenSSL version: 3.1.2 1 Aug 2023 (Library: OpenSSL 3.1.2 1 Aug 2023)

Below the timeline view:

POST /applications/majesticf/v1/getAvailableUpdate?client_id=20a4cf7c-f5fb-41d5-9175-a6e23b9880e5 HTTP/1.1
Host: api.groupe-psa.com
User-Agent: insomnia/2023.5.8
Content-Type: application/json
Accept: /
Content-Length: 165

| {
| "vin": "XXXXXXXXXXXXXXXXX",
| "softwareTypes": [
| {
| "softwareType": "ovip-int-firmware-version"
| },
| {
| "softwareType": "map-eur"
| }
| ]
| }

  • TLSv1.2 (IN), TLS header, Supplemental data (23):
  • Mark bundle as not supporting multiuse

< HTTP/1.1 200 OK
< Connection: close
< Expires: 0
< Cache-Control: no-store, no-cache, must-revalidate, private
< Content-Type: application/json
< Date: Sun, 24 Sep 2023 09:44:16 GMT
< X-Global-Transaction-ID: 945fb68f651004f01e36bccd
< User-Agent: insomnia/2023.5.8
< Set-Cookie: PSACountry=IT; Domain=.groupe-psa.com; Path=/
< Vary: Accept-Encoding

  • TLSv1.2 (IN), TLS header, Supplemental data (23):
  • Received 161 B chunk
  • TLSv1.2 (IN), TLS header, Supplemental data (23):
  • Received 4 B chunk
  • TLSv1.2 (IN), TLS header, Supplemental data (23):
  • Received 160 B chunk
  • TLSv1.2 (IN), TLS header, Supplemental data (23):
  • Received 165 B chunk
  • TLSv1.2 (IN), TLS header, Supplemental data (23):
  • Received 5 B chunk
  • TLSv1.2 (IN), TLS header, Supplemental data (23):
  • Received 161 B chunk
  • TLSv1.2 (IN), TLS header, Supplemental data (23):
  • Received 25 B chunk
  • TLSv1.2 (OUT), TLS header, Unknown (21):
  • TLSv1.2 (OUT), TLS alert, decode error (562):
  • OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0
  • Closing connection 0

Insomnia Version

2023.5.8

What operating system are you using?

macOS

Operating System Version

macOS 13.6 22G120

Installation method

download from insomnia site

Last Known Working Insomnia version

No response

@JavaJix JavaJix added B-bug Bug: general classification S-unverified Status: Unverified by maintainer labels Sep 24, 2023
@filfreire
Copy link
Member

@JavaJix thanks for reporting. I can also reproduce, used the following curl:

curl --request POST \
  --url 'https://api.groupe-psa.com/applications/majesticf/v1/getAvailableUpdate?client_id=20a4cf7c-f5fb-41d5-9175-a6e23b9880e5' \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: insomnia/8.0.0-beta.0' \
  --data '{
	"vin": "XXXXXXXXXXXXX",
	"softwareTypes": [
		{
			"softwareType": "ovip-int-firmware-version"
		},
		{
			"softwareType": "map-eur"
		}
	]
}'

Expected response:

{"requestResult":"Incorrect VIN format","vin":"XXXXXXXXXXXXX"}

But on insomnia we throw an error and see on the request timeline:

* OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0
* Closing connection 0

@filfreire filfreire changed the title OpenSSL Error on Mac [OpenSSL Error] SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0 Sep 27, 2023
@filfreire filfreire added S-verified Status: Verified by maintainer openssl and removed S-unverified Status: Unverified by maintainer labels Sep 27, 2023
@xlanor
Copy link

xlanor commented Oct 6, 2023

Try using an older version of insomnia. We ran into something very similar recently and a colleague eventually narrowed it down to the version of curl in insomnia having a regression introduced that was fixed in a subsequent build

A February build of insomnia worked for us. colleague would have PRed a change but it seems like the version numbers are hardcoded in multiple places making it challenging to patch

@HaardTrivedi
Copy link

Hi there, I am facing this issue as well and would love to see it resolved. It's a major blocker across the organization and the alternatives are not convenient

@kujon
Copy link

kujon commented Jan 4, 2024

I was getting exactly the same error:

TLSv1.2 (OUT), TLS header, Unknown (21):
TLSv1.2 (OUT), TLS alert, decode error (562):
OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Closing connection 0

on Insomnia 8.4.5 on Sonoma. Upgraded Insomnia to 8.5.1, and it turned into:

* SSLRead() return error -9806
* Closing connection 2

here's the request:

> GET /api/v1/commons/registers HTTP/1.1
> Host: membersinterests.org.uk
> User-Agent: insomnia/8.5.1
> Accept: application/json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: general classification openssl S-verified Status: Verified by maintainer
Projects
None yet
Development

No branches or pull requests

5 participants