phetsims / resistance-in-a-wire

"Resistance in a Wire" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/resistance-in-a-wire
GNU General Public License v3.0
1 stars 4 forks source link

HTML Download Does Not Work #151

Closed JRomero0613 closed 6 years ago

JRomero0613 commented 6 years ago

Test device: Chromebook

Operating System: 67.0.3396.57

Browser: Chrome

Problem description: After downloading the sim, disconnecting from the internet, and opening the download the sim becomes unusable and the hidden text for screen readers becomes visible.

Steps to reproduce:

  1. Open the sim and save it by right clicking and hitting save as
  2. Turn off all internet connections
  3. Open the downloaded version of the sim
  4. The sim will now reopen with the hidden text exposed and all functionality disabled

Screenshots: This is a screenshot of the downloaded version of the sim without an internet connection. screenshot 2018-05-31 at 4 44 00 pm

Troubleshooting Info Troubleshooting information (do not edit): Name: ‪Resistance in a Wire‬ URL: https://phet-dev.colorado.edu/html/resistance-in-a-wire/1.5.0-rc.5/phet/resistance-in-a-wire_all_phet.html Version: 1.5.0-rc.5 2018-05-31 01:31:21 UTC Features missing: generatedcontent Flags: pixelRatioScaling User Agent: Mozilla/5.0 (X11; CrOS aarch64 10575.47.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.57 Safari/537.36 Language: en-US Window: 1536x742 Pixel Ratio: 1.25/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 15 uniform: 256 Texture: size: 8192 imageUnits: 16 (vertex: 16, combined: 96) Max viewport: 8192x8192 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"928741cf","branch":"HEAD"},"axon":{"sha":"cc053b4d","branch":"HEAD"},"brand":{"sha":"89d28f63","branch":"HEAD"},"chipper":{"sha":"54f17be2","branch":"HEAD"},"dot":{"sha":"0dd6ee8e","branch":"HEAD"},"joist":{"sha":"f047fb1b","branch":"HEAD"},"kite":{"sha":"b6071478","branch":"HEAD"},"phet-core":{"sha":"f35ff65e","branch":"HEAD"},"phet-io":{"sha":"d54be499","branch":"HEAD"},"phet-io-website":{"sha":"28284828","branch":"HEAD"},"phet-io-wrapper-classroom-activity":{"sha":"c84e3046","branch":"HEAD"},"phet-io-wrapper-lab-book":{"sha":"ebf7c7dc","branch":"HEAD"},"phet-io-wrappers":{"sha":"ce57c3e2","branch":"HEAD"},"phetcommon":{"sha":"a5a7478c","branch":"HEAD"},"query-string-machine":{"sha":"485e174e","branch":"HEAD"},"resistance-in-a-wire":{"sha":"f80c6036","branch":"HEAD"},"scenery":{"sha":"33290b5e","branch":"HEAD"},"scenery-phet":{"sha":"42b0cff2","branch":"HEAD"},"sherpa":{"sha":"9c6ec322","branch":"HEAD"},"sun":{"sha":"6a7c923a","branch":"HEAD"},"tandem":{"sha":"7f499d9e","branch":"HEAD"}}
zepumph commented 6 years ago

When I repeat your steps above, I see that the html first loads statically (and here for a split second I see your screenshot), and the immediately it reloads and all is business as usual. Tested on Chrome and Firefox/Windows 10.

Can you confirm that you cannot reproduce on windows?

JRomero0613 commented 6 years ago

@zepumph I noticed the same behavior where the screen reader text flashed briefly before disappearing on Chrome and Firefox on Windows 10. The sim works fine otherwise and shouldn't be a problem on Windows 10. I have only been able to reproduce this bug on the Chromebook.

zepumph commented 6 years ago

Tagging @jessegreenberg because I'm not quite sure what type of problem this is, is it a css bug? or something else.

zepumph commented 6 years ago

