Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

"electron ." fails #1307

Open
shellyofthemud opened this issue Oct 24, 2017 · 6 comments
Open

"electron ." fails #1307

shellyofthemud opened this issue Oct 24, 2017 · 6 comments

Comments

@shellyofthemud
Copy link

shellyofthemud commented Oct 24, 2017

running arch linux, latest everything, master branch

build went fine, npm run build-server works fine, i can access things from localhost:6060 in my web browser, but running "electron ." throws the folloing error:

TypeError: Cannot read property 'setIcon' of undefined
    at Object.<anonymous> (/home/sarenord/git/browserhtml/main.js:90:9)
    at Object.<anonymous> (/home/sarenord/git/browserhtml/main.js:99:3)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at loadApplicationPackage (/usr/lib/electron/resources/default_app.asar/main.js:283:12)
    at Object.<anonymous> (/usr/lib/electron/resources/default_app.asar/main.js:325:5)
    at Object.<anonymous> (/usr/lib/electron/resources/default_app.asar/main.js:361:3)
A JavaScript error occurred in the main process
Uncaught Exception:
TypeError: Cannot read property 'setIcon' of undefined
    at Object.<anonymous> (/home/sarenord/git/browserhtml/main.js:90:9)
    at Object.<anonymous> (/home/sarenord/git/browserhtml/main.js:99:3)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at loadApplicationPackage (/usr/lib/electron/resources/default_app.asar/main.js:283:12)
    at Object.<anonymous> (/usr/lib/electron/resources/default_app.asar/main.js:325:5)
    at Object.<anonymous> (/usr/lib/electron/resources/default_app.asar/main.js:361:3)

(electron:6397): Gdk-WARNING **: gdkwindow-x11.c:5573 drawable is not a native X11 window

(electron:6397): Gdk-WARNING **: gdkwindow-x11.c:5573 drawable is not a native X11 window

(electron:6397): Gdk-WARNING **: gdkwindow-x11.c:5573 drawable is not a native X11 window```
@paulrouget
Copy link
Contributor

/cc @Gozala

@Kilian
Copy link

Kilian commented Jan 4, 2018

Only MacOS has a dock, so it should be in an if-clause:

if (process.platform === 'darwin') {
    app.dock.setIcon(...);
}

Edit: On linux (Ubuntu), there are a number of Electron configurations that cause issues, such as which parts of the app are draggable (parts can not be draggable and clickable at the same time), and no required custom UI for window controls (close, minimize) that you get "for free" on Mac, but that you need to supply yourself on other platforms. If, instead of frame: false, you use titleBarStyle: 'hidden',, you get the desired effect on macos, and windows and linux will get a native titlebar.

@nextlevelshit
Copy link

@Kilian Are there already any PR's?

@Kilian
Copy link

Kilian commented Jul 3, 2018

@nextlevelshit not by me...This repository doesn't have a lot of activity it seems so I doubt any PR would be looked at.

@paulrouget
Copy link
Contributor

@nextlevelshit
Copy link

@paulrouget Thanks! But it stays sad -.-

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants