-
Notifications
You must be signed in to change notification settings - Fork 71
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
Closing application does not work in Mac #156
Comments
Hi, Thank you for opening this issue. I don't have a Mac to test this, but try this: in the flaskwebgui.py source file on line if OPERATING_SYSTEM == "darwin":
multiprocessing.set_start_method("fork") before Please tell me if that fixes the issue or not. |
I added this change on the new version, not tested (I don't own a mac). But, please reopen this issue if it's not solved. |
I believe this issue still remains unresolved as it hasn't fully addressed my problem. I suggest reopening this issue for further discussion and potential fixes. i test result: |
I am using Python 3.12 on MacOS 14.6, using FastAPI. I am using the exact code to close application as shown in the application.
The browser is not closed on pressing the Close button. The server shuts down, but Chrome stays open with a clear page (or whatever the
Close
function returns after callingclose_application
.I can trace the issue to the way the
run
function works in FlaskUI for MacOS (Darwin). It seems that therun
functions starts a new process. The value of the global variableFLASKWEBGUI_BROWSER_PROCESS
is not shared between the old and new process, causing the call toclose_application
to find the process value asNone
and not terminate it.The text was updated successfully, but these errors were encountered: