awrit icon indicating copy to clipboard operation
awrit copied to clipboard

doesn't launch in kitty 0.42.1: Cannot find native binding

Open zhaob1n opened this issue 1 year ago • 12 comments

./awrit get stuck without showing any message. here is the awrit_error.txt

building toolbar
App threw an error during load
Error: Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
    at /home/ykpcx/awrit/dist/index.js:358:13
    at /home/ykpcx/awrit/dist/index.js:17:45
    at Object.<anonymous> (/home/ykpcx/awrit/dist/index.js:7525:39)
    at Module._compile (node:internal/modules/cjs/loader:1738:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1904:10)
    at Module.load (node:internal/modules/cjs/loader:1472:32)
    at Module._load (node:internal/modules/cjs/loader:1289:12)
    at c._load (node:electron/js2c/node_init:2:17950)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:242:24)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
    at /home/ykpcx/awrit/dist/index.js:358:13
    at /home/ykpcx/awrit/dist/index.js:17:45
    at Object.<anonymous> (/home/ykpcx/awrit/dist/index.js:7525:39)
    at Module._compile (node:internal/modules/cjs/loader:1738:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1904:10)
    at Module.load (node:internal/modules/cjs/loader:1472:32)
    at Module._load (node:internal/modules/cjs/loader:1289:12)
    at c._load (node:electron/js2c/node_init:2:17950)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:242:24)
destroying electron

zhaob1n avatar Jul 03 '25 05:07 zhaob1n

same problem here

pqbas avatar Jul 03 '25 21:07 pqbas

@pQbas @xcpky

Hey there, can you provide the result from running uname -orm for me?

chase avatar Jul 04 '25 08:07 chase

uname -orm 6.15.4-200.fc42.x86_64 x86_64 GNU/Linux

FYI, I use Fedora 42

zhaob1n avatar Jul 04 '25 08:07 zhaob1n

uname -orm 6.15.4-200.fc42.x86_64 x86_64 GNU/Linux

FYI, I use Fedora 42

I don't have a Linux machine to test on anymore, but please try rm -rf ~/awrit and running the install again. I've reverted some changes and bumped some dependencies.

chase avatar Jul 04 '25 08:07 chase

now it starts successfully. However whenever I click anywhere inside the browser, kitty crashes, the only messages in awrite_errror.txt is size { cols: 135, rows: 75, width: 1890, height: 2100 }

zhaob1n avatar Jul 04 '25 09:07 zhaob1n

now it starts successfully. However whenever I click anywhere inside the browser, kitty crashes, the only messages in awrite_errror.txt is size { cols: 135, rows: 75, width: 1890, height: 2100 }

Do you mean awrit terminates but kitty still has a window or does kitty itself terminate?

chase avatar Jul 04 '25 09:07 chase

now it starts successfully. However whenever I click anywhere inside the browser, kitty crashes, the only messages in awrite_errror.txt is size { cols: 135, rows: 75, width: 1890, height: 2100 }

Do you mean awrit terminates but kitty still has a window or does kitty itself terminate?

kitty itself terminates

zhaob1n avatar Jul 04 '25 09:07 zhaob1n

now it starts successfully. However whenever I click anywhere inside the browser, kitty crashes, the only messages in awrite_errror.txt is size { cols: 135, rows: 75, width: 1890, height: 2100 }

Do you mean awrit terminates but kitty still has a window or does kitty itself terminate?

kitty itself terminates

I'm using 0.42.1 on macOS and it doesn't crash.

Does scrolling or typing also cause a crash?

It's possible this is a bug in kitty, I don't think the terminal itself should be crashing. You might be able to get a log by running kitty from a terminal instance then running awrit.

chase avatar Jul 04 '25 09:07 chase

If you run cd ~/awrit && git checkout 2f65a6d7db9b9f1a342c11bf44ec6e97cd353aab && ./.bun/bin/bun i && ./awrit, then click around, does kitty still crash?

chase avatar Jul 04 '25 09:07 chase

now it starts successfully. However whenever I click anywhere inside the browser, kitty crashes, the only messages in awrite_errror.txt is size { cols: 135, rows: 75, width: 1890, height: 2100 }

Do you mean awrit terminates but kitty still has a window or does kitty itself terminate?

kitty itself terminates

I'm using 0.42.1 on macOS and it doesn't crash.

Does scrolling or typing also cause a crash?

It's possible this is a bug in kitty, I don't think the terminal itself should be crashing. You might be able to get a log by running kitty from a terminal instance then running awrit.

Sometimes it will not crash immediately, but after some playing around it crashes eventually. kitty log:

❯ kitty
[3.572] [PARSE ERROR] Ignoring attempt to turn on/off C1 controls as we only support C0 controls
[59.798] [glfw error 65544]: Wayland: fatal display error: Broken pipe

If you run cd ~/awrit && git checkout 2f65a6d7db9b9f1a342c11bf44ec6e97cd353aab && ./.bun/bin/bun i && ./awrit, then click around, does kitty still crash?

I might try later. Btw, is tabs in browser supported?

zhaob1n avatar Jul 04 '25 09:07 zhaob1n

Btw, is tabs in browser supported?

No they are not, feel free to make an issue for this. I don't have much time to work on awrit right now, but if you want to try implementing you're welcome to make a PR.

chase avatar Jul 04 '25 09:07 chase

@xcpky I'm closing this since the original issue is resolved, the crash of Kitty under Wayland is covered under #153

chase avatar Jul 04 '25 12:07 chase