I'm working on an app using ElectronJS, with a python backend. Electron and Python communicate through python using flask to host a webserver which returns JSON and the like.
Here's my situation - the app works just fine when run by right clicking the .app, then going into Contents/MacOS and running the unix executable inside there. However if I just double-click on the .app, the python backend does not start.
I'm not sure how to view the console output to see what is going wrong with the command to start python, but here is the line that starts the python process -
pythonBackend = require('child_process').spawn('/Library/Frameworks/Python.framework/Versions/3.8/bin/python3', [String(__dirname) + '/main.py'], {stdio: [process.stdin, process.stdout, process.stderr], detached: false});
I use quite a few configuration files stored on the user's machine, so getting rid of Electron and just hosting in the cloud isn't a great option in my opinion, however I could be wrong.
The software isn't signed or validated, so I'm wondering if this could be an issue where MacOS is blocking execution of shell commands/scripts if you aren't signed.