Unable to open Actual Budget app via ScriptKit #314
-
|
As per our twitter discussion.
You can open the app via e.g. the VSCode terminal with: open -a Actual.appBut if you create a minimal scriptkit script: open-actual.js exec(`open -a "Actual.app"`); // bounces for a sec, doesn't open
// exec(`open -a "Spotify.app"`); // other apps I have tried seem to work fine... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Thanks for looking into this! I realized that Actual might not be a "normal" electron app. I'm so used to how it works that I forget it might be a little different. One thing it does on startup is it forks the process which creates a background node process. This is the backend that runs the whole app. I don't know if that has any implications here, but that is one special thing it does compared to other Electron apps. |
Beta Was this translation helpful? Give feedback.
-
|
@JamesHenry looks like clearing the ELECTRON_RUN_AS_NODE env var fixes it: delete process.env.ELECTRON_RUN_AS_NODE
exec(`open -a "Actual.app"`)Script Kit works on the same "forking processes" principle (each script is a forked process controlled by the main Kit.app) that @jlongster uses for forking a background process. Script Kit's I think I can safely delete that env var from my Thanks for the help @jlongster |
Beta Was this translation helpful? Give feedback.
@JamesHenry looks like clearing the ELECTRON_RUN_AS_NODE env var fixes it:
Script Kit works on the same "forking processes" principle (each script is a forked process controlled by the main Kit.app) that @jlongster uses for forking a background process. Script Kit's
forkcall is inheriting that env var from Electron which then conflicts with launching an Electron app which forks another node process (PHEW 😅)I think I can safely delete that env var from my
forkcall to avoid anything like this in the future. I'll run some tests.Thanks for the help @jlongster