Giter Club home page Giter Club logo

Comments (6)

firecat53 avatar firecat53 commented on June 6, 2024 1

Let me know what I can do to help test! I really appreciated the offline capability that the app had previously. It's a much lighter and simpler version of Freemind. Ultimately I would have no problem spinning up an nginx container to run it locally via a web server but I definitely prefer the simplicity of just opening index.html. Perhaps online/offline modes depending on use case?

Thanks for your work on this project!!

from my-mind.

ondras avatar ondras commented on June 6, 2024 1

The XHR workaround only seems to work in Firefox. I do not care about Chrome that much, but the limited support probably means that the said functionality might get removed soon.
I will try to think about a different solution or approach to this issue.

from my-mind.

ondras avatar ondras commented on June 6, 2024

Please try opening your browser's DevTools / Console; perhaps something will be logged there.

from my-mind.

ondras avatar ondras commented on June 6, 2024

...I am afraid you are running into JakeChampion/fetch#92 (comment). Running stuff via file:/// is generally not recommended.

from my-mind.

firecat53 avatar firecat53 commented on June 6, 2024

Output from the qutebrowser devtools console:

Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
index.html:1 Access to font at 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0' from origin 'file://' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
fontawesome-webfont.woff2:1 Failed to load resource: net::ERR_FAILED
my-mind.js:3931 Fetch API cannot load file:///home/firecat53/docs/family/scott/src/projects/my-mind/map.css. URL scheme "file" is not supported.
init14 @ my-mind.js:3931
index.html:1 Access to font at 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0' from origin 'file://' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
fontawesome-webfont.woff:1 Failed to load resource: net::ERR_FAILED
my-mind.js:3931 Uncaught (in promise) TypeError: Failed to fetch
    at init14 (my-mind.js:3931)
    at init19 (my-mind.js:4563)
    at my-mind.js:4584
    at my-mind.js:4585
index.html:1 Access to font at 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0' from origin 'file://' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
fontawesome-webfont.ttf:1 Failed to load resource: net::ERR_FAILED
editor.html:1 Not allowed to load local resource: file:///home/firecat53/docs/family/scott/src/projects/my-mind/editor.html

What changed with the refactor that doesn't allow just opening index.html?
That's still the recommended way to run the app per the README.

Thanks!

from my-mind.

ondras avatar ondras commented on June 6, 2024

What changed with the refactor that doesn't allow just opening index.html?

Opening index.html itself is okay. But the app fails to fetch a crucial bit of CSS that is later used to inject styles into the map (exported SVG needs the inline CSS to maintain consistent visuals). And fetching stuff while using file:// is apparently problematic.

That's still the recommended way to run the app per the README.

I will have to update the README then. Using file:// is already limiting you in several other ways (basically nothing network-related works).

On the other hand, we might be able to fetch the problematic CSS file via XHR - this API might not be CORS-limited.

from my-mind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.