electron-process | Send blocking operations to a background process in electron | File Utils library
kandi X-RAY | electron-process Summary
kandi X-RAY | electron-process Summary
Send blocking operations to a background process in electron
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of electron-process
electron-process Key Features
electron-process Examples and Code Snippets
Community Discussions
Trending Discussions on electron-process
QUESTION
I'm learning electron, took electron-quick-start and made certain modifications to index.html, main.js and renderer.js following the tutorial at https://blog.logrocket.com/handling-interprocess-communications-in-electron-applications-like-a-pro/
index.html
...ANSWER
Answered 2021-Apr-28 at 19:37The code looks fine and should be executed when running. You might be looking at the wrong console? The log statements should appear in the console of the renderer window. To open the Developer Tools, you can press Cmd
+ Opt
+ I
(macOS) and Ctrl
+ Shift
+ I
(Windows).
You can find more information about debugging Electron applications in their documentation and the Developer Tools in Chrome's documentation.
QUESTION
I've been trying to get an Electron program to work on my Windows 10 laptop, but I can't get the BrowserWindow
to open, when I run the application from Visual Studio 2017 only the console opens up. And when I try to open the Electron.exe
itself from the folders, nothing happens. The Electron-process can be seen in the task manager, though.
Since I get no errors or anything whatsoever, I'm really confused about this. What could "stop" Electron from showing any windows? Faulty code can't be the reason, since I've used the exactly same code from Electron quick start in my project, and opening Electron.exe
doesn't require anything to be made by me.
EDIT: When I tried to make as simple Electron app as possible from zero in VS2017, I tried to put in console.log()
commands everywhere to see what is called. The point where there was one log-command before and one log-command after win = new BrowserWindow()
line, the one AFTER the new BrowserWindow()
line didn't get put into the console. Or any other after that. There are no errors, warnings, anything to be seen. Two processes start, and one of them just disappears after a while.
EDIT#2: Options for BrowserWindow
were just height and width ({width: 800, height: 600})
Nothing special there. BUT I noticed one thing after trying every Electron version manually: Every Electron version after 1.4.16 WILL NOT WORK on my computer. 1.5.0 and beyond will not let me create a new BrowserWindow
. I don't know reason to this. What did they change in 1.5.0-> so that I can't open windows.
I tried to use breakpoints in VS, but as soon as the line where a new BrowserWindow
is created is executed, the code execution just... "skips" over everything else. It doesn't go to the next breakpoint, it doesn't crash, it doesn't execute anything else, it doesn't throw any errors, it just, is. Electron.exe
console is open, VS still shows that program is running but that's about it. This is really bizarre. Same happens when trying to run the quick start app from the command line with npm start
.
ANSWER
Answered 2019-Jul-07 at 13:43I'll just post answer here since I managed to work this out long time ago. For some reason, script just "stops" whenever it gets to section where new window instance is created.
The solution for this was to use setTimeout() with 0 delay, and put rest of the code under new function inside it. It may be something to do with race conditions, but I don't know about it. I found this solution through some random GitHub Issues-section comments.
Another thing: this issue seems to happen only when window is created when app is started, but not when, for example, you call function later on through UI button when app is already running.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install electron-process
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page