[Webkit-unassigned] [Bug 251002] New: Web Inspector: "An error occurred trying to load this resource" and/or no request preview for beacons and some XHRs in Network tab
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 23 02:49:18 PST 2023
Bug ID: 251002
Summary: Web Inspector: "An error occurred trying to load this
resource" and/or no request preview for beacons and
some XHRs in Network tab
Version: Safari 16
Component: Web Inspector
Assignee: webkit-unassigned at lists.webkit.org
Reporter: otto.giesenfeld at comprend.com
CC: inspector-bugzilla-changes at group.apple.com
Created attachment 464603
It seems that there are issues with the Preview tab under the Network tab for Beacon and XHR requests. The issues may or may not affect only POST requests.
One quick guess is that it has something to do with situations when either request length or response length is zero.
There are two symptoms, which can occur separately or together, and which both affect the Preview pane for an individual request under the Network tab:
* The pop-up menu at the top right-hand side is unavailable (the menu with the options "Request", "Request (object tree)", and "Response"). In case of POST requests with a non-zero request length, this is problematic, as there is consequently no way of inspecting the request payload.
* The preview pane shows the message "An error occurred trying to load this resource", even though the Headers pane indicates that the request was successful. This is confusing, but otherwise not a big issue.
The website https://www.comprend.com currently exhibits the symptoms in all three combinations. (It may be necessary to consent to tracking cookies to make the problematic requests happen.)
1. Beacon POST requests with response status 202, non-zero request length and zero response length. The "Request" / "Request (object tree)" / "Response" pop-up is unavailable and the Preview pane shows "An error occurred trying to load this resource". Resource name is "ppms.php". I cannot find any way of inspecting the request payload (usually a few hundred bytes) in Safari or Safari Technology Preview, which is problematic when debugging web applications. In the web inspector of Firefox, no errors are reported, and the request payload can easily be inspected. See attachments "piwik-preview.png" and "piwik-headers.png".
2. XHR POST requests with response status 200, zero request length and non-zero response length. The "Request" / "Request (object tree)" / "Response" pop-up is unavailable, but the Preview of the response (the characters "1x") is shown. This may possibly be considered a non-issue, as the request is zero-length, but it is somewhat confusing that there is no way of selecting a request preview for a POST request. (It would be expected that "Request" can be chosen, and that the inspector would indicate that the payload was empty.) Resource name "collect" and domain "www.google-analytics.com". N.b. that Google analytics mixes XHR requests and image requests, but there are usually some XHR requests. See attachment "google.png".
3. Beacon and XHR POST requests with response status 204, non-zero request length and no content-length header sent in the response. The Preview pane shows "An error occurred trying to load this resource", but the pop-up for choosing to view the request payload is available. The error message is confusing, as nothing else indicates a failed request. Resource name "collect" and domain "k.clarity.ms". Mostly XHR requests, but occasional beacon requests, with no difference in symptoms. See attachment "clarity.png".
Example number 1 above can also be examined at the https://piwik.pro website.
It might possibly be that https://bugs.webkit.org/show_bug.cgi?id=247229 refers to a related issue, but the symptoms in that case are not sufficiently clear to me to allow me to judge how likely it is that the bugs are caused by the same technical issue.
(It seems that only one attachment can be added when submitting a bug. I hope it will be possible to upload the others once the bug has been submitted.)
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-unassigned