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

Prevent crash when saving locally on iOS 13 safari #5927

Conversation

ericrosenbaum
Copy link
Contributor

Resolves

resolves #1783

Proposed Changes

When saving to a local file (file -> save to your computer), wait briefly before removing the download link. This prevents the crash on iOS 13, and the file downloads with a correct filename and extension.

Reason for Changes

Not 100% sure why this works, but it probably prevents a race condition in iOS Safari.

Test Coverage

No tests

Browser Coverage

Check the OS/browser combinations tested (At least 2)

Mac

  • Chrome
  • Firefox
  • Safari

Windows

  • Chrome
  • Firefox
  • Edge

Chromebook

  • Chrome

iOS

  • iOS 13 Safari
  • iOS 12 Safari (via simulator)

Android Tablet

  • Chrome

Copy link
Contributor

@chrisgarrity chrisgarrity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is better (no crash), but I could not manage to load a file that had been downloaded. It looks like the file is in a "Downloads" Folder, but I can't find that by browsing files. The internet suggests that it's in your icloud, but I don't see it. Perhaps the safari is not logged into the same iCloud account?

@ericrosenbaum
Copy link
Contributor Author

thanks @chrisgarrity - I was able to save and then load a project on iOS 13 on both the simulator and on my iPhone. We can look into the issue further if we hear reports of people having trouble after we get this change in.

@ericrosenbaum ericrosenbaum merged commit 44be3df into scratchfoundation:develop Jun 26, 2020
@ericrosenbaum ericrosenbaum deleted the prevent-ios-download-crash-timeout branch June 26, 2020 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File->Download causes crash on iOS Safari
3 participants