Questions tagged [electron]
Electron (formerly Atom Shell) is a framework created by GitHub that lets you write cross-platform desktop applications using HTML, CSS and JavaScript. Electron is based upon Node.js and Chromium.
electron
15,500
questions
0
votes
0
answers
19
views
How to make all new tabs/windows in electron direct to new electron-tabs
I'm currently working on some JavaScript code for a project. My goal is to make Electron open all links that would normally result in "pop-ups" to open in new tabs under the electron-tabs ...
5
votes
1
answer
821
views
Hide window of electron app on workspace change (on macOS)
In this this SO thread is described, how to get a background tray app working on multiple workspaces (on macOS).
But when using the given code example with the win.setVisibleOnAllWorkspaces(true) ...
0
votes
0
answers
10
views
How do I check if the webview and the app are not focused
My app thinks it is not focused while the <webview> is focused.
It checks if the app and the webview's IsFocused function returns true
I'd like it to work,not do false positives!
I tried GPT3, ...
1
vote
0
answers
5
views
ERR_SSL_CLIENT_AUTH_CERT_NEEDED when sending custom client certificate from Electron
I have been trying to send a certificate (in the form of a .pem file) from Electron to my backend (using gevent) and encountering the following error
(node:18946) electron: Failed to load URL: https://...
3
votes
2
answers
2k
views
Problem while packaging application with electron-forge "EPERM operation not permitted RMDIR"
It's been a while when I last successfully packaged a electron-forge application, so I had to repackage due to a icon change. As I tried to run npm run make OR npm run package, as the command line was ...
0
votes
0
answers
11
views
Electron Forge does not pass specific `arch` for universal Mac builds
We are using ffmpeg-static in our Electron app, and creating a universal mac build via electron-forge and under the hood electron/universal. But only the arm64 ffmpeg binary exists in the final app. ...
3
votes
2
answers
7k
views
How to set column size using DOCX.JS
I am creating an application using electron and react, and I will need to create a Word text document dynamically, I found a great package, DOCX, but I need to create some tables, and I can't set the ...
0
votes
1
answer
14
views
Cannot Import local module/file in Electron-vite (vue)
index.js(entry point of electron)
import { connect } from "./MongoDB";
MongoDB.js
module.exports = {
connect,}
error-
> electron-vite dev
vite v5.3.4 building SSR bundle for ...
0
votes
0
answers
13
views
Electron Store working in dev mode but not in production
I am using Electron Store in Electron Js Project. The app is successfully built. But the electron store is not working in production/build version as I am not able to store the data persistently. What ...
0
votes
1
answer
5k
views
Using electron-store with react
so i've been messing around with electron and react to create an application, and i've been searching for a way to store data. Not like a lot of data, just a few things that i need.
i've found that ...
0
votes
0
answers
8
views
Can't debug the frontend of Electron/TypeScript/React/Webpack project in VS Code
I am working on Electron/TypeScript/React/Webpack project, this is my launch.json file in VS Code Run and Debug:
{
"version": "0.2.0",
"configurations": [
{
...
12
votes
2
answers
12k
views
Play local .avi videos in Node.js / Electron app
Maddening gap in an app I'm developing is there appears to be little (or no) support for AVI in the HTML5 video implementation. So, I need a workaround that is cross-platform, and package-able with my ...
0
votes
0
answers
5
views
How to create a minimize button?
index.js
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
resizable: false,
frame: false,
icon: path.join(__dirname, 'icon.png'),
webPreferences: {
preload:...
4
votes
4
answers
11k
views
Failed at the [email protected] postinstall script
I was trying to install electron into my project, but it is giving an error. I also tried to do this with unsafe-perm, but still giving the same error.
npm install electron --save-dev --save-exact
&...
0
votes
0
answers
15
views
SSH2-SFTP-client module won't import
I am trying to import and use the ssh2-sftp-client package for my React/Electron project, but any time I add the import to a file, I get a massive wall of module errors. They are all either
"Can'...
92
votes
5
answers
100k
views
Electron Take Up 100% Of Screen (Not Full Screen)
I've got an electron app, below is the main.js file:
var app = require('electron').app;
var BrowserWindow = require('electron').BrowserWindow;
app.on('ready', function() {
mainWindow = new ...
0
votes
0
answers
33
views
node native c++ code in electron unexpected character
This is my folder structure:
└── my-electron-project/
├── lib/
│ └── addon/
│ ├── build/
│ │ └── Release/
│ │ └── addon.node
│ ├── addon.cc
│ ├── binding.gyp
│ ...
2
votes
2
answers
3k
views
How to set a custom path for Electron app installer
Is there a way to ask custom installation path to the user during electron app installation?
4
votes
0
answers
2k
views
Electron fixed position to the right side of the screen
I'm currently trying to implement the toolbar which is fixed to the right side of the screen. Initial state works fine. When I try to dynamically change the content width from the app, BrowserWindow ...
0
votes
0
answers
13
views
pathMapping in vs code debug is not working
I have the following as my launch.json file
{
"version": "0.2.0",
"configurations": [
{
"name":"Launch vite:dev",
"request&...
3
votes
1
answer
3k
views
Playwright upload file on non-input element
So I'm currently trying to automate uploading a profile photo on an Electron App using Playwright and I'm running into issues with 'filechooser' event.
await windowA.click('data-testid');
const [...
0
votes
0
answers
69
views
net::ERR_CONNECTION_RESET when trying to fetch/getting data from localhost http server
I got a http server in C++ running on my localhost to get some data transfered to my electron react frontend. Unfortunately I run into heavy issues and I tried googling all day & night. It uses ...
0
votes
0
answers
23
views
Backend Port Remains Open When Electron App Exits
I'm doing an electron app, but every time I close or quit the app it leaves a pid hanging from the port that the backend opens. How could I kill all the process when I close the app?
This is the ...
-1
votes
0
answers
16
views
self hosted SSL for electron app front-back communication
For and Electron JS app, with python backend flask server, openssl self hosted certificates have been suggested for secure https connection between he frontend and backend.
I wanted to ask if this is ...
-1
votes
0
answers
18
views
How to Package and Distribute an Electron App for Use on Another Computer? [closed]
i'm very new to development (i started learning 4 months ago) and i took the challenge to make a simple desktop app using VSCode and electron for my internship's supervisor, it basically helps him to ...
-4
votes
0
answers
48
views
Bug in finding image in electron with sqlite [closed]
So, my problem is that my app can't find my image, and on my sqlite database there's just a txt file that says undefined:
This function goes immidietely after entering the app
ipcMain.on('load-...
0
votes
0
answers
18
views
Desktop application with file manipulation [closed]
So I want to create a desktop app that is run locally. It doesn't need to use internet. But it does need to read, write and create some excel files. Now I wrote the app in react.
And I did some ...
0
votes
2
answers
56
views
How do I gray elements based on class name?
I'm trying to grey the border elements smoothly with css smoothing and it does nothing and the elements are 1 pixel thick
code:
function greyBorder()
{
var elms
...
1
vote
0
answers
14
views
Executable/installable files with electron FE and python BE
I have a problem with my current project.
I have a backend written in python which i complain with pyinstaller to an exe.
The py BE communicate with websockets with the FE written in JS/hmtl/css.
I ...
0
votes
0
answers
11
views
Icons of Element UI do not appear
I'm using Element UI with an Electron - Vue 2.6 - Vite - SCSS app, and the icons (like ) do not appear. All the other Element UI components work just fine.
I have followed the instructions on https://...
0
votes
0
answers
12
views
How to Resolve "LNK1107: invalid or corrupt file" Error When Linking MuPDF C library with Node.js Addon?
I've built MuPDF
with the Dynamic Libr
ary(.dll) configuration and can see libmupdf.dll and libmupdf.exp files in ....mupdf/platform/win32/x64/Release/
//binding.gyp :-
{
"targets": [
...
3
votes
3
answers
3k
views
Unable to use keytar in main.js of electron project
I keep getting this error:
error in ./node_modules/keytar/build/Release/keytar.node
Module parse failed: Unexpected character '�' (1:2)
You may need an appropriate loader to handle this file type, ...
0
votes
0
answers
11
views
Electron-builder tries to download old blockmap from latest pipeline
I am trying t configure Electron-builder autoUpdater to work with gitlab. The autoUpdater detects a new version (1.1.0 --> 1.1.1). Afterwards, it tries to download the blockmap from 1.1.0 from the ...
1
vote
1
answer
3k
views
How Can I use speech recognition in electron js
I want to use speech recognition in my electron.js app but it seems that Speech Recognition with electron is not supported.
1
vote
1
answer
421
views
How to ask for screen recording permission in electron app in Mac OS?
I am trying to create an app and ask for screen recording permission, but the app asks for permission if i directly execute desktopcapturer.getsources() function with the correct app name added.
Here ...
0
votes
0
answers
14
views
How to keep Electronjs app alive after hide to the tray on Windows
I wrote a Pomodoro app use Electronjs used function setInterval() to count down from 25:00 to 00:00. When user click minimize or close, the app hide to the tray. But then, sometimes it's stopped (may ...
0
votes
0
answers
24
views
Creating a Logger for the electron application [closed]
I want to create a logger to handle all the logs inside the application. To offload logger tasks such as writing logs to the file, rotating the log files, and sending logs to different monitoring ...
1
vote
2
answers
167
views
Electron - React app __dirname is not defined
I have an electron app that I'm packaging with vite using the forge template. I'm having trouble pulling in the ipcRenderer into the React files as it crashes the app with this error:
Uncaught ...
0
votes
1
answer
22
views
how to import my js file to the main/index.js pre-compilation , not after compilation?
I use electron-vite command pnpm create @quick-start/electron init a project
and then i create a js filegetAuthKey.js in src/main/ next to index.js
last i require getAuthKey.js in src/main/index.js,...
-1
votes
2
answers
45
views
NextJS 14 (with electron) trying to use a .node addon - module not found
I have created a next.js application with version 14.2.2
I have built a nodejs addon using the following tutorial:
https://morioh.com/a/e1a6f79af449/how-to-write-nodejs-addons-using-c-and-n-api-for-...
0
votes
0
answers
19
views
Issue with OAuth Redirect in Electron App Using Nextron Framework in Production
to authenticate and interact with YouTube APIs. The app works perfectly in development mode, but I am facing an issue in production mode regarding the OAuth redirect URI.
In development mode, the ...
22
votes
5
answers
19k
views
(How) can I open the dev tools in the Microsoft Teams desktop client?
I thought I had recently seen a developer open the dev tools from inside the Microsoft Teams desktop client (for Windows), but I can't easily replicate that.
Shortcuts like
Strg+Shift+I, Strg+Alt+I, ...
0
votes
0
answers
24
views
Installing Electron on Ubuntu
so i wanted to learn a bit of electron frontend development and worked myself through the installation guide on the electron site.
Everything works well, until the npm install electron --save-dev ...
4
votes
3
answers
2k
views
Paste, or otherwise output text outside of an Electron app?
From an Electron application, is it possible to output text to wherever the cursor is currently located at, i.e. even if that is somewhere outside of the actual Electron app?
So far the best solution ...
0
votes
0
answers
22
views
I am practice ipcRenderer but I can not see the result which i think would happen
I am a student and actually English is not my native language so there must be lots of grammer problem I'm so sorry.And just like what I wrote on title I'm learning how to use ipcRenderer but it didn'...
0
votes
3
answers
5k
views
React - Uncaught TypeError: Cannot read property 'state' of > null
I have the following piece of code. It is basically just a button with an event handler, and the class is supposed to hold some state which as of now is only a counter, set to 0 initially.
import ...
0
votes
0
answers
13
views
Event listener onWheel of REACT+ELECTRON makes the app lag
I'm trying to make a GUI like figma, powerpoint or event slide, where you can drag items wherever you like and even off the screen (where in this case, the screen will follow the box).
The fact is ...
1
vote
2
answers
2k
views
Electron Linux: .AppImage is not showing the icon, while .deb is
I have an Electron app which I want to distribute to all operating systems.
I have an issue with the Linux release file. I've tested both the .deb file and the .AppImage file.
The problem is the ...
-3
votes
1
answer
41
views
webContents not defined error. how to fix? [closed]
I am a beginner coder and not that good so please don't mind my code, I am trying to make an application in electron js that opens an image file and displays it in the app. and I am having to send a ...
-1
votes
0
answers
19
views
How to get the device ID and device type in Electron.js with React.js and TypeScript?
I am working on an Electron.js application that uses React.js and TypeScript. I need to obtain the device ID and device type within my application. Here is a brief overview of my setup and what I've ...