khlam / discord-sandboxed

Alternative electron-based Discord client with custom telemetry blocker and privacy-focused push-to-talk.
GNU General Public License v3.0
127 stars 20 forks source link

Issues with iohook #8

Open Jertzukka opened 4 years ago

Jertzukka commented 4 years ago

os Manjaro Linux x86_64 kernel 5.8.6-1-MANJARO iohook version 0.6.6 npm version 6.14.8 electron version v9.2.1 electron-builder version 22.8.1 electron-rebuild version 2.0.3 node version v14.12.0

[jere@jere-desktop discord-sandboxed-0.3.1-stable]$ npm start

> discordsandbox@0.3.1 start /home/jere/Downloads/disc/discord-sandboxed-0.3.1-stable
> electron . dev

Dev Mode: true
{ key: '4', delay: '1000' }
restarting io Hook
ioHook stopped
ioHook started
Not listening for keypresses. ioHook library error or PTT keys not set.
[jere@jere-desktop discord-sandboxed-0.3.1-stable]$ electron . dev
Error: Cannot find module '/home/jere/Downloads/disc/discord-sandboxed-0.3.1-stable/node_modules/iohook/builds/electron-v80-linux-x64/build/Release/iohook.node'
Require stack:
- /home/jere/Downloads/disc/discord-sandboxed-0.3.1-stable/node_modules/iohook/index.js
- /home/jere/Downloads/disc/discord-sandboxed-0.3.1-stable/main.js
- /usr/lib/electron/resources/default_app.asar/main.js
- 
    at Module._resolveFilename (internal/modules/cjs/loader.js:797:17)
    at Function.o._resolveFilename (electron/js2c/browser_init.js:281:679)
    at Module._load (internal/modules/cjs/loader.js:690:27)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/jere/Downloads/disc/discord-sandboxed-0.3.1-stable/node_modules/iohook/index.js:10:21)
    at Module._compile (internal/modules/cjs/loader.js:967:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
    at Module.load (internal/modules/cjs/loader.js:815:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/jere/Downloads/disc/discord-sandboxed-0.3.1-stable/node_modules/iohook/index.js',
    '/home/jere/Downloads/disc/discord-sandboxed-0.3.1-stable/main.js',
    '/usr/lib/electron/resources/default_app.asar/main.js',
    undefined
  ]
}

It appears that the Electron is looking for the iohook library with the folder path /electron-v80-linux-x64/, when the one I have installed through npm is located in /electron-v75-linux-x64/. Attempting to create the path it's looking for and downloading the v80 file version from the github and extracting the .node file into the /build/Release/ folder gives segmentation fault on launch.

I love the idea of this project and I'd like to hear what could be the cause of this problem.

Z35hLy48k commented 2 years ago

Did you check #25