goshops-com/clipshare

[linux] crash on launch (systemPreferences.askForMediaAccess is not a function)

fczuardi opened this issue · 3 comments

Steps to reproduce:

  • on a Linux machine, follow the instructions on README to either build or start with npm
    • example npm start

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:

  • comment this two lines
    • or checkout to a commit before cfc6d77
      • example git checkout 45e8464d649fc304d94355b3362e9db7960d648f

thanks, created this PR #8

make sense for u?

@fczuardi as i don't have a linux machine GUI at hand please confirm if with latest commit we are ok ?

I can confirm that it fixed! thanks!