[linux] crash on launch (systemPreferences.askForMediaAccess is not a function)
fczuardi opened this issue · 3 comments
fczuardi commented
Steps to reproduce:
- on a Linux machine, follow the instructions on README to either build or start with npm
- example
npm start
- example
Expected result:
- an icon in the system tray appears
Actual result:
- the startup fails due to the use of macOS exclusive electron APIs:
A JavaScript error occurred in the main process
Uncaught Exception:
TypeError: systemPreferences.askForMediaAccess is not a function
at Object.<anonymous> (/home/fcz/github/clipshare/dist/linux-unpacked/resources/app.asar/main.js:18:38)
at Module._compile (node:internal/modules/cjs/loader:1373:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1432:10)
at Module.load (node:internal/modules/cjs/loader:1215:32)
at Module._load (node:internal/modules/cjs/loader:1031:12)
at c._load (node:electron/js2c/node_init:2:17025)
at node:electron/js2c/browser_init:2:126921
at node:electron/js2c/browser_init:2:127130
at node:electron/js2c/browser_init:2:127134
at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:398:7)
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
Workaround:
sjcotto commented
@fczuardi as i don't have a linux machine GUI at hand please confirm if with latest commit we are ok ?
fczuardi commented
I can confirm that it fixed! thanks!