Lottie-web: Not working on Chrome and Safari

Created on 7 Dec 2018  路  2Comments  路  Source: airbnb/lottie-web

Hi, not sure whats happening i think before it did work but now it's not working on Chrome and Safari, but it does work on Firefox.

The error i'm getting from Chrome is:

Access to XMLHttpRequest at 'file:///Volumes/Data/Marius/Desktop/88b1b73dc43f470c96290fe22fa695d3/data.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

Most helpful comment

Hi, for security reasons browsers don't allow opening json files when the html is executed from the file system. Firefox indeed doesn't behave like the other browsers in this matter.
You need to use a local web server or upload it to some host.

All 2 comments

I'm basically just trying the demo, on code pen it's working but when i export and then open the HTML not working :( https://codepen.io/airnan/project/editor/ZeNONO

Hi, for security reasons browsers don't allow opening json files when the html is executed from the file system. Firefox indeed doesn't behave like the other browsers in this matter.
You need to use a local web server or upload it to some host.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yannieyeung picture yannieyeung  路  3Comments

dulllud picture dulllud  路  3Comments

casillasluisn12 picture casillasluisn12  路  4Comments

ritsraghani picture ritsraghani  路  3Comments

Sandok-voc picture Sandok-voc  路  4Comments