Closed Bug 1649265 Opened 4 years ago Closed 4 years ago

Embedded Twitch Chat not loading

Categories

(Core :: Privacy: Anti-Tracking, defect, P1)

x86_64
Windows 10
defect

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox77 --- unaffected
firefox78 --- unaffected
firefox79 --- disabled
firefox80 --- fixed

People

(Reporter: gcp, Assigned: xeonchen)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

It took a few days to realize I wasn't seeing bug 1645435 but this is now also broken in non-Fission mode. Bisected this to:

Bug 1628486 - Enable Dynamic First-Party Isolation in Nightly; r=ewright

STR:

  1. Load https://tcec-chess.com/

Expected:
Twitch Chat window on the right

Actual:
"Failed to load module."

Regressed by: 1628486
Has Regression Range: --- → yes

Confirmed that network.cookie.cookieBehavior=4 fixes it.

I can reproduce the breakage. Disabling ETP fixes it. From some quick testing this seems to be caused by https://static.twitchcdn.net/assets/minimal-608d1e6e9882757068ce.js loaded within the iframe https://www.twitch.tv/embed/TCEC_Chess_TV/chat?parent=tcec-chess.com. Specifically, when dFPI is enabled the following access to localStorage.getItem will throw NS_ERROR_FAILURE:

    try {
      var s = localStorage.getItem(this.config.forceMinConsoleLogLevelKey);
      null !== s && (o = Number(s))
    } catch (e) {
      console.error('Failed to get log level override from local storage.', {
        err: e,
        key: this.config.forceMinConsoleLogLevelKey
      })
    }

The localStorage object itself is still accessible and the key value doesn't seem to matter. I suspect this is a bug in our partitioning implementation. Gary would you mind to take a look?

Flags: needinfo?(xeonchen)
Severity: -- → S3
Priority: -- → P1

(In reply to Steven Englehardt [:englehardt] from comment #2)

I can reproduce the breakage. Disabling ETP fixes it. From some quick testing this seems to be caused by https://static.twitchcdn.net/assets/minimal-608d1e6e9882757068ce.js loaded within the iframe https://www.twitch.tv/embed/TCEC_Chess_TV/chat?parent=tcec-chess.com. Specifically, when dFPI is enabled the following access to localStorage.getItem will throw NS_ERROR_FAILURE:

    try {
      var s = localStorage.getItem(this.config.forceMinConsoleLogLevelKey);
      null !== s && (o = Number(s))
    } catch (e) {
      console.error('Failed to get log level override from local storage.', {
        err: e,
        key: this.config.forceMinConsoleLogLevelKey
      })
    }

The localStorage object itself is still accessible and the key value doesn't seem to matter. I suspect this is a bug in our partitioning implementation. Gary would you mind to take a look?

Thanks for your investigation!

Assignee: nobody → xeonchen
Flags: needinfo?(xeonchen)
Pushed by xeonchen@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/375b436ab281
Document::SetDomain should apply to all principals; r=baku
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: