Repository navigation
Description
Which @angular/* package(s) are the source of the bug?
common
Is this a regression?
No
Description
When using httpResource.arrayBuffer and have SSR enabled the arraybuffer is not copied correctly and the client is hydrated initially with an arraybuffer with length of 15 - [Object object] is what is returned when doing TextDecoder().Decode
the httpResource parse method is initially invoked with this 15 byte arraybuffer which can cause errors with custom parsers
This problem can be 'solved' be setting transferCache to false but you are now making 2 requests, 1 server - 1 client. it's also less ideal as data may have changed between those 2 requests occurring.
Please provide a link to a minimal reproduction of the bug
https://github.com/henrikse55/angular-httpresource-ssr
Please provide the exception or error you saw
None, it's completely silent and possibly breaks custom parse logic
Please provide the environment you discovered this bug in (run ng version)
Angular CLI : 21.1.2
Angular : 21.1.2
Node.js : 20.19.5
Package Manager : yarn 1.22.22
Operating System : linux x64
┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build │ 21.1.2 │ ^21.0.3 │
│ @angular/cli │ 21.1.2 │ ^21.0.3 │
│ @angular/common │ 21.1.2 │ ^21.0.0 │
│ @angular/compiler │ 21.1.2 │ ^21.0.0 │
│ @angular/compiler-cli │ 21.1.2 │ ^21.0.0 │
│ @angular/core │ 21.1.2 │ ^21.0.0 │
│ @angular/forms │ 21.1.2 │ ^21.0.0 │
│ @angular/platform-browser │ 21.1.2 │ ^21.0.0 │
│ @angular/platform-server │ 21.1.2 │ ^21.0.0 │
│ @angular/router │ 21.1.2 │ ^21.0.0 │
│ @angular/ssr │ 21.1.2 │ ^21.0.3 │
│ rxjs │ 7.8.2 │ ~7.8.0 │
│ typescript │ 5.9.3 │ ~5.9.2 │
│ vitest │ 4.0.18 │ ^4.0.8 │
└───────────────────────────┴───────────────────┴───────────────────┘
Anything else?
While excluded from the reproduction repo, httpResource.blob has the same issue in my experience
I noticed TransferState states dosen't support class types, this might be the cause?
I ran into this issue in a personal project exploring memorypack and generated ts types
Activity
SkyZeroZx commentedon Jan 29, 2026
I think issue is that ArrayBuffer and Blob are not JSON-serializable. When TransferState serializes the response body for hydration, these binary types get coerced to "[object Object]" which is then incorrectly passed to the client.
We can see in
transfer_cacheAlso ,
transfer_statesaysfix(http): support transfer cache for ArrayBuffer and Blob responses
fix(http): support transfer cache for ArrayBuffer and Blob responses
fix(http): correctly parse ArrayBuffer and Blob in transfer cache
fix(http): correctly parse ArrayBuffer and Blob in transfer cache
fix(http): correctly parse ArrayBuffer and Blob in transfer cache
fix(http): correctly parse ArrayBuffer and Blob in transfer cache
fix(http): correctly parse ArrayBuffer and Blob in transfer cache
angular-automatic-lock-bot commentedon Mar 12, 2026
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.