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

surge ssl - 502 bad gateway / socket hang up / ECONNRESET #560

Open
bigoper opened this issue Mar 5, 2025 · 0 comments
Open

surge ssl - 502 bad gateway / socket hang up / ECONNRESET #560

bigoper opened this issue Mar 5, 2025 · 0 comments

Comments

@bigoper
Copy link

bigoper commented Mar 5, 2025

ISSUES

While trying to deploy an ssl certificate I'm facing one of the following two errors:

(venv) static % surge ssl   

(node:98749) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
         domain: emc2pdfa.emc-sq.com
       pem file: surge.pem
undefined:1
<html><body><h1>502 Bad Gateway</h1>
^

SyntaxError: Unexpected token '<', "<html><bod"... is not valid JSON
    at JSON.parse (<anonymous>)
    at Request.<anonymous> (/Users/aviivgi/.nvm/versions/node/v21.6.0/lib/node_modules/surge/lib/middleware/ssl.js:29:24)
    at Request.emit (node:events:531:35)
    at IncomingMessage.<anonymous> (/Users/aviivgi/.nvm/versions/node/v21.6.0/lib/node_modules/surge/node_modules/request/request.js:1073:12)
    at IncomingMessage.emit (node:events:519:28)
    at Readable.read (node:internal/streams/readable:780:10)
    at flow (node:internal/streams/readable:1281:53)
    at resume_ (node:internal/streams/readable:1260:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v21.6.0
(venv) static % surge ssl --pem ./surge.pem       

(node:64830) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
         domain: emc2pdfa.emc-sq.com
Error: socket hang up
    at TLSSocket.socketOnEnd (node:_http_client:516:23)
    at TLSSocket.emit (node:events:531:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'ECONNRESET'
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

1 participant