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

write EPROTO 4078382E9E7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354 #829

Open
carlomigueldy opened this issue May 27, 2024 · 3 comments

Comments

@carlomigueldy
Copy link

carlomigueldy commented May 27, 2024

Description

image

Called proposeTransaction on Base Sepolia Testnet to my Safe and it throws an exception about wrong version number on SSL related.

See gist here.

Environment

  • Safe Core SDK version:
    • @safe-global/api-kit = ^2.4.0
    • @safe-global/protocol-kit = ^4.0.0
    • @safe-global/safe-core-sdk-types = ^5.0.0
  • Safe contract version: 1.3.0+L2
  • Environment:
    • browser
    • non-browser

Steps to reproduce

Based on instructions given from Protocol Kit docs, given all valid parameters then just executing it on Safe that is on Base Sepolia Testnet. It will throw the exception.

See gist here.

Expected result

Throws this exception.

[App] - 5/27/2024, 11:16:32 PM   ERROR  [SafeAppService.proposeTransaction]: Error while proposing transaction request to https://safe-transaction-base-sepolia.safe.global/api/v1/safes/0x3DbE5B38d41394A756246997407408b421937c7B/multisig-transactions/ failed, reason: write EPROTO 4078382E9E7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:
 - {
  type: 'system',
  errno: 'EPROTO',
  code: 'EPROTO',
  stack: 'FetchError: request to https://safe-transaction-base-sepolia.safe.global/api/v1/safes/0x3DbE5B38d41394A756246997407408b421937c7B/multisig-transactions/ failed, reason: write EPROTO 4078382E9E7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:\n' +
    '\n' +
    '    at ClientRequest.<anonymous> (/home/carlomigueldy/dev/limitless-labs-group/limitless-exchange-api/node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js:1501:11)\n' +
    '    at ClientRequest.emit (node:events:519:28)\n' +
    '    at TLSSocket.socketErrorListener (node:_http_client:500:9)\n' +
    '    at TLSSocket.emit (node:events:519:28)\n' +
    '    at emitErrorNT (node:internal/streams/destroy:169:8)\n' +
    '    at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n' +
    '    at processTicksAndRejections (node:internal/process/task_queues:82:21)'
} +497ms

Additional context

#823 is a related ticket.

@dasanra
Copy link
Collaborator

dasanra commented May 28, 2024

I was testing locally but I'm not getting this error. The gist code looks good, and for the kind of error seems some configuration issues with node-fetch. Usually you get those when for example targeting a wrong port.

Are you using node-fetch for your project directly? Are you setting up some configuration that may interfere with the one in the api-kit?

@carlomigueldy
Copy link
Author

carlomigueldy commented May 28, 2024

@dasanra I didn't explicitly setup anything related to node-fetch. But one thing I did for Nest.js is using FastifyAdapter, could it be the the reason?

image

@dasanra
Copy link
Collaborator

dasanra commented May 28, 2024

Yes, it could be related. It seems an issue because FastifyAdapter is not configured to use HTTPS so tries to send the request via HTTP.

https://docs.nestjs.com/faq/multiple-servers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants