Closed Bug 1713048 Opened 3 years ago Closed 3 years ago

can't access property "requestHeadersAvailable", request is undefined - Firefox developer

Categories

(DevTools :: Netmonitor, defect)

Firefox 89
defect

Tracking

(firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: rikiaji.dewa1, Assigned: bomsy)

Details

Attachments

(2 files)

Attached file firefoxnetwork.txt

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

Steps to reproduce:

I don't know the cause of this problem
what I do is open the network tab, open the inspector edit the html tag then open the network again, then the error appears

Actual results:

network error
can't access property "requestHeadersAvailable", request is undefined

Expected results:

network tab without error

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

Component: Untriaged → Netmonitor
Product: Firefox → DevTools

bomsy: to investigate and get better STRs

Flags: needinfo?(hmanilla)

Thanks for reporting!
Unfortunately i was not able to reproduce the issue.

Having said that, the stack-trace seems to tell the story of what might be the issue. When a panel is made visible (likely the netmonitor)
a forced update is triggered here and some how fires componentWillReceiveProps on the CustomRequestPanel component here but there is no request attached.

To prevent the crash we can make sure we try to fetchNetworkUpdatePacket only when there is a request available

--- a/devtools/client/netmonitor/src/components/CustomRequestPanel.js
+++ b/devtools/client/netmonitor/src/components/CustomRequestPanel.js
@@ -67,11 +67,13 @@ class CustomRequestPanel extends Compone
 
   componentWillReceiveProps(nextProps) {
     const { request, connector } = nextProps;
-    fetchNetworkUpdatePacket(connector.requestData, request, [
-      "requestHeaders",
-      "responseHeaders",
-      "requestPostData",
-    ]);
+    if (request) {
+      fetchNetworkUpdatePacket(connector.requestData, request, [
+        "requestHeaders",
+        "responseHeaders",
+        "requestPostData",
+      ]);
+    }
   }

But It will be great to get a good STR for this, if possible.

Flags: needinfo?(hmanilla)

Riki,
If you could provide a reliable STR for your scenario, it would be super helpful.

Thanks

Flags: needinfo?(rikiaji.dewa1)

Hi Bomsy,
sorry I can't give a better STR because of sudden errors, usually never an error, thanks for the response. I hope the update in above will help solve this problem.

Thanks

Flags: needinfo?(rikiaji.dewa1)

No probs, Thanks!

Assignee: nobody → hmanilla
Pushed by hmanilla@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7998feba0d17
[devtools] fetch network update packet only when request is available r=Honza
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: