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
stubbed response is delivered to application code with no response data, for some values of response data
Desired behavior:
stubbed response is delivered to application code with response data
How to reproduce:
Not sure what triggers this, but see the code, below. content is a large binary string. The request succeeds for some values of content, and fails for others. The difference might be the length (the failing cases are longer), or string content (the longer cases might have different bytes), or ??? The data is always correct here, in the call to cy.route().
The exception is ajax error 0, null response. I've been trying to trace the stub code, but haven't yet been able to understand how it works.
I see that the request is amended with X-Cypress-Response. I wasn't able to trace it past there, or work backward from the exception. It seems that things have already gone sour before the stack trace that leads to the exception (i.e. the response has been delivered as null, which triggers the stack trace that eventually throws on the null).
I found the proxy code in xhrs.js, and also noted the requests in the terminal log. In the failing case, the request is never logged, and adding more instrumentation in xhrs.js suggests the request is never making it to the server.
I have a suspicion that the browser or proxy has a header size limit.
Update:
If it is a header limit, a workaround might be to redirect to a data URI, but I haven't found a hook that allows manipulation of the routed xhr before it is opened.
Is this a Feature or Bug?
bug
Current behavior:
stubbed response is delivered to application code with no response data, for some values of response data
Desired behavior:
stubbed response is delivered to application code with response data
How to reproduce:
Not sure what triggers this, but see the code, below.
content
is a large binary string. The request succeeds for some values ofcontent
, and fails for others. The difference might be the length (the failing cases are longer), or string content (the longer cases might have different bytes), or ??? The data is always correct here, in the call tocy.route()
.The exception is
ajax error 0, null response
. I've been trying to trace the stub code, but haven't yet been able to understand how it works.I see that the request is amended with
X-Cypress-Response
. I wasn't able to trace it past there, or work backward from the exception. It seems that things have already gone sour before the stack trace that leads to the exception (i.e. the response has been delivered as null, which triggers the stack trace that eventually throws on the null).Test code:
The text was updated successfully, but these errors were encountered: