Version
v26.4.0
Platform
Linux archbtw 7.1.3-arch2-2 #1 SMP PREEMPT_DYNAMIC Thu, 16 Jul 2026 17:41:28 +0000 x86_64 GNU/Linux
Subsystem
Crypto
What steps will reproduce the bug?
let key = scryptSync('hello', 'salt', 24)
let init_vector = randomFillSync(new Uint8Array(16))
const cipher = createCipheriv('aes-192-cbc', key, init_vector);
let encrypted = cipher.update('some clear text data', 'utf8', 'hex');
encrypted += cipher.final('utf8');
What is the expected behavior? Why is that the expected behavior?
The error should be handled gracefully and reported to the user.
What do you see instead?
Uncaught Error [ERR_INTERNAL_ASSERTION]: Cannot change encoding
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
at assert.fail (node:internal/assert:17:9)
at getDecoder (node:internal/crypto/cipher:101:12)
at Cipheriv.final (node:internal/crypto/cipher:175:21) {
code: 'ERR_INTERNAL_ASSERTION'
Version
v26.4.0
Platform
Subsystem
Crypto
What steps will reproduce the bug?
What is the expected behavior? Why is that the expected behavior?
The error should be handled gracefully and reported to the user.
What do you see instead?