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

TypeError: terminated #3808

Closed
Salientekill opened this issue Nov 7, 2024 · 2 comments
Closed

TypeError: terminated #3808

Salientekill opened this issue Nov 7, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Salientekill
Copy link

Bug Description

TypeError: terminated

Reproducible By

TypeError: terminated
at Fetch.onAborted (/home/ubuntu/api/node_modules/undici/lib/web/fetch/index
.js:2046:49)
at Fetch.emit (node:events:520:28)
at Fetch.terminate (/home/ubuntu/api/node_modules/undici/lib/web/fetch/index
.js:93:10)
at Object.onError (/home/ubuntu/api/node_modules/undici/lib/web/fetch/index.
js:2231:34)
at Request.onError (/home/ubuntu/api/node_modules/undici/lib/core/request.js
:299:27)
at Object.errorRequest (/home/ubuntu/api/node_modules/undici/lib/core/util.j
s:638:13)
at TLSSocket. (/home/ubuntu/api/node_modules/undici/lib/dispatche
r/client-h1.js:736:12)
at TLSSocket.emit (node:events:532:35)
at node:net:337:12
at Socket.done (node:_tls_wrap:650:7) {
[cause]: ResponseContentLengthMismatchError: Response body length does not mat
ch content-length header
at Parser.onMessageComplete (/home/ubuntu/api/node_modules/undici/lib/disp
atcher/client-h1.js:601:28)
at TLSSocket. (/home/ubuntu/api/node_modules/undici/lib/dispatc
her/client-h1.js:697:14)
at TLSSocket.emit (node:events:532:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:90
:21) {
code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'
}
}

Expected Behavior

Logs & Screenshots

TypeError: terminated
at Fetch.onAborted (/home/ubuntu/api/node_modules/undici/lib/web/fetch/index
.js:2046:49)
at Fetch.emit (node:events:520:28)
at Fetch.terminate (/home/ubuntu/api/node_modules/undici/lib/web/fetch/index
.js:93:10)
at Object.onError (/home/ubuntu/api/node_modules/undici/lib/web/fetch/index.
js:2231:34)
at Request.onError (/home/ubuntu/api/node_modules/undici/lib/core/request.js
:299:27)
at Object.errorRequest (/home/ubuntu/api/node_modules/undici/lib/core/util.j
s:638:13)
at TLSSocket. (/home/ubuntu/api/node_modules/undici/lib/dispatche
r/client-h1.js:736:12)
at TLSSocket.emit (node:events:532:35)
at node:net:337:12
at Socket.done (node:_tls_wrap:650:7) {
[cause]: ResponseContentLengthMismatchError: Response body length does not mat
ch content-length header
at Parser.onMessageComplete (/home/ubuntu/api/node_modules/undici/lib/disp
atcher/client-h1.js:601:28)
at TLSSocket. (/home/ubuntu/api/node_modules/undici/lib/dispatc
her/client-h1.js:697:14)
at TLSSocket.emit (node:events:532:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:90
:21) {
code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'
}
}

Environment

Additional context

@Salientekill Salientekill added the bug Something isn't working label Nov 7, 2024
@Uzlopak
Copy link
Contributor

Uzlopak commented Nov 7, 2024

Please provide a reproduction.

@Uzlopak
Copy link
Contributor

Uzlopak commented Nov 7, 2024

I think this is Related to #3343 and #3764. The response body is encoded twice, and because the order is wrong, the content is not correctly decoded, resulting in an empty body => 0 is differnt then the content-length sent with the response.

@Uzlopak Uzlopak closed this as completed Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants