Closed Bug 1450376 Opened 6 years ago Closed 6 years ago

Error: [Exception... "Component returned failure code: NS_ERROR_FAILURE [nsIContentPermissionRequest.principal]

Categories

(Firefox :: Site Identity, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Firefox 62
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- wontfix
firefox60 --- wontfix
firefox61 --- wontfix
firefox62 --- fixed

People

(Reporter: florian, Assigned: johannh)

References

()

Details

(Keywords: regression, Whiteboard: [nightly-js-sentry:3173860])

Attachments

(1 file)

This bug was automatically filed from Sentry: https://sentry.prod.mozaws.net/operations/nightly-js-errors/issues/3173860/

Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIContentPermissionRequest.principal]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: jar:file:///C:/Program%20Files/Firefox%20Nightly/browser/omni.ja!/components/nsBrowserGlue.js :: prompt :: line 2770"  data: no]
    at prompt(jar:file:///C:/Program%20Files/Firefox%20Nightly/browser/omni.ja!/components/nsBrowserGlue.js:2770:1)

https://searchfox.org/mozilla-central/rev/42b34ba1961e37e0d2236deafdd126a0ba21b9ec/browser/components/nsBrowserGlue.js#2770

This is the #6 most frequent non-extension JS error in Sentry.
Flags: needinfo?(jhofmann)
I think this is happening when we're calling .cancel() before accessing the request principal. That can happen in three cases:

- The permission is permanently denied by the user
- The permission was temporarily denied by us after the user clicked away the first prompt
- It's a chrome window without popupnotifications, such as for extension background pages.

I'm not 100% certain whether we should just ignore these calls. On one hand they don't count what the user sees, just "invisible". I guess I'll have to make my mind up about what I actually want to collect here. This would be easy to fix either way. I'm leaning towards ignoring these prompts, since I'm probably more interested in prompts that get surfaced to the user and I believe we already ignore this for WebRTC...
Assignee: nobody → jhofmann
Status: NEW → ASSIGNED
Component: General → Site Identity and Permission Panels
Flags: needinfo?(jhofmann)
Priority: -- → P3
> On one hand they don't count what the user sees, just "invisible". 

I meant to say "invisible" prompts that get denied automatically.
Comment on attachment 8976259 [details]
Bug 1450376 - Ignore blocked permission requests in permission prompt telemetry.

https://reviewboard.mozilla.org/r/244422/#review251360

This seems fine, I'm a little sad we need two try blocks now but the code looks like it will work fine.
Attachment #8976259 - Flags: review?(jkt) → review+
Pushed by jhofmann@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d1d367709ab1
Ignore blocked permission requests in permission prompt telemetry. r=jkt
https://hg.mozilla.org/mozilla-central/rev/d1d367709ab1
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: