expwez
сделал все по инструкции
expwez
та же ошибка в гугле ничего нет по ней
expwez
решил заменив "protocol": "inspector", на "protocol": "legacy",
expwez
всем спасиб
Sheldhur
мб электрон это не мое
попробуй поставить старую версию электрона, на новых иногда почему-то лагает postinstall скрипт, если запустится ок то можно поверх новый электрон накатить
Sheldhur
1.6
Electron.js releases
electron v1.7.8 https://github.com/electron/electron/releases/tag/v1.7.8 Bug Fixes [SECURITY] Fixed Chromium RCE vulnerability Linux Fixed app.makeSingleInstance hanging. #10586 (https://github.com/electron/electron/pull/10586) macOS Fixed missing extension when saving a file without filters #10586 (https://github.com/electron/electron/pull/10586)
Electron.js releases
electron v1.6.14 https://github.com/electron/electron/releases/tag/v1.6.14 (placeholder)
Petr
Товарищи, может кто в курсе, есть у электрона какая-нить переменная для перенаправления биннарников с гитхаба на внутренний репозиторий? По аналогии с sass_binary_site у NodeSass, или phantomjs_cdnurl для PhantomJS соответственно.
Petr
Нагуглил. Если кому-то будет актуально: electron_mirror
Nickolai
Вопрос к тем, кто использовал electron-forge на Linux. Как правильно в конфиге указывать postinstall скрипт? Вроде указал, сделал его исполняемым, а он не выполняется структура forge.config.js config -> electronInstallerDebian -> { scripts: source/postinstall.bash }
Electron.js releases
electron v1.8.1 beta https://github.com/electron/electron/releases/tag/v1.8.1 Note: This is a beta release. This is the first release running on upgraded versions of Chrome/Node.js/V8 and most likely will have have some instability and/or regressions. Please file new issues for any bugs you find in it. This release is published to npm (https://www.npmjs.com/package/electron) under the beta tag and can be installed via npm install electron@beta, or npm i electron@1.8.1. Upgrades Upgraded from Chrome 58.0.3029.110 to 59.0.3071.115. #9946 (https://github.com/electron/electron/pull/9946) Upgraded from Node 7.9.0 to 8.2.1. #9992 (https://github.com/electron/electron/pull/9992) Upgraded from v8 5.8.283.38 to 5.9.211.38. #9946 (https://github.com/electron/electron/pull/9946) Upgraded from @types/node ^7.0.18 to ^8.0.24. #10328 (https://github.com/electron/electron/pull/10328) Other Changes Added arm64 builds. #10219 (https://github.com/electron/electron/pull/10219) Ensure DesktopCapturers are destroyed when no longer needed. #10223 (https://github.com/electron/electron/pull/10223) New guide for implementing updates. #10251 (https://github.com/electron/electron/pull/10251) Doc fixes. #10273 (https://github.com/electron/electron/pull/10273), #10304 (https://github.com/electron/electron/pull/10304), #10306 (https://github.com/electron/electron/pull/10306), #10215 (https://github.com/electron/electron/pull/10215), #10380 (https://github.com/electron/electron/pull/10380), #10453 (https://github.com/electron/electron/pull/10453), #10454 (https://github.com/electron/electron/pull/10454), #10472 (https://github.com/electron/electron/pull/10472), #10481 (https://github.com/electron/electron/pull/10481), #10487 (https://github.com/electron/electron/pull/10487), #10499 (https://github.com/electron/electron/pull/10499), #10497 (https://github.com/electron/electron/pull/10497), #10509 (https://github.com/electron/electron/pull/10509), #10540 (https://github.com/electron/electron/pull/10540), #10550 (https://github.com/electron/electron/pull/10550), #10542 (https://github.com/electron/electron/pull/10542), #10505 (https://github.com/electron/electron/pull/10505), #10326 (https://github.com/electron/electron/pull/10326) Fixed sandbox crash when opening a background tab. #10264 (https://github.com/electron/electron/pull/10264) Fixed contextIsolation not working when webPreference sandbox is on. #10214 (https://github.com/electron/electron/pull/10214) Fixed issue with webContents did-change-theme-color event. #10240 (https://github.com/electron/electron/issues/10240) Added tracking of the origin of webRequest events. #10429 (https://github.com/electron/electron/pull/10429) Added support for css in content_scripts. #10076 (https://github.com/electron/electron/pull/10076) Fixed mixed content errors when loading content from chrome-extension. #9950 (https://github.com/electron/electron/pull/9950) Fixed BrowserView auto-resize and BrowserWindow resize event. #10052 (https://github.com/electron/electron/pull/10052) Added getMenuItemById(id) to Menu API. #10440 (https://github.com/electron/electron/issues/10440) Fixed v.1.8.0 crashes. #10571 (https://github.com/electron/electron/issues/10571) Changed to not allow drag on fullscreen window. #10627 (https://github.com/electron/electron/pull/10627) [SECURITY] Fixed Chromium RCE vulnerability. Linux Added support for indicators in Ubuntu Gnome Session. #10355 (https://github.com/electron/electron/pull/10355) Fixed app.makeSingleInstance hanging. #10518 (https://github.com/electron/electron/pull/10518) macOS Fixed issues around update permissions and non-admin users. #10071 (https://github.com/electron/electron/pull/10071) #10298 (https://github.com/electron/electron/pull/10298) Fixed full screen when resizable is set to true. #8166 (https://github.com/electron/electron/issues/8166) Fixed missing file extension in download save dialog. #10121 (https://github.com/electron/electron/issues/10121)
Electron.js releases
Fixed occasional crashes on macOS Sierra when inputting with Chinese IME. #7551 (https://github.com/electron/electron/issues/7551) Fixed issue closing window if a child modal window is open. #10366 (https://github.com/electron/electron/pull/10366) Fixed show option on new BrowserWindow when parent is specified. #8836 (https://github.com/electron/electron/issues/8836) Fixed shell.openItem to activate the opened app. #10477 (https://github.com/electron/electron/issues/10477) Windows Fixed uncaught exception on window close. #10275 (https://github.com/electron/electron/pull/10275) Fixed Electron crash after close. #10188 (https://github.com/electron/electron/issues/10188) Fixed crash copying cropped image to clipboard. #8017 (https://github.com/electron/electron/issues/8017) Fixed potential crash in Win32 notifications. #10516 (https://github.com/electron/electron/pull/10516) Changed to set duration for Windows 7 notifications based on Control Panel settings. #10517 (https://github.com/electron/electron/pull/10517) Fixed browser-process notifications missing/duplicating images. #10610 (https://github.com/electron/electron/issues/10610) Fixed for narrowing conversion warnings, minor style change. #10609 (https://github.com/electron/electron/pull/10609) Fixed downloading updates twice. #5057 (https://github.com/electron/electron/issues/5057) API Changes Added -webkit-app-region support to BrowserView. #10232 (https://github.com/electron/electron/pull/10232) Added a callback option to webContents.print. #10081 (https://github.com/electron/electron/pull/10081) macOS Added support for sound in macOS notifications. #10293 (https://github.com/electron/electron/pull/10293) Added app.isInApplicationsFolder() and app.moveToApplicationsFolder(). #10142 (https://github.com/electron/electron/pull/10142) Added new roles for macOS native tab menu items. #9086 (https://github.com/electron/electron/issues/9086), #10064 (https://github.com/electron/electron/issues/10064) Added app.setAccessibilitySupportEnabled(enabled) to enable or disable accessibility support in macOS. #7206 (https://github.com/electron/electron/issues/7206), #10305 (https://github.com/electron/electron/pull/10305) Added macOS native tab methods to the BrowserWindow API. #10321 (https://github.com/electron/electron/pull/10321) Added simple fullscreen mode to the BrowserWindow API. #10254 (https://github.com/electron/electron/pull/10254) Added more Handoff related APIs. #9869 (https://github.com/electron/electron/pull/9869) Windows Added support to forward mouse events via win.setIgnoreMouseEvents(ignore[, options]). #10183 (https://github.com/electron/electron/pull/10183)
Антон
Подскажите как сделать что бы все запросы loadURL шли через прокси сервер. Вроде кучу всего перерыл и ни чего не нашел
Anonymous
Подскажите как сделать что бы все запросы loadURL шли через прокси сервер. Вроде кучу всего перерыл и ни чего не нашел
Слать в запросы на свой сервер(прокси) и в параметрах (либо как угодно) указать целевой url и назад также
Anonymous
И присылаете ответ
Антон
А если это не мой прокси сервер и есть только ip и порт и прокси по socket5
Evgeniy
А какой значек за основу берет электрон в уведомлениях? а то я у самой приложухи сменил значек но в уведомлениях дефолтный всё равно
Evgeniy
там 2 их же
Evgeniy
ну тот который передаю плюс значек самого приложения
Evgeniy
Не могу разобраться как из под мака запаковать на винду wine homebrew Xquartz всё поставил всё равно ошибку пишет - Could not find "wine" on your system. Wine is required to use the appCopyright, appVersion, buildVersion, icon, and win32metadata parameters for Windows targets. Make sure that the "wine" executable is in your PATH.
Evgeniy
а всё просто не так поставил
Владимир
require("./my_module") ?
Sheldhur
в package.json надо указать какие директории пихать в сборку
Sheldhur
в build.files добавить путь к директории с модулем\модулями
Evgeniy
The module 'node_modules/node-mac-notifier/build/Release/Notification.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 57. This version of Node.js requires NODE_MODULE_VERSION 54. Please try re-compiling or re-installing the module (for instance, using npm rebuild or`npm install`).
Evgeniy
ставлю значит эти нотификации выдает это что делать не пойму ребилд тоже пробовал
Aleksandr
Всем привет, было у кого, что при билде зависимости которые есть в депенденси не попадают в сборку?
Sergo
ставлю значит эти нотификации выдает это что делать не пойму ребилд тоже пробовал
Попробуй удалить все модули и установить заново. но, в целом, ребилд должен работать.
Evgeniy
уже делал и так и так)
Sergo
уже делал и так и так)
покажи код где ты реквайришь этот модуль
Dmitry
npm rebuild --runtime=electron --target=1.6.6
Dmitry
вот target=1.6.6 это 54 NODE_MODULE_VERSION если не ошибаюсь
Evgeniy
попробуй target поменять
npm rebuild --runtime=electron --target=1.6.6 > node-mac-notifier@0.0.13 install /Volumes/DATA/blogman/node_modules/node-mac-notifier > node-gyp rebuild gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: 404 response downloading https://iojs.org/download/release/v1.6.6/iojs-v1.6.6.tar.gz gyp ERR! stack at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:210:14) gyp ERR! stack at emitOne (events.js:120:20) gyp ERR! stack at Request.emit (events.js:210:7) gyp ERR! stack at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1074:10) gyp ERR! stack at emitOne (events.js:115:13) gyp ERR! stack at ClientRequest.emit (events.js:210:7) gyp ERR! stack at HTTPParser.parserOnIncomingClient (_http_client.js:565:21) gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23) gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:454:20) gyp ERR! stack at emitOne (events.js:115:13) gyp ERR! System Darwin 16.7.0 gyp ERR! command "/usr/local/Cellar/node/8.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Volumes/DATA/blogman/node_modules/node-mac-notifier gyp ERR! node -v v8.6.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-mac-notifier@0.0.13 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-mac-notifier@0.0.13 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Sheldhur
Всем привет, было у кого, что при билде зависимости которые есть в депенденси не попадают в сборку?
глянь https://github.com/chentsulin/electron-react-boilerplate у них два package.json один в корне проекта, другой в app, все зависимости из app/package.json пихаются в asar
Aleksandr
Спасибо
Evgeny
Кому-нибудь удается успешно использовать лерну, yarn-workspaces и electron-builder?
jk
Ребят, а как отменить поведение по умолчанию кнопки Esc? Я не хочу выходить из фуллскрина по её нажатию, она используется в приложении. Запустил с пустой страницей, event listener'ов нет, а Escape работает.
jk
Похоже не работает. Пробовал в main app.on('ready', () => { globalShortcut.unregisterAll() globalShortcut.unregister('Escape') createWindow() }); Пробовал в renderer require('electron').remote.globalShortcut.unregisterAll() Ноль реакции.
Alexander
мб не шарю, но нельзя просто повесить keyup/keypress и return false, если esc?
jk
мб не шарю, но нельзя просто повесить keyup/keypress и return false, если esc?
Типа этого? Я тоже с эвентами только вчера познакомился. <script> document.addEventListener("keydown", function (e) { if (e.which === 27) { return false; } }); </script> Не работает.
jk
e.preventDefault() если добавить тоже не пашет.
jk
Неужели это поведение прибито к полу?
Kolpakov
ну, я бы начал с простого electron.globalShortcut.register('Escape', ()=>console.log('aaa'))
Kolpakov
кстати, вот тут есть обсуждение того как по эскейп выйти из фулскрина https://stackoverflow.com/questions/37967513/exit-full-screen-when-esc-is-pressed-using-javascript-with-electron
jk
ну, я бы начал с простого electron.globalShortcut.register('Escape', ()=>console.log('aaa'))
В консоли require('electron').remote.globalShortcut.register('Escape', ()=>console.log('aaa')) document.body.webkitRequestFullscreen() aaa В index.html те же пироги
Kolpakov
В консоли require('electron').remote.globalShortcut.register('Escape', ()=>console.log('aaa')) document.body.webkitRequestFullscreen() aaa В index.html те же пироги
я бы не писал это в рендере раз колбек вызывается то дальше нужно просто почитать как управлять распространением события и т.п. на худой конец можно при любом нажатии вызвать win.setFullScreen(true)
jk
Вот так костыль let fullScreen = false; globalShortcut.register('Escape', () => { if (fullScreen) { win.setFullScreen(true) } }) globalShortcut.register('F4', () => { if (fullScreen) { win.setFullScreen(false); fullScreen = false; } else { win.setFullScreen(true); fullScreen = true; } }) Но кажется работает.
jk
Делает кнопки глобальными в ОС, работают если окно не в фокусе, одновременно вырубая все эвент листенеры в renderer процессе.
jk
Как это сделать то вообще, у меня знаний не хватает.
jk
let fullScreenElectron win.webContents.on('before-input-event', (event, input) => { if (input.code === 'Escape' && input.type === 'keyDown') { if (fullScreenElectron) { win.setFullScreen(true); } } else if (input.code === 'F4' && input.type === 'keyDown') { if (fullScreenElectron) { win.setFullScreen(false); fullScreenElectron = false; } else { win.setFullScreen(true); fullScreenElectron = true; } } }) Наканецта
Максим
ребятки, последний electron на ноде 7.9 тогда почему в main.js не поддерживаются новые импорты? import * from ''
Таймураз
импорты летом завезли и в 8 ноду
Sheldhur
разве?
Таймураз
%)
Таймураз
https://blog.chromium.org/2017/08/chrome-61-beta-javascript-modules.html
Максим
я думал они уже в 7й работают
Таймураз
я думал они уже в 7й работают
бабелем если прогнать
Den
Народ, подскажите плиз. Как сделать кастомное меню, которое сверху приложения?
Harshil
Heyyy there... Can every on chat in english Bcoz u don't know this language...
Svyatoslav
hey
Таймураз
Heyyy there... Can every on chat in english Bcoz u don't know this language...
This is a Russian speaking community. We can speak English, better than you do. But I'll admit again, none is might speak English here
Andriy ✙
Sadly
Таймураз
Sadly
If anyone can- he can sound his question here. But he should understand, that he ld get less answers than if he answers his questions in native lang for this place
Andriy ✙
just
Andriy ✙
let him
Harshil
This is a Russian speaking community. We can speak English, better than you do. But I'll admit again, none is might speak English here
Sorry for english mistake Definately you all know english better than me I didn't u its my mistake i means i don't know this language...
Harshil
I am working project based Angular4 and electron And i want to print page i tryed to call electron globle method using ipcRender but run time error says fs.existsSync is not a function
Harshil
Using Import {ipcRenderer} from 'electron';
Svyatoslav
require('fs')?
Svyatoslav
Или как там его, точно синтаксис уже не помню
Maksim
nwjs или electron что выбрать? Какой самы крупный минус nwjs?