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.Dismiss alert
The response body is not always displayed in the console props for xhr requests. There appears to be a race condition between the xhr request finishing and the proxy sending the response:received event.
The code for this is done in cypress-io/cypress#21373, but has yet to be released.
We'll update this issue and reference the changelog when it's released.
Current behavior
The response body is not always displayed in the console props for xhr requests. There appears to be a race condition between the xhr request finishing and the proxy sending the
response:received
event.Proxy sends the
response:received
event:cypress/packages/proxy/lib/http/request-middleware.ts
Lines 51 to 57 in aa6f3b8
Call made to update the console props after receiving the event:
cypress/packages/driver/src/cypress/proxy-logging.ts
Line 336 in aa6f3b8
Console props are updated with the xhr values. However, if the xhr isn't fully complete (i.e. readystate === DONE), then these values are not valid.
cypress/packages/driver/src/cypress/proxy-logging.ts
Lines 226 to 231 in aa6f3b8
This is causing flake in the following test:
Correct console props:
Incorrect console props:
Desired behavior
Console props always contains the xhr response body.
Test code to reproduce
Run the following test multiple times until it fails:
cypress/packages/driver/cypress/integration/cypress/proxy-logging_spec.ts
Line 153 in aa6f3b8
Cypress Version
develop
Other
No response
The text was updated successfully, but these errors were encountered: