Closed Bug 1883380 Opened 1 year ago Closed 2 months ago

XHRs manually resent via Devtools > Network don't show response

Categories

(DevTools :: Netmonitor, defect, P2)

Firefox 123
defect

Tracking

(firefox136 fixed)

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: mitya, Assigned: bomsy)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0

Steps to reproduce:

  1. Go to any webpage that fires an XHR
  2. Open dev tooks > network
  3. Cause the XHR to fire
  4. Highlight the XHR in the list of requests
  5. Right click, click either "resend" or "edit and resend" then "send"

Actual results:

The request is resent but the response is hidden, i.e. under the "Response" tab there's nothing (but for the original XHR, fired by the web page itself, the response is shown.) See attached video.

Expected results:

Response to be shown.

For whatever reason the video file I tried to attach didn't attach (though no feedback/error was given). Here it is: https://mitya.uk/firefox-issue.asf

The Bugbug bot thinks this bug should belong to the 'DevTools::Netmonitor' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Netmonitor
Product: Firefox → DevTools

Hello Mitya, we can't reproduce the issue easily, so maybe there's something specific about those requests that triggers the problem.
Would you be able to share the page you're seeing this on?
If not, can you tell us how the request is made, does it have credentials, is it done on a different domain than the page itself, …

Thanks!

Flags: needinfo?(mitya)

For me this happens on all sites and with all requests. I've disabled ad-blocker, in case that was it, but no difference.

Example: https://ecosia.org. If you open that URL with the network console open, you should see an XHR with a URI containing notifications?. That has a JSON response. If I right click and refire it, it sends the request, and it completes again with a 200, but the response tab says "No response data available for this request".

Flags: needinfo?(mitya)

Thanks for the additional details, we can reproduce with this website. It seems that the resent request is using slightly different headers compared to the original one (eg Sec-Fetch-Mode is set to no-cors instead of cors)

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2

Interesting. So should this be configured a bug? Surely "resend" should resend the request exactly "as was", same headers, same everything. Or did you mean the server is giving different headers in its response to the re-sent request?

Assignee: nobody → hmanilla
Status: NEW → ASSIGNED
See Also: → 1859272
Duplicate of this bug: 1859272

Hi Bomsy, not sure if you have seen the feedback from Valentin and Nicolas on the patch, could we make this move forward?

Flags: needinfo?(hmanilla)
Attachment #9391024 - Attachment description: WIP: Bug 1883380 - [devtools] Set the correct security contest to allow CORS mode set → Bug 1883380 - [devtools] Set the correct security context to allow CORS mode set r=#devtools
Attachment #9391024 - Attachment description: Bug 1883380 - [devtools] Set the correct security context to allow CORS mode set r=#devtools → Bug 1883380 - [devtools] Set the correct security context for the resent request based on the original request r=#devtools

(In reply to Julian Descottes [:jdescottes] from comment #9)

Hi Bomsy, not sure if you have seen the feedback from Valentin and Nicolas on the patch, could we make this move forward?

Apologies, got back to this.

Flags: needinfo?(hmanilla)
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3925e3794bb3 [devtools] Set the correct security context for the resent request based on the original request r=valentin,devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: