-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS bundle works only if executable is launched directly #1228
Comments
As far as I can determine, the -10810 error code is due to something trying to access stdout, stderr and/or stdin - this can be from one of the underlying libraries, so it may not be obvious that it's happening. The workaround I've found is explicitly launching the application in the macos terminal - from pyinstaller/pyinstaller#5154 (comment) . I have not had a chance to look at how to automatically apply this workaround, but it's a simple manual fix to the app produced by cx_Freeze . |
As I wrote above, it depends on what you mean by launching the app in the Terminal:
I've read the entire pyinstaller issue#5154 page and I can confirm that there are neither Qt does output to the Terminal the following line (which is another Qt annoyance discussed in many other types of context not specific to Python):
I've removed the line in my code that loads the font (which causes the output above), and I've also disabled any debug messages from the The strange part is that the -10810 error code is produced before my Python code even gets processed. I've modified my
However, the log file is produced — showing "no errors" — if I (again, successfully) run the app from the Terminal. |
Hi, I have the same issue with my app, it runs in terminal but does not run when bundled in .app format, I realized xprotectservice runs together with the .app, Can antimalware protection of mac os be preventing it from running? |
I have this exact same issue, but I've noticed something peculiar: if I first move the .app bundle to /Applications and then run it by double clicking, or by using the launchpad, it works fine. It "only" breaks if launching from anywhere else on the system outside of /Applications. EDIT: this is just speculation cos I'm not a macOS user and my knowledge about it is very limited, but could it be that apps inside /Applications maybe get some special logging treatment, therefore they actually have proper stdout and stderr, although not directly visible to the user? EDIT 2: I've played around with it a bit more with some debug prints and it seems to crash on me when it gets to redirecting the console to file, so yeah it's definitely something to do with stdout and stderr |
I compile an executable macOS application bundle successfully, but it only launches if I go into the
.app/Contents/MacOS/
manually (e.g. with "Show Package Contents") and double click the executable.If I double-click the
.app
bundle itself in the Finder, nothing happens.If I try running the
.app
bundle from the Terminal (withopen myapp.app
), I get:My setup:
setup.py
Again, this compiles successfully):
I am running the exact same setup used for another project which is much simpler, with no data files and no includes. It works as expected, on the same machine. So I feel this might be related to the included data files. I am using the unmodified function from the FAQ, which successfully locates the data files based on context. I've checked my filenames in both frozen and unfrozen context, and they are correctly built. If they weren't, the app wouldn't launch at all anyway.
Console log from failed launch
When using
open myapp.app
in Terminal (I have copied only the entries starting from "invalidating assertion".The log from the successful launch (via the executable in
MacOS
) also has "invalidating assertion" but then displays many more entries before displaying the UI.I've tried this with the data files inside the MacOS folder or the Resources folder, the result is identical.
Thanks for your help.
The text was updated successfully, but these errors were encountered: