I ran into the same issue last week. After searching the internet about “Chromium and CORS” and trying some options to start the browser with additional parameters without success, I gave up and changed the diagram to be loaded from an url like here: Hello World
var diagramUrl = 'https://cdn.staticaly.com/gh/bpmn-io/bpmn-js-examples/dfceecba/starter/diagram.bpmn';
// load external diagram file via AJAX and open it
$.get(diagramUrl, openDiagram, 'text');
I left it as it is and started with the second step of the walkthrough: Roll your own modeler (with npm). I’m still working on it, I have to catch up some basic node and npm development steps.
Another option could be to put your index.html file and your diagram onto a web server and load the page via http.
If you open a HTML page directly from a file browsers prevent you from loading local file resources via JavaScript.
In order to load your own diagrams remotely, i.e. via the fetch API you’d need to serve both the diagrams and your HTML page on a webserver. This is why we only load actual remote assets, not local files in our examples, too.
Not sure what is your environment but maybe you have a webserver locally setup already (Apache, …)? If you have NodeJS, you may very well spin up a quick local webserver in your current working directory like this: