Closed Bug 1447840 Opened 7 years ago Closed 7 years ago

devtools.network.getHAR() - JSON.parse: unexpected character at line 1 column 1 of the JSON data - When no network activity has been captured yet by the Network Panel

Categories

(WebExtensions :: Developer Tools, defect)

60 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1448288

People

(Reporter: fwollsen, Unassigned)

References

Details

Attachments

(1 file)

[Steps to reproduce]: 1. Clone the extension repo at https://github.com/motin/mvce-firefox-devtools-api-gethar-bug and run the extension using `web-ext run --firefox nightly --bc --start-url "example.org"` (or install the attached build of this extension and open up the browser console manually) 2. Open up the DevTools Toolbox 3. Select the Network Panel 4. Select "My panel" 5. Press the "Dump getHAR() to console" button [Expected result]: - The browser log should contain an empty HAR log since no network activity has been captured yet, possibly supplemented with a warning in the browser console informing about the need to perform a request or reload the page to capture network activity. [Actual result]: - The script breaks and the following errors are reported in the browser log: 1. ReferenceError: reference to undefined property "columnNumber" base-loader.js:91:1 2. JSON.parse: unexpected character at line 1 column 1 of the JSON data normalizeError resource://gre/modules/ExtensionCommon.jsm:419:7 call/< resource://gre/modules/ExtensionParent.jsm:829:19 3. Error: An unexpected error occurred undefined [Notes] A. The first error only seem to appear on the first time this is attempted in the browser session. Subsequent repetition of the steps to reproduce will only result in errors 2 and 3 being shown in the browser console (therefore it may very well we a completely different bug causing that specific error message) B. The same or a similar error was mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1311177#c33 C. This was reproduced both with Firefox Nightly 61.0a1 (2018-03-21) (64-bit) and Firefox Developer Edition 60.0b5 (64-bit) on Mac OSX 10.13.3 (17D102)
This issue should be fixed in bug 1448288 Honza
(In reply to Jan Honza Odvarko [:Honza] from comment #1) > This issue should be fixed in bug 1448288 The issue has been fixed and the patch is part of the Nightly build now https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly @fwollsen: can you please verify this report? Does it work for you now? Honza
Flags: needinfo?(fwollsen)
Verified, latest nightly results in no errors mentioned above. Instead the browser log contains an empty HAR log. Documentation hopefully clarifies that the HAR logs will be empty since no network activity has been captured yet, but that is out of scope for this bug report. :)
Flags: needinfo?(fwollsen)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: