Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. I think the error appears in the main process, because it pops up in my terminal and not the dev tools. https://github.com/retrohacker/electron/blob/protocol_request/spec/api-protocol-spec.js#L108, Is there a way to forward requests from file:// to http://, Using file:// breaks the link to //cdn.jsdelivr.net. Launching the CI/CD and R Collectives and community editing features for Running an angular 2 application built locally on Chrome using angular-cli without a node server, A component is changing an uncontrolled input of type text to be controlled error in ReactJS, Ng Build --prod Error with "Please add a > @Pipe/@Directive/@Component annotation" Message, REACT & Expressjs: Backend can't 'serve' static frontend, Only main page loads after React App Build, other pages returns your file couldn't be accessed error (ERR_FILE_NOT_FOUND). How do I fit an e-hub motor axle that is too big? Currently it does not. Can I use a vintage derailleur adapter claw on a modern derailleur. You can do it like so: I dont know if this is really a good idea though, in theory this is great since it allows developers to specify custom request guards for the filesystem, but then again how useful is it when it only works in development mode? To subscribe to this RSS feed, copy and paste this URL into your RSS reader. The text was updated successfully, but these errors were encountered: Try this as an alternative way to get around this path issue: @shama Thanks for snippet. Failed to load resource: net::ERR_FILE_NOT_FOUND for PNG images - eLearning I am facing strange problem where images do not load if I enable reporting while publishing the course.. Show All Notifications Join Community Sign In Post here Blogs Virtual Reality Video-Based Learning Screen Capture Interactive eLearning eLearning Resources Here's a minimal gist that shows the issue: https://gist.github.com/3e9239970afe56956d7fc93f97b4881f. Add the base element just after the
tag. message: (node:109547) electron: Failed to load URL: file:///snap/kontena-lens/185/resources/static/splash.html with error: ERR_FILE_NOT_FOUND To Reproduce Steps to reproduce . Is it possible that user-defined protocols in the "ready" event aren't loaded because the setupProtocol function has been called prematurely? Are you just opening the index.html in the browser or are you using serve -s build and such? Loved your answer :). I can't get it to duplicate with my test application, but I did find some sort of cause in my main application. Was Galileo expecting to see so many stars? Navigate to Extensions in the left pane. I successfully replicated the problem with https://github.com/lyswhut/test-load-local-file. Actually I reproduce this problem by using Chokidar to watch the node_modules, which in this example I add React as dependency, so lots of directories and files in it, which make Chokidar may run a little bit longer than before. Please see the log https://gist.github.com/frozeman/c3ba0ee4b04d8ddb25c2. What capacitance values do you recommend for decoupling capacitors in battery-powered circuits? The solution is to intercept the file protocol. You need to add "homepage": "./" to your package.json. The number of distinct words in a sentence. Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. Already on GitHub? The issue here was when you run the npm run build command without the homepage entry added in your package.json,it is built assuming that the project directory (where you are running the command) is hosted at server root. Applications of super-mathematics to non-super mathematics, Parent based Selectable Entries Condition. I created a set of tests which demonstrate the problem: https://github.com/retrohacker/electron/blob/protocol_request/spec/api-protocol-spec.js#L108. Why does Jesus turn to the Father to forgive in Luke 23:34? 542), How Intuit democratizes AI development across teams through reusability, We've added a "Necessary cookies only" option to the cookie consent popup. I think the win.loadFile('index.html') is like a shit! when you have webpack-dev-server serve the app via http: ), but gets overriden by the 'real' file: url scheme when packaged ( since in this case the document gets loaded via the file: url scheme in the first place ). I can also verify it isn't Windows-specific. Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Sign up for a free GitHub account to open an issue and contact its maintainers and the community. I'll dig in more as soon as i can. Environment (please complete the following information): Logs: Click on the hamburger Menu button in the top right corner of the window. Please everyone, tell me, how should I set the path to the file? loadExtension. The process in my main application works like this: There's a lot of fluff in this test application, sorry about that. lens starting, window coming up. The