-
-
Notifications
You must be signed in to change notification settings - Fork 34.8k
Open
Description
Version
v24.13.0
Platform
arwin Richards-MacBook-Air.local 25.2.0 Darwin Kernel Version 25.2.0: Tue Nov 18 21:09:55 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T8103 arm64
Subsystem
https
What steps will reproduce the bug?
The following script will fail:
const https = require('https')
const fs = require('fs')
const assert = require('assert')
const url = 'https://storage.googleapis.com/chrome-for-testing-public/145.0.7632.77/mac-arm64/chrome-mac-arm64.zip'
const request = https.request(url, response => {
const contentLength = response.headers['content-length']
response.pipe(fs.createWriteStream('test.zip'))
response.on('end', () => {
const stats = fs.statSync('test.zip')
assert.equal(stats.size, contentLength)
})
})
request.end()How often does it reproduce? Is there a required condition?
100% of the time.
What is the expected behavior? Why is that the expected behavior?
No error.
What do you see instead?
AssertionError [ERR_ASSERTION]: 170216693 == '170231101'
at IncomingMessage.<anonymous> (tmp.js:12:12)
at IncomingMessage.emit (node:events:520:35)
at endReadableNT (node:internal/streams/readable:1701:12)
at process.processTicksAndRejections (node:internal/process/task_queues:89:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 170216693,
expected: '170231101',
operator: '==',
diff: 'simple'
}
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels