kit
kit copied to clipboard
App crashes upon settings update with wrong values
Hi, just to clarify : It's my first bug report. Sorry if I'm not specific enough about the issue.
I installed ScriptKit a few days ago. Made my first script this morning. It worked fine.
By default, await terminal() opens native macOS terminal. I changed it to iTerm by going to the settings.js (I believe, opened the config in the menu bar) and adding the "terminal" : "iTerm" value-key. It then crashed to this error.
I have watched John Lindquist video with Jason on Learn With Jason, and he made him change the code editor by going to the settings.
I have seen a few issues about this problem, is it the config change that triggered the crash, or something else ?
I don't know where the config file directory is located. Can't open ScriptKit anymore to change it sadly.
TypeError: Object has been destroyed
at Fo (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:131018)
at /Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:130065
at l (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:110839)
at Generator.<anonymous> (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:112177)
at Generator.next (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:111202)
at co (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:116831)
at a (/Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:117035)
at /Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:117096
at new Promise (<anonymous>)
at /Applications/Kit.app/Contents/Resources/app.asar/main.prod.js:2:116975
[2023-02-27 06:56:29.829] [info] kenv found [2023-02-27 06:56:29.829] [info] node found [2023-02-27 06:56:29.829] [info] node found [2023-02-27 06:56:29.830] [info] node_modules found [2023-02-27 06:56:29.830] [info] node_modules found [2023-02-27 06:56:29.830] [info] kenv is configured [2023-02-27 06:56:29.830] [info] kenv .env found [2023-02-27 06:56:29.830] [info] Install verified [2023-02-27 07:48:00.536] [info] 🪟 window-all-closed
Kit 1.48.0 Electron 22.0.3 darwin 22.1.0 Locale: en-GB
I followed the advice from OP here https://github.com/johnlindquist/kit/issues/1133 and removed ScriptKit App from macOS.
It was not enough, so I had to rm -rf .kenv .kit to delete both the files.
After that, a clean install worked for me. I will not edit the Config Settings again, as I am sure they caused the crash when I added a new property. Or maybe I wrote it wrong.

@Varkoff Thanks for reporting. I do need to handle malformed config files. I'll try to sneak it into tomorrow's build.
Note: I would've originally recommended quitting Kit.app, deleting ~/.kit, then opening Kit.app to reset the SDK
Thank you for the tip. I must confess, I didn't know where the config files were located. 🙂