@JRomero0613 can you test if the following sim link will run if you do the same download thing? https://phet-dev.colorado.edu/html/faradays-law/1.4.0-dev.26/phet/faradays-law_all_phet.html

JRomero0613 commented 6 years ago

@zepumph When I downloaded the Faraday's Law sim you linked on the Chromebook and opened it I did not see the screen reader text like the RIAW download, however just like the RIAW the sim becomes unusable and nothing within it can be manipulated.

zepumph commented 6 years ago

That's great news! Thanks. @jonathanolson do you know if we support "save link as" on chromebook? It is currently broken for all sims.

Update: Note: @JRomero0613, I didn't expect to see the PDOM text in that, as it was a sim without a11y enabled.

jessegreenberg commented 6 years ago

@JRomero0613 Are there any errors printed in the console?

JRomero0613 commented 6 years ago

@jessegreenberg Here's the error that the console gives me when I open the downloaded version _Resistance%20in%20a%20Wire_.mhtml:1 Not allowed to load local resource: file:///home/chronos/u-6dc0b95f39a57d7e7535213a7d1b74e434d85a12/Downloads/_Resistance%20in%20a%20Wire_.mhtml

jessegreenberg commented 6 years ago

Thanks! http://www.chrome-allow-file-access-from-file.com/

That link makes it seem like it isn't specific to chromebooks. Maybe it isn't related. @oliver-phet have you seen this before?

oliver-phet commented 6 years ago

I haven't heard of this before.

zepumph commented 6 years ago

Right now I'm interested in why this works on google chrome, but not chromebooks.

jonathanolson commented 6 years ago

@jonathanolson do you know if we support "save link as" on chromebook? It is currently broken for all sims.

I think we may have done some tweaks to support this in the past. I'd defer to @ariel-phet for whether we support it in general (and for whether I should look into the process it uses, and if we can work around things to be supported).

ariel-phet commented 6 years ago

@JRomero0613 we do not support this functionality (right click and "save as")

However, what if you use the "download" button on our website. Two questions:

  1. Does the download button work on chromebooks (as in does it save the file)
  2. Does that downloaded file work

If so, feel free to close this issue.

ariel-phet commented 6 years ago

@JRomero0613 if the issue is not closed by the above test, please reassign to me and report the results

JRomero0613 commented 6 years ago

@ariel-phet The download button on the website works to save the file, and the file also works. Confirmed with multiple sims that this way to download sims works.

ariel-phet commented 6 years ago

@lmulhall-phet - excellent, closing this issue. No need for us to support the right click.

ghost commented 6 years ago

@ariel-phet, here's my slack conversation with @phet-steele:

Liam: How are we supposed to do the HTML download test if there isn't a button for a sim?

Steele: Right click save as.

Liam: That's how we're doing it and Ariel is saying we don't support that.

Steele: Well then either there is a miscommunication or he his mistaken.

@ariel-phet, what are your thoughts?

ariel-phet commented 6 years ago

@lmulhall-phet my understanding is that @JRomero0613 was right clicking on the opened sim in a window. On phet-dev you should be able to right click on the sim file and do "save as". I don't believe you are necessarily saving the full file from the browser when the sim is already opened.

Please verify for me.

ghost commented 6 years ago

@ariel-phet, thanks for clearing up the confusion.

To summarize:

  1. Right clicking and then pressing "Save As" in an opened simulation is not supported and doesn't work on Chrome OS.
  2. Right clicking on the simulation icon on the website and pressing "Save Link As" works.
  3. Clicking the download button on the website is supported and works.
  4. Right clicking on a simulation link in /dev/html and pressing "Save Link As" is supported and works.

@JRomero0613 noticed that in scenario 1, the files are saved as .mhtml instead of .html on Chrome OS. In scenario 1 on macOS and Windows, the files are saved as .html.

jessegreenberg commented 6 years ago

Thanks for the update. @ariel-phet @lmulhall-phet does that mean this issue can be closed?

ghost commented 6 years ago

Yes, we can close this issue.