phetsims / friction

"Friction" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/friction
GNU General Public License v3.0
4 stars 6 forks source link

Launched sim freezes with safari #278

Closed Nancy-Salpepi closed 2 years ago

Nancy-Salpepi commented 2 years ago

Test device MacBook Air (m1 chip)

Operating System 12.3

Browser Safari

Problem description For https://github.com/phetsims/qa/issues/791 When I try to interact with the launched sim in safari, it freezes. After a delay the 'releasing book' sound is heard. When I return to the Studio wrapper it also looks odd and takes a few seconds to return to normal.

Steps to reproduce

  1. Launch the sim from studio
  2. Attempt to move the book.
  3. Go back to the studio wrapper

Visuals

https://user-images.githubusercontent.com/87318828/160917444-d1e30d22-c1a0-4638-bc8d-04c2ccf1691b.mp4

KatieWoe commented 2 years ago

I reproduced this on iPad by launching the example sim

Nancy-Salpepi commented 2 years ago

In studio with safari --the preview HTML worked properly.

KatieWoe commented 2 years ago

This also happened when trying to record on iPad with Metacog recording. @zepumph note that Metacog wasn't tested due to this.

KatieWoe commented 2 years ago

Very interesting find on iPad. I made a file with studio on Win 11 Chrome, hosted it on a server, and played that file on iPad safari without this crash occurring.

zepumph commented 2 years ago

I believe that the sim has frozen because of an error in the launched sim. It would be best if you could run this test:

  1. Go to studio
  2. Press the launch button in the desired state to reproduce
  3. In the launched tab, open the dev tools
  4. Then interact with the sim to make it freeze

Is there a console error in the launched sim?

KatieWoe commented 2 years ago

No, nothing appears in the console

zepumph commented 2 years ago

A saw in the video that the launch sim tab had crashed when you went back to the tab after looking in the console in Studio. Can you please try to reproduce this on master on phettest to see if it is still a bug?

KatieWoe commented 2 years ago

It's still happening in master. I didn't see a console error there either.

zepumph commented 2 years ago

Sam has a mac, and I solicited his help here. Thank you!

samreid commented 2 years ago

I tested Safari Version 15.2 (17612.3.6.1.6) on MacOS Monterey 12.1, and launched https://phet-dev.colorado.edu/html/friction/1.6.0-dev.24/phet-io/wrappers/studio/ then pressed "preview sim" then moved the book and went back to studio. Everything continued to behave as expected.

zepumph commented 2 years ago

@Nancy-Salpepi can we please schedule some time to pair on this. I think next steps would be to try to reproduce on the original machine. Thanks for testing @samreid!

Nancy-Salpepi commented 2 years ago

Sure @zepumph! I am around tomorrow. Let me know what works for you.

samreid commented 2 years ago

I was not able to reproduce this problem or https://github.com/phetsims/gravity-and-orbits/issues/421 on Safari Version 15.2 (17612.3.6.1.6) on MacOS 12.1.

I was able to reproduce this on my iPad 15.5 and iPhone 15.4.1. After updating both to 15.6, I am not able to see the problem any more on either of those devices after many tests. I also updated my macOS to get Safari 15.6 and still cannot see the problem there. So the hypothesis is that Safari introduced a bug between 15.3 -> 15.5 and fixed it in 15.6. @Nancy-Salpepi do you have Safari 15.6 devices you can test, or can you update your 15.5 safaris for a test?

Nancy-Salpepi commented 2 years ago

@samreid I will update everything now and see if I can reproduce.

samreid commented 2 years ago

@marlitas tested on Safari 15.5 and saw the problem in 2/2 tests (at about 4 seconds each).

Nancy-Salpepi commented 2 years ago

@samreid After updating to Safari 15.6 I wasn't able to produce the problem (0/4), even with clearing history each time.

zepumph commented 2 years ago

Awesome! Thanks for the hard work everyone.