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

samiam2017 picture samiam2017  路  3Comments

hardy613 picture hardy613  路  4Comments

phantomboogie picture phantomboogie  路  4Comments

ochanje210 picture ochanje210  路  3Comments

dulllud picture dulllud  路  3Comments