yari icon indicating copy to clipboard operation
yari copied to clipboard

All pages on MDN Web Docs are blank on seamonkey browser

Open kivinen opened this issue 2 years ago • 3 comments

Summary

When trying to access any of the pages with javascript enabled I briefly see the page, and then it is replaced with blank page.

The javascript console has following errors:

Content Security Policy: Couldn’t parse invalid host 'report-sample' Content Security Policy: Couldn’t process unknown directive ‘script-src-elem’ Content Security Policy: Couldn’t parse invalid host 'report-sample' SecurityError: The operation is insecure. Not_a_function:3 sessionStorage.getItem didn't work SecurityError: The operation is insecure. user-context.tsx:60:12 DOMException code: 18 columnNumber: 0 data: null filename: "https://developer.mozilla.org/static/js/main.38618567.js" lineNumber: 2 message: "The operation is insecure." name: "SecurityError" result: 2152923154 stack: "Le/<@https://developer.mozilla.org/static/js/main.38618567.js:2:363279\nel@https://developer.mozilla.org/static/js/main.38618567.js:2:230855\nws@https://developer.mozilla.org/static/js/main.38618567.js:2:251273\nxs/</<@https://developer.mozilla.org/static/js/main.38618567.js:2:247914\nD@https://developer.mozilla.org/static/js/main.38618567.js:2:298349\nN@https://developer.mozilla.org/static/js/main.38618567.js:2:298883\n" proto: DOMExceptionPrototype { name: Getter, message: Getter, INDEX_SIZE_ERR: 1, … } react-dom.production.min.js:186:401 DOMException code: 18 columnNumber: 0 data: null filename: "https://developer.mozilla.org/static/js/main.38618567.js" lineNumber: 2 message: "The operation is insecure." name: "SecurityError" result: 2152923154 stack: "y/<@https://developer.mozilla.org/static/js/main.38618567.js:2:3456\nel@https://developer.mozilla.org/static/js/main.38618567.js:2:230855\nws@https://developer.mozilla.org/static/js/main.38618567.js:2:251273\nxs/</<@https://developer.mozilla.org/static/js/main.38618567.js:2:247914\nD@https://developer.mozilla.org/static/js/main.38618567.js:2:298349\nN@https://developer.mozilla.org/static/js/main.38618567.js:2:298883\n" proto: DOMExceptionPrototype { name: Getter, message: Getter, INDEX_SIZE_ERR: 1, … } react-dom.production.min.js:186:401 GETXHR https://developer.mozilla.org/api/v1/whoami SecurityError: The operation is insecure. main.38618567.js:2

URL

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Not_a_function

Reproduction steps

  1. Download seamonkey from https://www.seamonkey-project.org/start/
  2. Install it and start it
  3. go to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Not_a_function page

Expected behavior

To see page normally

Actual behavior

Not seeing anything, and getting security errors on the console.

Device

Laptop

Browser

Other (specify below)

Browser version

Stable

Operating system

Linux

Screenshot

image

Anything else?

My browser is seamonkey version 2.53.13.

Validations

kivinen avatar Jul 23 '22 17:07 kivinen

@kivinen I believe I know the cause of blank page: you might have disabled sessionStorage and it throws this:

sessionStorage.getItem didn't work SecurityError: The operation is insecure.

I observed this exact behavior on both Firefox and Chrome when I disabled storage for testing.

Could you try enabling cookies (this setting usually also controls sessionStorage) and try loading the page? Also, I already filed a PR fixing the bug I described: #6352

bershanskiy avatar Aug 07 '22 18:08 bershanskiy

Anton Bershanskiy writes:

@kivinen I believe I know the cause of blank page: you might have disabled sessionStorage and it throws this:

sessionStorage.getItem didn't work SecurityError: The operation is
insecure.

I observed this exact behavior on both Firefox and Chrome when I disabled storage for testing.

Could you try enabling cookies (this setting usually also controls sessionStorage) and try loading the page? Also, I already filed a PR fixing the bug I described: #6352

Yes, it seems that if I enable session cookies on the site then the pate is not empty anymore... I always reject cookies on most of the sites, and only allow them in some sites. I didn't even remember that when reporting about this issue, as usually cookie related issues are more direct i.e., web site saying "I need cookies to work", and then I just use some other site...

@.***

kivinen avatar Aug 09 '22 15:08 kivinen

usually cookie related issues are more direct i.e., web site saying "I need cookies to work"

If you believe this is important, you are welcome to comment on #6352 which makes MDN display all content without cookies and storage and adds messages about cookies for non-essential features which do require cookies and storage.

then I just use some other site...

Is it even possible to use web without first-party cookies at all? I created that PR so that developers can read documentation while they debug their own sites with cookies disabled. I don't really expect anyone to disable first-party cookies, since so many features rely on them.

bershanskiy avatar Aug 09 '22 16:08 bershanskiy

I just verified that MDN loads on a default SeaMonkey 2.53.13 version, even though it doesn't look very good until a theme is chosen (since SeaMonkey 2.53.13 uses Gecko 68.0, which doesn't support prefers-color-scheme.

The site only breaks after disabling first-party cookies, as this seems to also disable LocalStorage, which is used early here:

https://github.com/mdn/yari/blob/60d15ccb93d724ea5cef76511251bb3e439bc326/client/public/index.html#L113

This should be fixed once https://github.com/mdn/yari/pull/6352 is merged.

caugner avatar Aug 22 '22 18:08 caugner

@kivinen If you are interested, you can test/use the fixed version on staging environment as described here. There are still some known feature limitations which should not be surprising since cookies are disabled.

bershanskiy avatar Aug 29 '22 14:08 bershanskiy