macintosh.js icon indicating copy to clipboard operation
macintosh.js copied to clipboard

Linux deb fails

Open xanni opened this issue 5 years ago • 8 comments

Running macintosh.js on Ubuntu 20.04 it crashes while starting with the following output:

(node:201806) UnhandledPromiseRejectionWarning: Error: Cannot find module 'github-url-to-object' Require stack:

  • /usr/lib/macintosh.js/resources/app/node_modules/update-electron-app/index.js
  • /usr/lib/macintosh.js/resources/app/src/main/update.js
  • /usr/lib/macintosh.js/resources/app/src/main/index.js
  • at Module._resolveFilename (internal/modules/cjs/loader.js:961:15) at Function.o._resolveFilename (electron/js2c/browser_init.js:257:919) at Module._load (internal/modules/cjs/loader.js:844:27) at Function.Module._load (electron/js2c/asar.js:769:28) at Module.require (internal/modules/cjs/loader.js:1023:19) at require (internal/modules/cjs/helpers.js:77:18) at Object. (/usr/lib/macintosh.js/resources/app/node_modules/update-electron-app/index.js:5:12) at Module._compile (internal/modules/cjs/loader.js:1145:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1166:10) at Module.load (internal/modules/cjs/loader.js:981:32) (node:201806) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:201806) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

xanni avatar Jul 28 '20 20:07 xanni

Same problem here...

HankG avatar Jul 28 '20 20:07 HankG

cd /usr/lib/macintosh.js/resources/app/
sudo yarn add github-url-to-object

seems to fix that immediate issue.

After that, it seems stuck on "Loading emulator dependencies" without further errors (except Electron's autoUpdater does not support the 'linux' platform)

himdel avatar Jul 28 '20 22:07 himdel

Oof, that's annoying. Sorry friends, I'll fix that.

felixrieseberg avatar Jul 28 '20 23:07 felixrieseberg

For those on debian (buster) who don't have a js dev environment set up, you can use debian's yarn which is named yarnpkg:

sudo apt install yarnpkg
sudo yarnpkg add (..)

rjeli avatar Jul 29 '20 01:07 rjeli

Here's a horror show for you: sudo macintosh.js --no-sandbox works like a charm. I'm sorry.

h110hawk avatar Jul 29 '20 01:07 h110hawk

(Root cause is likely the FS image is written out to a directory a normal user cannot write to. Hence sudo being a bigger hammer but a bad idea.)

h110hawk avatar Jul 29 '20 16:07 h110hawk

Stuck at emulator loading was probably fixed by #24

mnp avatar Jul 30 '20 11:07 mnp