futurecoder
futurecoder copied to clipboard
Synchronous code don't work in Firefox private windows
input() and time.sleep() both work in the console in Firefox, but not when it's in a private window.
input() gives this error:
RuntimeError: This browser doesn't support reading input. Try upgrading to the most recent version or switching to a different browser, e.g. Chrome or Firefox.
While time.sleep() just returns immediately without error ... but without sleeping either.
So it's probably a comsync issue?
I'm using Firefox 104.0.2 on Linux.
Yes, service workers are disabled in Firefox for security or something. I've been aware of this problem for ages but you're the first to mention it. But I also don't want to explicitly mention this reason in the suggestions in the error message, because "sorry this doesn't work in private browsing" sounds very suspicious.
And yes, in general the implementation for time.sleep() intentionally just returns immediately instead of raising an error when there's a sync IO problem.
Not sure if I should keep this issue open because I have no plans to fix it. The only solution I see is to go back to SharedArrayBuffers for sync IO, and that comes with other problems.
I'd say it's more of a Firefox bug then. This seems to be an issue for a lot of sites, so hopefully they will eventually fix it.