Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playground no longer works in Firefox when all cookies and storage is disabled #431

Closed
starblue opened this issue Nov 24, 2018 · 9 comments
Labels
bug The playground isn't doing what it was intended to

Comments

@starblue
Copy link

starblue commented Nov 24, 2018

Playground no longer works for me, the window stays gray. I’m not exactly sure when and why this happened, maybe it is due to tightened security in some Firefox update in the last week or so. In the console I see the following security error:

Request to access cookie or storage on “https://play.integer32.com/” was blocked because we are blocking all storage access requests. 80926032aeb3aae9d0ff.js:1:27327
SecurityError: The operation is insecure. 80926032aeb3aae9d0ff.js:1
334          https://play.integer32.com/assets/80926032aeb3aae9d0ff.js:1:27328
i            https://play.integer32.com/assets/80926032aeb3aae9d0ff.js:1:514
176          https://play.integer32.com/assets/80926032aeb3aae9d0ff.js:1:7657
i            https://play.integer32.com/assets/80926032aeb3aae9d0ff.js:1:514
n            https://play.integer32.com/assets/80926032aeb3aae9d0ff.js:1:387
<anonymous>  https://play.integer32.com/assets/80926032aeb3aae9d0ff.js:1:3269
<anonymous>  https://play.integer32.com/assets/80926032aeb3aae9d0ff.js:1:2

Firefox version is 63.0.3 (64-bit) on Linux (Debian stable).
I use the uMatrix 1.3.14 and uBlock origin 1.17.2 add-ons, but disabling them doesn't change anything.

@starblue
Copy link
Author

OK, I figured it out.
The root of the problem is that playground now wants to set a cookie (or storage), and I forbid that by default. When I allow to set session cookies, it works.
I didn't change cookie settings on my side recently, so it is probably be due to some recent change in playground.
What does it need cookies for? Can that need be removed?
If it really needs cookies, it should probably produce some better error message when cookies are blocked.

@shepmaster
Copy link
Member

some recent change

#430

The playground has always attempted to use local storage; session storage is recent.

What does it need [...] for

Storing the code, whether you've ever seen notifications, all of the configuration options, etc.

@shepmaster
Copy link
Member

I forbid that by default

How is this done? Without reporting how to reproduce an issue, there's really not much of a way that we can attempt to fix it.

@starblue
Copy link
Author

This is in the end user visible part of the preferences:
Edit -> Preferences -> Privacy & Security -> Cookies and Site Data -> Block cookies and site data -> All cookies

@shepmaster shepmaster added the bug The playground isn't doing what it was intended to label Nov 25, 2018
@shepmaster shepmaster changed the title Playground stopped working in Firefox, apparently due to SecurityError Playground no longer works in Firefox when all cookies and storage is disabled Nov 25, 2018
@shepmaster
Copy link
Member

All cookies

Ah, the setting that specifically states that it will break websites?

image

@starblue
Copy link
Author

starblue commented Nov 25, 2018

Yes, and I can mostly deal with the consequences, i.e. explicitly enable cookies when they are needed, for example for logging in somewhere. I guess the warning is there for people who can't do that.
I don't think it is a valid excuse for a website to break in an obscure way.
And I found it is the only way to really keep cookies under control.

@inejge
Copy link

inejge commented Nov 26, 2018

After #432, Playground doesn't work with cookies enabled (Firefox 63.0.3, 64-bit, Ubuntu 18.04).

TypeError: t is null 8cc65fe859fbd039fa13.js:1:28339
deserialize     https://play.rust-lang.org/assets/8cc65fe859fbd039fa13.js:1:28339
mn/</<          https://play.rust-lang.org/assets/8cc65fe859fbd039fa13.js:1:27661
d/</<           https://play.rust-lang.org/assets/2db6ccab5336953f0406.js:1:25975
u               https://play.rust-lang.org/assets/2db6ccab5336953f0406.js:1:21567
334             https://play.rust-lang.org/assets/8cc65fe859fbd039fa13.js:1:107309
i               https://play.rust-lang.org/assets/8cc65fe859fbd039fa13.js:1:514
176             https://play.rust-lang.org/assets/8cc65fe859fbd039fa13.js:1:7657
i               https://play.rust-lang.org/assets/8cc65fe859fbd039fa13.js:1:514
n               https://play.rust-lang.org/assets/8cc65fe859fbd039fa13.js:1:387
<anonymous>     https://play.rust-lang.org/assets/8cc65fe859fbd039fa13.js:1:3269
<anonymous>     https://play.rust-lang.org/assets/8cc65fe859fbd039fa13.js:1:2

After blocking the cookies (via an exception for https://play.rust-lang.org) it starts working.

@shepmaster
Copy link
Member

Playground doesn't work with cookies enabled

Should be fixed by #434; it's flowing through CI now.

@shepmaster
Copy link
Member

flowing through CI now.

The fix has been pushed; because the playground has stronger caching, you will either need to wait 24h or force a reload of the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The playground isn't doing what it was intended to
Projects
None yet
Development

No branches or pull requests

3 participants