electron

Electron window store build crashing

99封情书 提交于 2020-01-25 05:59:05
问题 We are using electron builder with reactJs to create windows application our application packaged well in .exe with the help of electron-builder but not able to published on windows store even followed the guide provided by windows-electron-store. Getting error while executing this command: electron-windows-store --input-directory ./dist --output-directory ./output --package-version 1.0.0.0 --package-name cra-electron You can see I provide all required arguments --input-directory, --output

Control a WebView object in Electron with typescript

坚强是说给别人听的谎言 提交于 2020-01-25 00:28:10
问题 I'm trying to generate a instance of a webview using typescript. I'm using electron-forge's react-typescript template. I tried the following: import {Component} from 'react'; import * as React from 'react'; import {WebviewTag} from 'electron'; class MediaWebView extends Component<{ url: string }, {}> { renderWebVierw() { const myWebView: WebviewTag /* error here */ = (<webview src={this.props.url} autosize='on' nodeintegration='on' disablewebsecurity='on' webpreferences=

Electron package - how to write/read files

浪子不回头ぞ 提交于 2020-01-24 23:06:14
问题 I have file test.txt in my root directory of app. When I run my app with command npm start , I can write to my file without any problem, but when I make package using electron packager, writing text to my file is not possible anymore - I got error Error: EACCES: permission denied, open './test.txt' For this, I'm using node.js filesystem: fs.writeFile("./test.txt",text,function(err){ if(err) { return alert(err); } alert("saved"); }); How is possible to make this working? And is possible to

Electron package - how to write/read files

半城伤御伤魂 提交于 2020-01-24 23:05:41
问题 I have file test.txt in my root directory of app. When I run my app with command npm start , I can write to my file without any problem, but when I make package using electron packager, writing text to my file is not possible anymore - I got error Error: EACCES: permission denied, open './test.txt' For this, I'm using node.js filesystem: fs.writeFile("./test.txt",text,function(err){ if(err) { return alert(err); } alert("saved"); }); How is possible to make this working? And is possible to

Electron package - how to write/read files

回眸只為那壹抹淺笑 提交于 2020-01-24 23:05:15
问题 I have file test.txt in my root directory of app. When I run my app with command npm start , I can write to my file without any problem, but when I make package using electron packager, writing text to my file is not possible anymore - I got error Error: EACCES: permission denied, open './test.txt' For this, I'm using node.js filesystem: fs.writeFile("./test.txt",text,function(err){ if(err) { return alert(err); } alert("saved"); }); How is possible to make this working? And is possible to

simple example of electron app with spectron test

北战南征 提交于 2020-01-24 19:34:37
问题 I am trying to learn how to test apps, build with electron, using spectron. for this I took an example application from the web with a simple header, counter label, and incrementer button. I use mocha as a test runnen. The test should launch the app, push the button and check the counter label. I can't even get to the point where the app is launched properly. I am getting the error " TypeError: Cannot read property 'waitUntilWindowLoaded' of undefined" when I run the test. Also when looking

Electron Auth0Lock “Origin file:// not allowed”

六眼飞鱼酱① 提交于 2020-01-24 11:33:14
问题 Trying to get auth0 working with my electron app. When I follow the default tutorial and try to authenticate with Username-Password-Authentication, the lock fails with a 403 error and responds with "Origin file:// is not allowed". I've also added "file://*" to the Allowed Origins (CORS) section of my client settings in the auth0 dashboard. Auth0 Lock with console errors Origin file:// is not allowed EDIT: Lock setup in electron var lock = new Auth0Lock( 'McQ0ls5GmkJRC1slHwNQ0585MJknnK0L',

how can i turn off the debug view in electron?i cant find any about it using google

邮差的信 提交于 2020-01-24 03:01:05
问题 every time i run my electron app,it starts like this! always turn the front-end elements view,how can i start my app without this show on GUI? besides,why it goes with black bg? it went well on chrome. thank u,guys 回答1: The black screen is probably due to the css files routes. Check them. If you followed the starter electron tutorial, you are most likely calling mainWindow.openDevTools(); . Remove that line and you will not get the console. 回答2: Check if your code is calling openDevTools().

Angular2 Plugin Mechanism

回眸只為那壹抹淺笑 提交于 2020-01-24 00:39:06
问题 I created a new Angular2 project with angular-cli. I wrapped it into Electron to use it as a desktop application. The app is more or less a simple window with a navbar and a plus sign in the middle. Clicking the plus should allow importing 'Plugins' to enrich the application. Plugins are complete Angular2 Projects itself, coming with their own package.json and dependencies. They could be packaged with webpack if necessary. Is there a way/approach to do this? Thanks 回答1: you can refer the

how to communicate between react and electron

你说的曾经没有我的故事 提交于 2020-01-24 00:31:53
问题 Creating desktop application using react and electron.I want to call method in main.js of electron from react component.In angular there was a npm package. import React, { useState, useEffect, useRef } from 'react'; import './diagnosis.css'; const electron = window.require('electron');// if i use require('electron') throws error function Diagnosis(props) { const [data, setData] = useState({ hits: [] }); useEffect(() => { getExeFiles(); }); const getExeFiles = () => { electron.ipcRenderer.send