Exception raised from a webRequest blocking listener should report the original error message and filename

VERIFIED FIXED in Firefox 59

Status

defect
P3
normal
VERIFIED FIXED
2 years ago
Last year

People

(Reporter: rpl, Assigned: rpl)

Tracking

unspecified
mozilla59

Firefox Tracking Flags

(firefox59 verified)

Details

(Whiteboard: [webRequest])

Attachments

(2 attachments)

Assignee

Description

2 years ago
When a blocking listener raises an exception, the raised exception is currently reported as "[Object]", instead of being reported with the exception error message and stack trace.

e.g. the multi-account-containers exception is currently experiencing this issue (https://github.com/mozilla/multi-account-containers) and the following error message is logged in the browser console:

```
[object Object] WebRequest.jsm:806
	applyChanges resource://gre/modules/WebRequest.jsm:806:13
	throw self-hosted:1203:9
```

Updated

2 years ago
Component: WebExtensions: Untriaged → WebExtensions: Request Handling
Priority: -- → P3
Whiteboard: [webRequest]
Comment hidden (mozreview-request)
Assignee

Updated

2 years ago
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Assignee

Updated

2 years ago
Attachment #8939893 - Flags: review?(mixedpuppy)

Comment 3

2 years ago
mozreview-review
Comment on attachment 8939893 [details]
Bug 1428094 - Exception raised from a webRequest blocking listener should report the original error message and filename.

https://reviewboard.mozilla.org/r/210202/#review216896

::: toolkit/components/extensions/test/mochitest/test_ext_webrequest_suspend.html:262
(Diff revision 2)
> +
> +      browser.test.sendMessage("background-ready");
> +    },
> +  });
> +
> +  // TODO(rpl): this could use the chrome console helpers

use "TODO BUG #: comment" for followups
Attachment #8939893 - Flags: review?(mixedpuppy) → review+
Comment hidden (mozreview-request)
Assignee

Comment 5

2 years ago
mozreview-review-reply
Comment on attachment 8939893 [details]
Bug 1428094 - Exception raised from a webRequest blocking listener should report the original error message and filename.

https://reviewboard.mozilla.org/r/210202/#review216896

> use "TODO BUG #: comment" for followups

Bug 1417639 has been landed and merged to mozilla-central, and so I've just rebased this PR and rewritten this part to use the consoleMonitor helper from Bug 1417639 (and so I removed the TODO completely, which is even better :-)).

Comment 6

2 years ago
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/ef1b83a2f4f4
Exception raised from a webRequest blocking listener should report the original error message and filename. r=mixedpuppy

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/ef1b83a2f4f4
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59

Comment 8

2 years ago
Posted image Bug1428094.png
I can reproduce this issue on Firefox 57.0.4 (20180103231032) under Win 7 64-bit and Mac OS X 10.13

This issue is verified as fixed on Firefox 59.0a1 (20180115100056) under Win 7 64-bit and Mac OS X 10.13

Please see the attached screenshot.

Updated

2 years ago
Status: RESOLVED → VERIFIED

Updated

Last year
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.