phetsims / decaf

PhET Java Simulations converted to HTML5 using CheerpJ
1 stars 0 forks source link

Sims may not load in incognito mode #16

Open KatieWoe opened 4 years ago

KatieWoe commented 4 years ago

Found in https://phet-dev.colorado.edu/decaf/battery-resistor-circuit/1.0.0-dev.14/ in Firefox. The sim does not load when in incognito mode. It does load in incognito mode in Chrome. Will be updating issue with other platform status. To be clear, it does load on non-incognito Firefox. mainisstarting

KatieWoe commented 4 years ago

IE gets caught on a slightly different part of the loading process, but still has the problem.

samreid commented 4 years ago

This problem is also happening on the CheerpJ demo https://javafiddle.leaningtech.com/. It may be an unsupported mode of operation. @kathy-phet how do you recommend to proceed?

UPDATE: On slack, @kathy-phet said this should be reported to CheerpJ.

UPDATE: I reported this problem through Asana

samreid commented 4 years ago

CheerpJ reported:

In private mode Firefox disallow the use of the IndexedDB local database which CheerpJ uses to store files. Chrome Incognito on the other hand will create a transient IndexedDB which is removed on exit. Supporting Firefox in private mode is not a priority for us, although it can be done with some effort.

kathy-phet commented 4 years ago

Sam, OK - I don't think fixing this is a priority. Is it possible though to detect incognito in firefox and return an message that recommends running in Chrome or something?

samreid commented 4 years ago

The technical way to check for this problem is to check for the existence of IndexedDB. But I'm not sure we would want to use that terminology in a dialog window presented to the user. I'm reluctant to just check for "is the user running private firefox" for a few reasons:

Therefore, I recommend to check for the existence of IndexedDB and perhaps come up with wording for a dialog like so:

CheerpJ requires IndexedDB in order to run, but IndexedDB is not available for this browser/mode combination. Sometimes running in private mode can disable IndexedDB. Please try disabling private mode or a different browser.

@kathy-phet is this blocking for the initial release of Faraday?

kathy-phet commented 4 years ago

Hi Sam, This approach looks good. And no I would say its not "blocking". We can upgrade it when it is ready. Thanks.