codesandbox / codesandbox-client

An online IDE for rapid web development
https://codesandbox.io
Other
13.02k stars 2.27k forks source link

Private CodeSandbox infinitely reloads in Safari #6606

Open stephenkao opened 2 years ago

stephenkao commented 2 years ago

🐛 bug report

Preflight Checklist

Description of the problem

Sandboxes marked as 'Private' (as opposed to 'Public' or 'Unlisted') infinitely reload on Safari, which makes working in them impossible.

How has this issue affected you? What are you trying to accomplish?

I've recently tried to have pairing sessions via Live Mode with others who use Safari as their default browser, and the only workaround is to use Chrome or Firefox. To be fair, it's not a big deal for my coworkers, but my company also uses it to conduct interviews so it'd be nice to not have to ask candidates to change browsers.

To Reproduce

Here's a video of changing to 'Private' and reloading. It stops immediately when I change it back to 'Public': 2022-04-06 11 51 35

Link to sandbox: Freshly forked vanilla app

Your Environment

Software Name/Version
Сodesandbox Latest
Browser Safari, 15.2 (17612.3.6.1.6)
Operating System macOS 12.1
JamesACS commented 2 years ago

Hey @stephenkao - Thank you for raising this. I've been able to reproduce it on our end and have created a bug issue.

As soon as I have any updates I'll respond here

stephenkao commented 2 years ago

Amazing! Thank you so much, @JamesACS!

amstiel commented 4 months ago

It seems there are two types of error.

[Error] Refused to apply a stylesheet because its hash, its nonce, or 'unsafe-inline' appears in neither the style-src directive nor the default-src directive of the Content Security Policy.

[Error] Fetch API cannot load https://codesandbox.io/api/v1/sandboxes/foo/bar due to access control checks.

Edit: my Safari version is 17.4.1 (19618.1.15.11.14)

filipelima18 commented 3 months ago

Hi @amstiel! Can you share the URL of the project where you're experiencing these errors and any steps we should take to reproduce them?

amstiel commented 3 months ago

@filipelima18 Yeah, sure! Just created fresh React sandbox Draft: https://codesandbox.io/p/sandbox/test-sandbox-vcgch2

Or you can just create a fresh Draft yourself, I think it will do the same.