`request` error `read ECONNRESET`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 880
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 68
Description
Bug Description
Probably this is not even a bug but is driving me crazy and i'm asking for help (or an hug)
Context is an Electron app based on Electron 22 and Node v16, sometimes POST or PATCH requests fail with read ECONNRESET error at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
Other requets work fine, this happens for some users, mostly - for what i've seen - connected to internet with a wireless connection that probably is not really stable, but the app works totally fine and is offline tolerant, the game they are playing on has a multiplayer module that needs to be connected to internet and don't lose the connection.
Axios or undici there is no difference, for same users, fails in the same way.
Among other things, the app sends a POST request in a certain moment - and it works - after a while, for other reasons, sends other POSTS requests and these fails for ECONNRESET.
I'm asking for help to understand how debug this, find a reliable reason or eventually fix it.
I've never reproduced this situation, considering the app has thousands concurrent users, this happens to a relatively small users portion, but still, it happens.
Posted data is pretty simple:
{"job_id":14039010,"event_type":"tollgate_paid","x":-5502.788726806641,"y":65.37895965576172,"z":28128.698669433594,"attributes":{"amount":6}}
Is something with keepAlive? TLS protocols? IP resolution? mixed IPV6/IPV4 network?
Thaks for your help and sorry if is not related.
Reproducible By
Expected Behavior
Logs & Screenshots
Environment
Electron 22
Node 16
Windows 11 or 10
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file, test, or reproducible sequence is named. Start by examining the undici request path used by the Electron 22 and Node 16 application, focusing on the failing POST/PATCH requests and the reported TLSWrap ECONNRESET logs. Done means producing a reliable reproduction or enough transport diagnostics to identify whether keep-alive, TLS, or address-family behavior is involved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript, nodejs
- Domain
- api, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100