Wrangler 2 use with Worker. Connection abruptly disconnected

I upgraded to Wrangler 2 and in development, my connection errors out. Heres the message I’m getting in terminal.

/Users/devdan/Documents/NeverBackDown/fww/fww-cloudflare/workers/fww-live/training-plan-worker/node_modules/wrangler/wrangler-dist/cli.js:16259
            throw ex;
            ^

Error: read ECONNRESET
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20)
Emitted 'error' event on ClientHttp2Stream instance at:
    at emitErrorNT (node:internal/streams/destroy:164:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -54,
  code: 'ECONNRESET',
  syscall: 'read'
}

Node.js v17.1.0

The Worker behaves fine when I initially run npx wrangler dev but when I hit an endpoint on that Worker after it is up I get this error.

Thanks for any help.

1 Like

My initial response was “Did you find a solution?”

However, after some digging, I found wrangler dev --local has been working for me.

1 Like

I have not yet. But I have not got to work on this project in about a month… ugh!!!

However, next week I finally get to focus 100% of my free (hustle) time on it. So I will report back. I’ll try both again and see what happens.

Thanks for sharing what you found. I’m guessing this means you were having the same issue.

I encounter the same problem when my script attempts to fetch a video stream after exactly 1 minute.

C:\Users\kkm\wrangler_test\test\node_modules\wrangler\wrangler-dist\cli.js:26719
            throw a;
            ^

Error [ERR_HTTP2_STREAM_ERROR]: Stream closed with error code NGHTTP2_PROTOCOL_ERROR
    at new NodeError (node:internal/errors:399:5)
    at ClientHttp2Stream._destroy (node:internal/http2/core:2348:13)
    at _destroy (node:internal/streams/destroy:109:10)
    at ClientHttp2Stream.destroy (node:internal/streams/destroy:71:5)
    at Http2Stream.onStreamClose (node:internal/http2/core:551:12)
Emitted 'error' event on ClientHttp2Stream instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'ERR_HTTP2_STREAM_ERROR'
}

Node.js v18.14.1

But it works well with

Thanks, it works well.