Closed Bug 1658323 Opened 4 years ago Closed 4 years ago

HTTPS-Only Mode: Have console message link to SUMO page

Categories

(DevTools :: Console, task, P1)

task

Tracking

(firefox81 fixed)

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When HTTPS-Only Mode is enabled, we log request to the console with a category name of HTTPSOnly and we would like to have that linked to https://support.mozilla.org/en-US/kb/https-only-prefs

Quick STRs:

  • In Nightly, go to about:preferences#privacy and enable HTTPS-Only Mode
  • Open the Multi Process Browser Console
  • Visit http.rip
  • Observe multiple https-only messages e.g.
    HTTPS-Only Mode: Upgrading insecure request “http://http.rip/” to use “https”.
    but with no 'Link' to learn more about the message.

Honza, can you help?

Flags: needinfo?(odvarko)

Hello Christoph,

Do I understand correctly that you would like to have a [Learn more] link, like we have for other kind of warnings?
If so, this can be done by adding a new case for this error category in https://searchfox.org/mozilla-central/source/devtools/server/actors/errordocs.js

Flags: needinfo?(odvarko)
Assignee: nobody → ckerschb
Severity: -- → S4
Status: NEW → ASSIGNED
Priority: -- → P1
Pushed by mozilla@christophkerschbaumer.com:
https://hg.mozilla.org/integration/autoland/rev/9040cdaddc7c
HTTPS-Only Mode: Have console message link to SUMO page r=nchevobbe

(In reply to Noemi Erli[:noemi_erli] from comment #5)

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=312710853&repo=autoland&lineNumber=16325

Nicolas, it works locally but it seems in the above error log there is
Console message: [JavaScript Error: "TypeError: Services.urlFormatter is undefined" {file: "resource://devtools/server/actors/errordocs.js" line: 13}]

Any idea what might be wrong there?

Flags: needinfo?(ckerschb) → needinfo?(nchevobbe)

Mhhh, looks like something happens in worker context, I'll check that.

Flags: needinfo?(nchevobbe)

Joni, within this bug (precisely this patch D86577 ) we want console messages to link to the sumo page for https-only-prefs. While this works just fine in the non worker context, Services is not available in a worker context.

Long story short, is https://support.mozilla.org/kb/https-only-prefs redirecting to the right page? Or is there something else/better we can/should use in the worker context?

Flags: needinfo?(jsavage)

Christoph, the issue should be fixed now and the link should now direct to the right page (it will say "waiting for approved content" or something to that effect.) Let me know if there's still an issue.

Flags: needinfo?(jsavage)

(In reply to Joni Chan from comment #9)

Christoph, the issue should be fixed now and the link should now direct to the right page (it will say "waiting for approved content" or something to that effect.) Let me know if there's still an issue.

Great - works on my end too - thanks!

Pushed by mozilla@christophkerschbaumer.com:
https://hg.mozilla.org/integration/autoland/rev/8565ae515b6d
HTTPS-Only Mode: Have console message link to SUMO page r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: