Closed Bug 1185293 Opened 11 years ago Closed 11 years ago

"Save All As HAR" fails with TypeError: file.responseHeaders is undefined @ har-builder.js (also file.responseContent)

Categories

(DevTools :: Netmonitor, defect)

defect
Not set
normal

Tracking

(firefox42 fixed)

RESOLVED FIXED
Firefox 42
Tracking Status
firefox42 --- fixed

People

(Reporter: asqueella, Assigned: Honza)

References

Details

Attachments

(1 file)

In a new profile with the current Nightly: 1. Open Tools -> Web Developer -> Network (Cmd+Alt+Q) 2. Go to https://groups.google.com/forum/#!topic/firebug/u3nbmQfiMHk 3. Wait until the page finishes loading (at ~37 requests) 4. Right click the network pane, select "Save All As HAR" 5. Reload the page (Cmd+R) 6. Wait until the page finishes loading (at ~37 requests) 7. Right click the network pane, select "Save All As HAR" At step 4 the HAR file is generated correctly. At step 7 the HAR file is not created, the browser console says > TypeError: file.responseHeaders is undefined > resource:///modules/devtools/netmonitor/har/har-builder.js:295:5 > > buildResponse: function(file) { > [...] > > response.content = this.buildContent(file); > >> response.redirectURL = findValue(file.responseHeaders.headers, "Location"); Also I see a similar problem, which I did not try to reproduce with a clean profile on gmail.com: > TypeError: file.responseContent is undefined > resource:///modules/devtools/netmonitor/har/har-builder.js:313:1 > > buildContent: function(file) { > [...] > if (!this._options.includeResponseBodies || > >> file.responseContent.contentDiscarded) {
Patch attached. @jryans: it's just a few changes to avoid NPE when the response is not available. It would be great to have this landed yet in 42 (this week), thanks! Honza
Assignee: nobody → odvarko
Status: NEW → ASSIGNED
Attachment #8643761 - Flags: review?(jryans)
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: