Open crazyxhz opened 1 year ago
Can you see if "re-linking" fixes it?
cd ~/.kenv && ~/.knode/bin/npm i ~/.kit
not working
Hmm, could you try this? This may be an issue related to using npx @johnlindquist/install-kit
prior to the app download:
repair is hang on nodejs download againπ
@crazyxhz in your ~/Library/Logs/Kit/main.log
do you see using proxy
? It should log that out if it detected a proxy env var.
You could also try export HTTPS_PROXY=your proxy open /Applications/Kit.app
for the first time you open it.
const proxy =
process.env.HTTPS_PROXY ||
process.env.https_proxy ||
process.env.HTTP_PROXY ||
process.env.http_proxy;
if (proxy) {
log.info(`Using proxy ${proxy}`);
options.agent = new HttpsProxyAgent({
keepAlive: true,
keepAliveMsecs: 1000,
maxSockets: 256,
maxFreeSockets: 256,
scheduling: 'lifo',
proxy,
});
}
after
export HTTPS_PROXY=your proxy open /Applications/Kit.app
the repair window show up a second then disappear, the tray icon is busy and not responding, check the log file for more info
@crazyxhz just to be clear, you replaced "your proxy" with your actual proxy, right? π
Also, quit and remove the ~/.kit and ~/.knode directories before attempting to open it again
@johnlindquist sure I know what proxy is
removed rm -rf ~/.kit ~/.knode still not working
[2023-07-01 23:24:23.726] [info] undefined: π’ start idle Prompt
[2023-07-01 23:24:23.727] [error] ERROR {
error: 'Error: spawn /Users/crazyxhz/.knode/bin/node ENOENT\n' +
' at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)\n' +
' at onErrorNT (node:internal/child_process:476:16)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:82:21)\n' +
' at runNextTicks (node:internal/process/task_queues:64:3)\n' +
' at listOnTimeout (node:internal/timers:538:9)\n' +
' at processTimers (node:internal/timers:512:7)'
}
[2023-07-01 23:24:23.729] [error] π Ask for help: https://github.com/johnlindquist/kit/discussions/categories/errors
[2023-07-01 23:24:23.730] [info] π Status: {"status":"warn","message":""}
[2023-07-01 23:24:23.731] [info] π¨ Tray status: warn
[2023-07-01 23:24:23.731] [info] π¨ Tray icon: warn
[2023-07-01 23:24:23.732] [info] No need to add idle processes
[2023-07-01 23:24:23.732] [info] DISCONNECT
[2023-07-01 23:24:23.733] [info] CLOSE
[2023-07-01 23:24:25.606] [warn] Error: EPERM: operation not permitted, mkdir '/Users/crazyxhz/.knode'
at /Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:562715
at l (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:530629)
at Generator.<anonymous> (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:531967)
at Generator.throw (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:530992)
at Kd (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:536621)
at s (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:536862)
[2023-07-01 23:24:26.110] [info] Show App: /Users/crazyxhz/.kit/cli/info.js
[2023-07-01 23:24:26.112] [info] πββοΈ Run /Users/crazyxhz/.kit/cli/info.js
[2023-07-01 23:24:26.113] [info] Ensure idle process
[2023-07-01 23:24:26.114] [info] undefined: π /Users/crazyxhz/.kit/cli/info.js
[2023-07-01 23:24:26.116] [info] Another script is already controlling the UI. Denying UI control: info.js
[2023-07-01 23:24:26.117] [error] ERROR {
error: 'Error: Channel closed\n' +
' at new NodeError (node:internal/errors:399:5)\n' +
' at ChildProcess.target.send (node:internal/child_process:740:16)\n' +
' at /Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:407314\n' +
' at l (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:396020)\n' +
' at Generator.<anonymous> (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:397358)\n' +
' at Generator.next (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:396383)\n' +
' at af (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:402780)\n' +
' at a (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:402984)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:95:5)'
}
[2023-07-01 23:24:26.119] [error] π Ask for help: https://github.com/johnlindquist/kit/discussions/categories/errors
[2023-07-01 23:24:26.119] [info] π Status: {"status":"warn","message":""}
[2023-07-01 23:24:26.120] [info] π¨ Tray status: warn
[2023-07-01 23:24:26.120] [info] π¨ Tray icon: warn
[2023-07-01 23:24:26.219] [info] Add one idle process
[2023-07-01 23:24:26.223] [info] πΆ Create child Prompt process: undefined []
[2023-07-01 23:24:26.226] [info] undefined: π’ start idle Prompt
[2023-07-01 23:24:26.227] [error] ERROR {
error: 'Error: spawn /Users/crazyxhz/.knode/bin/node ENOENT\n' +
' at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)\n' +
' at onErrorNT (node:internal/child_process:476:16)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:82:21)'
}
[2023-07-01 23:24:26.228] [error] π Ask for help: https://github.com/johnlindquist/kit/discussions/categories/errors
[2023-07-01 23:24:26.229] [info] π Status: {"status":"warn","message":""}
[2023-07-01 23:24:26.230] [info] π¨ Tray status: warn
[2023-07-01 23:24:26.230] [info] π¨ Tray icon: warn
[2023-07-01 23:24:26.231] [info] DISCONNECT
[2023-07-01 23:24:26.232] [info] CLOSE
[2023-07-01 23:24:26.871] [info] π Status: {"status":"busy","message":"Installing Kit SDK..."}
[2023-07-01 23:24:26.872] [info] π¨ Tray status: busy
[2023-07-01 23:24:26.882] [info] π¨ Tray icon: busy
@crazyxhz hmm...
Error: EPERM: operation not permitted, mkdir '/Users/crazyxhz/.knode'
Curious why the account wouldn't have permission to create the ~/.knode dir π€
Btw, I really appreciate you taking the time to report all of this. It's super useful.
I think we're at the point I need to set up a proxy and test it myself
@crazyxhz Alright, so I set up a proxy on my mac mini with "squid" on my local network at http://192.168.1.50:3128
, then tested with this command:
HTTPS_PROXY=http://192.168.1.50:3128 open /Applications/Kit.app
I confirmed it didn't work when not using the correct proxy, then that it did work using the proper URL and port.
Here's the final build (I pushed it to the main site):
https://github.com/johnlindquist/kitapp/releases/tag/v1.77.8
π¨ Note: If your
~/.knode
,~/.kit
, and~/.kenv
dirs were partially created before, please delete them before opening the app so that it can go through the whole process again.
using the latest version still same error [2023-07-10 15:59:41.550] [info] Launching Script Kit 1.77.8 [2023-07-10 15:59:41.551] [info] auto updater detected version: 1.77.8
[2023-07-10 16:02:43.499] [error] π Ask for help: https://github.com/johnlindquist/kit/discussions/categories/errors
[2023-07-10 16:02:43.501] [info] π Status: {"status":"warn","message":""}
[2023-07-10 16:02:43.502] [info] π¨ Tray status: warn
[2023-07-10 16:02:43.502] [info] π¨ Tray icon: warn
[2023-07-10 16:02:43.505] [info] No need to add idle processes
[2023-07-10 16:02:43.509] [info] DISCONNECT
[2023-07-10 16:02:43.510] [info] CLOSE
[2023-07-10 16:02:44.926] [error] Error: EPERM: operation not permitted, mkdir '/Users/crazyxhz/.kit'
[2023-07-10 16:02:45.380] [warn] Error: EPERM: operation not permitted, mkdir '/Users/crazyxhz/.knode'
at /Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:563752
at l (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:531357)
at Generator.<anonymous> (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:532695)
at Generator.throw (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:531720)
at Kd (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:537349)
at s (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:537590)
[2023-07-10 16:02:45.885] [info] Show App: /Users/crazyxhz/.kit/cli/info.js
[2023-07-10 16:02:45.886] [info] πββοΈ Run /Users/crazyxhz/.kit/cli/info.js
[2023-07-10 16:02:45.887] [info] Ensure idle process
[2023-07-10 16:02:45.887] [info] undefined: π /Users/crazyxhz/.kit/cli/info.js
[2023-07-10 16:02:45.889] [info] Another script is already controlling the UI. Denying UI control: info.js
[2023-07-10 16:02:45.890] [error] ERROR {
error: 'Error: Channel closed\n' +
' at new NodeError (node:internal/errors:399:5)\n' +
' at ChildProcess.target.send (node:internal/child_process:740:16)\n' +
' at /Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:407800\n' +
' at l (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:396483)\n' +
' at Generator.<anonymous> (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:397821)\n' +
' at Generator.next (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:396846)\n' +
' at af (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:403243)\n' +
' at a (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:403447)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:95:5)'
}
download of node using proxy seems pretty fast. But seems the downloaded node is node installed in ~/.knode which do not exist after Kit inital setup why not using the system already installed node?
@crazyxhz
3 reasons:
The Kit.app
"forks" a node process that loads the script.
The app node version and process node version need to match or any packages with native installed dependencies will fail.
The app creates wrappers around scripts in the ~/.kenv/bin
dir so people can run scripts from the terminal just by command name
The user might not have node installed
Are you an admin on your machine?
[2023-07-10 16:02:44.926] [error] Error: EPERM: operation not permitted, mkdir '/Users/crazyxhz/.kit' [2023-07-10 16:02:45.380] [warn] Error: EPERM: operation not permitted, mkdir '/Users/crazyxhz/.knode'
means that Kit.app doesn't have permission to create those directories. I've never seen anyone report that error before, so there must be something unique to your setup that's preventing Kit.app from creating them.
@johnlindquist what user kit is running at? I'm the admin of the machine and I can mkdir in the home directory
@crazyxhz It doesn't change users π€.
Maybe because it's running with the open
command to assign the HTTPS_PROXY env var and open
is somehow running under a different user? π€ That doesn't really make sense to me, but I'm kinda reaching at this point...
note: I am working on fixing up
@johnlindquist/install-kit
based on the issues you found and hope to have it all updated tomorrow.
but node_modules do exist in .kenv folder