regl icon indicating copy to clipboard operation
regl copied to clipboard

Examples don't load in Safari on macOS (CORS issue)

Open Splendorr opened this issue 8 years ago • 6 comments

Safari 10.0 macOS 10.11.6

The animations on the home page at regl.party load just fine. But when I go to the Examples, the "Loading..." text never goes away, animations never load, and the following console errors consistently appear:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) https://wzrd.in/multi
[Error] SyntaxError: JSON Parse error: Unexpected identifier "Cannot" - bundle.js:5755
    parse (bundle.js:5755)
    downloadedModules (bundle.js:5755)
    on_end (bundle.js:6106)
    on_state_change (bundle.js:6056)

I am able to load the examples in Chrome on the same computer & network.

Splendorr avatar Sep 28 '16 21:09 Splendorr

This is a bug in https://github.com/freeman-lab/regl-site

We should be running the es2020 transform on wzrd.in in order to support the es6 features like template strings.

mikolalysenko avatar Sep 28 '16 22:09 mikolalysenko

Hmm safari 10 supports all the ES6 features we are using here. It's the JSON parsing that somehow fails.

screen shot 2016-10-03 at 14 33 31

vorg avatar Oct 03 '16 13:10 vorg

Really weird

mikolalysenko avatar Oct 07 '16 19:10 mikolalysenko

Something wrong with JSON encoding? That's why wzrd.in fails and returns 404.

Safari 10: screen shot 2016-10-08 at 22 10 28

Chrome: screen shot 2016-10-08 at 22 09 43

vorg avatar Oct 08 '16 21:10 vorg

The body content comes from request function containing:

//BEGIN FORM Hack
var multipart = function(obj) {

Maybe that fails in SF?

vorg avatar Oct 08 '16 21:10 vorg

Still broken on Chrome for me.

Access to XMLHttpRequest at 'http://wzrd.in/multi' from origin 'http://regl.party' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Pyrolistical avatar Sep 28 '22 20:09 Pyrolistical