You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
no intercept: This test succeeds, the response is loaded correctly from the server.
intercept without stub: This test fails. The request is intercepted but not stubbed. The response that arrives in the browser is {} or [123, 125] when interpreted as ArrayBuffer, instead of the response that the server delivers.
intercept with stub: This test fails. The request is intercepted and a stub is returned. The response that arrives in the browser is {} or [123, 125] when interpreted as ArrayBuffer, instead of the stub supplied to the intercept.
Did some digging and found the issue causing intercept to corrupt the response. See draft #16755. With this change the second test "intercept without stub" in the reproduction project passes (while the third one still fails).
The code for this is done in cypress-io/cypress#16755, but has yet to be released.
We'll update this issue and reference the changelog when it's released.
Current behavior
application/octet-stream
) the response is corrupted bycy.intercept
.ArrayBuffer
it is interpreted as JSON.Desired behavior
ArrayBuffer
to an intercept stub.Test code to reproduce
Reproduction code is here: https://github.com/simfeld/cypress-intercept-binary. There are three tests:
{}
or[123, 125]
when interpreted asArrayBuffer
, instead of the response that the server delivers.{}
or[123, 125]
when interpreted asArrayBuffer
, instead of the stub supplied to the intercept.Versions
Latest version as of filing this issue (
7.4.0
)Related issues
This issue is possibly related: #15038
The text was updated successfully, but these errors were encountered: