You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: Flet & Qdrant: Created app runs a second blank window if qdrant vector store is initiated (non builded app dont show a second window) #5528
I have searched the opened issues and there are no duplicates
Describe the bug
Hello, i use qdrant vector store in a project, so far it runs fine, but once the app has been created using flet build, a second window without content opens when the vectore store is initialized. The window does not appear unless the app has been built and running with flet run or python main.py.
I cannot find any error messages in logs or console, and apart from the fact that the second window opens, the app runs without errors.
For better clarity, I have created the following small code example.
I don't understand why a second window opens and hope someone can help me out or fix this behavior.
flet run (second window didnt appear) flet build macos --copyright "QdrantTest" --project "QdrantTest" --company "QdrantTest" --build-version 0.1 (run the created app --> second window appear)
Expected behavior
App should not show a second blank window if qdrant vector store is initiated.
Screenshots / Videos
Captures
Operating System
macOS
Operating system details
15.6
Flet version
28.3.0
Regression
I'm not sure / I don't know
Suggestions
I dont know..
Logs
Logs
Additional details
Qdrant client didnt work in created (build) flet app on windows, app fails because of an import error from pywin32. So the example can only be testet on macos or linux.
Packaged desktop apps now detect Python multiprocessing child invocations before Flutter starts and run them using a headless embedded Python interpreter, so helper processes no longer open additional Flet windows.
Despite appearances, Qdrant isn't the cause here. QdrantVectorStore(...) validates the collection by embedding a dummy text, and that is the first call that actually runs local Nomic inference — which is why the window appeared at vector store initialization rather than at startup. nomic wraps that call in a tqdm progress bar, tqdm creates a multiprocessing.RLock(), and that starts CPython's multiprocessing resource tracker, which re-executes sys.executable. In a packaged app sys.executable is your app's own binary, so it launched a second, blank instance of the app. That also explains the two things that made this hard to diagnose: nothing was written to the logs, and flet run / python main.py were unaffected, since there sys.executable is a real Python interpreter.
Please upgrade to Flet 0.86.0 or newer and rebuild the macOS app — the second window should be gone with no changes to your code. The if __name__ == "__main__": guard isn't required for this particular case, because the resource tracker never imports your app module, but it's worth adding if you later use multiprocessing directly.
Regarding the pywin32 import error you mention on Windows: that's a separate, unrelated issue. qdrant-client depends on portalocker, which requires pywin32 there. It's tracked in #5071 and #4737 — please follow up in those.
Activity
ndonkoHenri commentedon Sep 4, 2026
This is now resolved in Flet 0.86.0 (#6662). Docs: https://flet.dev/docs/cookbook/multiprocessing
Packaged desktop apps now detect Python multiprocessing child invocations before Flutter starts and run them using a headless embedded Python interpreter, so helper processes no longer open additional Flet windows.
Despite appearances, Qdrant isn't the cause here.
QdrantVectorStore(...)validates the collection by embedding a dummy text, and that is the first call that actually runs local Nomic inference — which is why the window appeared at vector store initialization rather than at startup.nomicwraps that call in atqdmprogress bar,tqdmcreates amultiprocessing.RLock(), and that starts CPython's multiprocessing resource tracker, which re-executessys.executable. In a packaged appsys.executableis your app's own binary, so it launched a second, blank instance of the app. That also explains the two things that made this hard to diagnose: nothing was written to the logs, andflet run/python main.pywere unaffected, since theresys.executableis a real Python interpreter.Please upgrade to Flet 0.86.0 or newer and rebuild the macOS app — the second window should be gone with no changes to your code. The
if __name__ == "__main__":guard isn't required for this particular case, because the resource tracker never imports your app module, but it's worth adding if you later usemultiprocessingdirectly.Regarding the pywin32 import error you mention on Windows: that's a separate, unrelated issue.
qdrant-clientdepends onportalocker, which requirespywin32there. It's tracked in #5071 and #4737 — please follow up in those.Let know if you still face any issues.