MrTomRod / scoary-2

Calculate assocations between genes and traits
MIT License
18 stars 1 forks source link

Failed to load overview_plot.svg #11

Closed ndusek closed 4 months ago

ndusek commented 4 months ago

When trying to open the overview.html file to view results using the web app generated by Scoary2, I am seeing the following error:

Failed to load overview_plot.svg

This seems to be related to the following error message in the console:

Access to fetch at 'file:///Users/ndusek/Downloads/75_2/overview_plot.svg' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.

The above message is also shown for several other assets that cannot be served successfully. For reference, I am trying all this in Google Chrome 124.0.6367.119. Happy to provide any additional information that would be helpful.

MrTomRod commented 4 months ago

Did you try the two workarounds mentioned here? https://github.com/MrTomRod/scoary-2/wiki/App

How to use the app

Simply opening overview.html or trait.html in the web browser does not work: browsers will not allow access to files on the local file system for security reasons. There are multiple ways of using the app:

a) local http server

python -m http.server --cgi 8080

This will start a web server to host your entire directory listing at http://localhost:8080/.

b) disable browser security features (not recommended)

  • Firefox: Set security.fileuri.strict_origin_policy to false in about:config
  • Chrome (or Edge, etc.): Start the browser like this: chrome --allow-file-access-from-files
ndusek commented 4 months ago

Hi @MrTomRod, thank you again for the quick response (this being my second issue).

Yes, I can confirm that following the instructions in the documentation (specifically, launching the app using python -m http.server) works as expected. Mea culpa for not reading the docs thoroughly enough.