P5.js loadStrings() error: Fetch API cannot load file

I am trying to use LoadStrings() in a p5.js and in the console, I get the error “p5.js:60518 Fetch API cannot load file:[FILENAME].txt. URL scheme must be “http” or “https” for CORS request.”
I googled it and people said that it only works on firefox but it doesn’t even work on firefox for me

here is the code in question:

var track = [];

function setup() {
loadStrings(“track.txt”, getText)
}

function getText(data) {
track = data;
}

do you have any suggestions for how i can fix this
id rather not have to host a local server backause im actually working on a commision and it would be a bit of bother to have to get them to host a locl server aswell and set the file up.

@GoToLoop

sorry i didnt reply to you directly

My posted link above got a workaround for Firefox. :fox_face:

For more workarounds see the link below: :link:

hello man i tried the cmd workaround specified on Chrome-allow-file-access-from-file.com
it didnt work
any other suggestions, i have to get this done by wednesday and i cant work on it untuill i get this fixed

Anything relying w/ the new Fetch API doesn’t work w/ that Chrome workaround.

Fetch API is compatible w/ the file:// scheme on Firefox though.

so that cmd solution will work for firefox?

As the name of the site implies: Chrome-allow-file-access-from-file.com
That workaround is for Chrome-based browsers only.

For Firefox-based 1s you just use the trick described on the 1st link I’ve posted:

ive got it working on firefox, thank you man.
very annoying that it doesnt work by default