Closed Bug 2090983 Opened 23 days ago Closed 15 days ago

browser_webconsole_show_subresource_security_errors.js fails when run twice in the same browser

Categories

(DevTools :: Console, task)

task

Tracking

(firefox162 fixed)

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

When browser_webconsole_show_subresource_security_errors.js runs a second time in the same browser (the upcoming mochitest-repeat jobs, or test-verify), test-subresource-security-error.js comes from the HTTP cache. STS headers are only processed on network responses, so the expected "Strict-Transport-Security: The site specified a header that could not be parsed successfully." warning is not logged and the test fails with waitFor findWarningMessage(hud, sample_msg) timed out.

The fix serves the script with Cache-Control: no-store and removes the test's skip-if = ["verify"], which had the same cause.

STS headers are only processed on network responses, so when the test runs a second time in the same browser, the script comes from the HTTP cache and no warning is logged. This is also why the test was skipped in test-verify.

Blocks: 2090991

that looks like an actual bug, not something that should be handled in the test right? Like, if the request comes from the cache, but you didn't have the console open for the first time you the request was made, you'd still want to see the error message.

Tom, do you think there's an easy way to send the error message even when this comes from the cache?

Flags: needinfo?(tschuster)

This doesn't look super easy to fix and I think this warning is actually most useful when actually doing a network connection. I would suggest filing a new bug.

Flags: needinfo?(tschuster)
See Also: → 2093967

(In reply to Tom Schuster [:tschuster] from comment #3)

This doesn't look super easy to fix and I think this warning is actually most useful when actually doing a network connection. I would suggest filing a new bug.

Filed bug 2093967

Attachment #9677916 - Attachment description: Bug 2090983 - Don't cache the script with a broken STS header in browser_webconsole_show_subresource_security_errors.js, r=#devtools-reviewers. → Bug 2090983 - Clear the HTTP cache after browser_webconsole_show_subresource_security_errors.js, r=#devtools-reviewers.
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5c728e15bf6f https://hg.mozilla.org/integration/autoland/rev/08f6e91da9f4 Clear the HTTP cache after browser_webconsole_show_subresource_security_errors.js, r=devtools-reviewers,jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 15 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
QA Whiteboard: [qa-triage-done-c163/b162]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: