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 (formerly Atom Shell) project was originally started by Cheng Zhao, one of the authors of NW.js (formerly known as node-WebKit), another Node.js-based platform for building desktop applications using HTML, CSS, and JavaScript. Cheng Zhao was hired by GitHub and began work on the framework on or about April 11th, 2013. On the 17th of April, 2015, with the release of version 0.24 the framework was renamed from Atom Shell to Electron.

One of the differences between Electron and NW.js frameworks is that the entry point for the app is actual JavaScript instead of an HTML page. This makes Electron more suitable for testing with PhantomJS, for instance.

Another difference is that the build process is also simpler for Electron using electron-builder, electron-forge and electron-packager. Since Electron uses libchromiumcontent to access Chromium's Content API, it's no longer required to obtain a copy of the Chromium source code. On that same note, the integration with Chromium is much more loosely coupled than in case of NW.js (which requires Chromium to be patched and maintained separately by the NW.js developers).

Probably, the most popular application built on top of Electron is a hackable text editor called Atom (also from GitHub). But there are some other interesting projects like Vivaldi Web browser, Mapbox Studio, an email client from Nylas, Slack desktop application, Pixate, Fireball game editor, Visual Studio Code, an SQL editor called Wagon, Mac app that runs Docker containers called Kitematic.


Resources :

15116 questions
4
votes
1 answer

Electron app notorizing. Notorized electron app cannot be opened on other machines

Currently I'm working on notorizing electron app for Mac using electron-builder ("electron-builder": "^22.9.1") and electron-notorize ("electron-notorize": ^1.0.0) packages. Build successfully passes. Checking app signing and notorizing statuses…
4
votes
1 answer

electron ffmpeg mas build "Illegal instruction: 4"

I am trying to release an electron app on the Mac Apple Store (mas), my electron app uses ffmpeg to render videos. In order to release my app on the mac apple store, It needs to be sandboxed, and by default ffmpeg makes calls to external libraries…
Martin
  • 1,336
  • 4
  • 32
  • 69
4
votes
0 answers

unable to load preload script in Electron but the absolute path is correct

In an Electron-Typescript-React-Webpack app I'm trying to keep contextIsolation: true and use preload. In electronjs.org docs I read : "preload String (optional) - Specifies a script that will be loaded before other scripts run in the page. This…
Raphael10
  • 2,508
  • 7
  • 22
  • 50
4
votes
3 answers

Close electron app from angular component

I'm trying to figure out how I can close an electron app with an angular component. I removed the menu bar by setting frame: false on BrowserWindow({... inside main.js. I have a close button on the top right corner of the electron app from a…
user6680
  • 79
  • 6
  • 34
  • 78
4
votes
0 answers

Accessing firestore within Electron app results in INTERNAL UNHANDLED ERROR when main field is set to 'main' instead of 'browser'

I'm using Firebase (Auth & Firestore) in an electron desktop app built using VueJS and electron-builder. When running the application with: module.exports = { configureWebpack: { resolve: { mainFields: ['browser'] } } } I…
Bogdan Rau
  • 625
  • 5
  • 17
4
votes
1 answer

How can I fix IPC error "Error invoking remote method, an object could not be cloned" in Electron?

The whole error message is the following: Error: Error invoking remote method 'MY-IPC-CHANNEL': Error: An object could not be cloned. at EventEmitter.o.invoke (electron/js2c/renderer_init.js:71) The electron/js2c/renderer_init.js:71 line is not my…
Lucas S. G.
  • 190
  • 1
  • 4
  • 16
4
votes
1 answer

Electron-builder app show blank screen for 32 bit, but works for 64-bit version

"package": "yarn build && electron-builder build --publish never", "package-win-32": "yarn build && electron-builder build --win --ia32", package will create 64-bit version of app. package-win-32 create 32-bit version of app. 64 bit version 32…
Atul Jain
  • 133
  • 1
  • 8
4
votes
3 answers

Take desktop screenshot with Electron

I am using Electron to create a Windows application that creates a fullscreen transparent overlay window. The purpose of this overlay is to: take a screenshot of the entire screen (not the overlay itself which is transparent, but the screen…
Babyburger
  • 1,730
  • 3
  • 19
  • 32
4
votes
1 answer

Electron upload file from renderer process, using form-data and axios

I am trying to programmatically upload a file (and some fields) from the render process of an Electron application. I am using the form-data and axios packages for this purpose. The code is TypeScript and, at its simplest, it looks like: import…
Tibi
  • 439
  • 7
  • 15
4
votes
1 answer

Async scaling of images in electron

I am populating a list (in my electron app), each item showing a hi-res image from disk. Now, since the list is getting longer, I am running into performance issues: Electron is occupying a whole lot of RAM, so I guess I will need to render…
stoefln
  • 14,498
  • 18
  • 79
  • 138
4
votes
1 answer

Running electron app get an error 'the futex facility returned an unexpected error'

I am trying to launch any electron application. When I just try to run app with npm start I get an error Running as root without `--no-sandbox` is not supported I edit start script from "electron ." to "electron --no-sandbox ." and get the new error…
Oleg Om
  • 429
  • 5
  • 15
4
votes
2 answers

Electron-Packager not doing anything

So I'm trying to package an electron app using electron-packager. I have followed all the tutorials and have come up with using the following code and then running it in CMD using npm run package-win. When I do this however, nothing happens. It runs…
4
votes
1 answer

Use Electron remote from other file

I have a file that contains a function that opens a file open dialog. I want to call that function from the app's menu. But when I use require to use the function from the file I get an error. Code: Main.js: const { app, BrowserWindow, Menu } =…
3174N
  • 188
  • 2
  • 14
4
votes
1 answer

Use Mapbox with offline maps in Electron app

Is it possible to have an electron app showing offline map? I downloaded the mbtiles and stored in the electron app, but I'm not able to show it in the angular side of the electron app. I have the following code:
Faabass
  • 1,394
  • 8
  • 29
  • 58
4
votes
2 answers

How to download in multipart and merge files in javascript?

I'm working on a download manager for electron js project which requires downloading large files. The multipart-download package unfortunately does not support pausing or cancelling downloads. Are there any other solution which uses Fetch or Axios…
Sai Krishna
  • 547
  • 1
  • 12
  • 26