electron

Electron auto update fails silently when installing update on Windows

故事扮演 提交于 2020-01-15 09:52:12
问题 I have an electron app which uses electron-builder for building, packing & publishing the app. I have the following auto-update code: autoUpdater.logger = log; autoUpdater.logger.transports.file.level = "info"; autoUpdater.autoDownload = true; const updateCheck = () => { autoUpdater.checkForUpdates().then(resp => { log.info("autoUpdate response:"); log.info(resp); }); }; app.on("ready", async () => { log.info(`Version: ${app.getVersion()}`); autoUpdater.on("update-downloaded", () => { log

How to get the url of the BrowserWindow?

僤鯓⒐⒋嵵緔 提交于 2020-01-15 05:11:29
问题 This is a pretty basic question. In electron, how do I check the url/filename of a BrowserWindow? let win; app.on('ready', () => { win = new BrowserWindow(); win.loadFile(path.join(__dirname, 'public', 'main.html')); win.on('closed', () => { app.quit(); }) }); Ok, so say, this is the code, say after a certain event happens in a different (add:insert) BrowserWindow, I want to get the url from the main BrowserWindow (win). let addWin; ipcMain.on('createAddWin', ()=>{ addWin = new BrowserWindow(

How to get the url of the BrowserWindow?

…衆ロ難τιáo~ 提交于 2020-01-15 05:11:12
问题 This is a pretty basic question. In electron, how do I check the url/filename of a BrowserWindow? let win; app.on('ready', () => { win = new BrowserWindow(); win.loadFile(path.join(__dirname, 'public', 'main.html')); win.on('closed', () => { app.quit(); }) }); Ok, so say, this is the code, say after a certain event happens in a different (add:insert) BrowserWindow, I want to get the url from the main BrowserWindow (win). let addWin; ipcMain.on('createAddWin', ()=>{ addWin = new BrowserWindow(

Dropbox oauth window is not working

£可爱£侵袭症+ 提交于 2020-01-14 13:16:28
问题 I'm porting my application to Electron and I was surprised to find out that the Dropbox authentication doesn't work in this environment. It does work in Chrome though. The sign-in buttons remain disabled and the labels appear over the inputs. The following message is displayed in the console: The Content-Security-Policy directive 'worker-src' is implemented behind a flag which is currently disabled. I'm testing using dropbox@2.5.7, electron@1.7.7 on OS X. I found a similar question, but it

Electron executable not recognized by Nautilus

时间秒杀一切 提交于 2020-01-14 10:21:44
问题 I'm not able to build an executable file of an Electron App with the following command: electron-packager . electron-tutorial-app --overwrite --asar=true --platform=linux --arch=x64 --prune=true --out=release-builds The build file, which is a shared library file (application/x-sharedlib), is not executing on Ubuntu 18 . Instead, I'm getting the following error message when opening the file in Nautilus: Could not display "electron-tutorial-app" There is no application installed for "shared

Cannot find module in Electron

女生的网名这么多〃 提交于 2020-01-14 09:16:08
问题 I am currently working on Electron with Babylon. I found this repo which I basically used as a boilerplate for my own project. Everything was working well until I tried to add jquery.pep.js for other needs. I keep on having this mistake : Uncaught Error: Cannot find module 'jquery.pep.js' I installed both libraries with "npm i -S jquery" and "npm i -S jquery.pep.js". In order to make jquery works, I added this script in the head of my index.html <script> delete window.module; </script> and

electron - node.js - fs.readFileSync requires admin privileges when electron is built and in Program Files

五迷三道 提交于 2020-01-14 03:03:09
问题 I've successfully built my electron application which appears to be working substantially fine. I use the node module fs to access files for use in my application, which is standard affair for Electron. This works exactly as expected in the development environment, and even when I build my app with the asar in C:\Users\myApp\ I can access the files from the built electron application. However, when I've created an installer and placed the application @ C:\Program Files(x86)\myApp\ fs

Accessing an SDK that is written in c++ using node.js

旧巷老猫 提交于 2020-01-13 11:15:18
问题 I have a SDK that will communicate with my Scanner device that is written in C++ language. I need to develop an Electron App that can access the Scanner device. I know there are many libraries available for scanner but I want to use this SDK since it will allow me to access full feature of the device and moreover it is provided by the device manufacturer. So, is there any way to implement this. Please suggest me any idea. 回答1: You can use the native V8 API for that. You will need to provide a

Accessing an SDK that is written in c++ using node.js

吃可爱长大的小学妹 提交于 2020-01-13 11:15:11
问题 I have a SDK that will communicate with my Scanner device that is written in C++ language. I need to develop an Electron App that can access the Scanner device. I know there are many libraries available for scanner but I want to use this SDK since it will allow me to access full feature of the device and moreover it is provided by the device manufacturer. So, is there any way to implement this. Please suggest me any idea. 回答1: You can use the native V8 API for that. You will need to provide a

Testing Electron application with org.openqa.selenium in a Java environment (Intellij)

眉间皱痕 提交于 2020-01-13 04:56:25
问题 Is there a way to create automated scenarios using cucumber and selenium-webdriver in Java environment for an Electron application? I found some Node.js solutions on electron.atom.io, but I would prefer Java. Thanks. 回答1: You can use Electron browser with ChromeDriver. Try creating WebDriver with similar setup: // If chromediver executable is not in your project directory, // point to it with this system variable System.setProperty("webdriver.chrome.driver", "D:\\chromedriver.exe"); Map