Blank White Screen When Launching Flet App from Taskbar After Initial Launch
Duplicate Check
- [x] I have searched the opened issues and there are no duplicates
Describe the bug
After successfully launching a Flet App compiled with Flet Pack/PyInstaller/Nuitka for the first time, launching the app again via the taskbar shortcut created from the launched app results in a blank white screen. The shortcut seems to be incorrectly linking to C:\Users(USERNAME).flet\bin\flet-0.25.2\flet\flet.exe, and running this results in a blank screen.
When dragging the compiled .exe to the taskbar and using it as a shortcut, the app opens with a new Flet window with the Flet icon, but it still targets the flet.exe located in C:\Users(USERNAME).flet\bin\flet-0.25.2\flet\flet.exe, leading to the same issue.
Code sample
Code
import flet as ft
def main(page: ft.Page):
page.add(ft.Text(value="Hello, world!"))
ft.app(main)
To reproduce
- Compile a Flet app using Flet Pack/PyInstaller/Nuitka.
- Launch the compiled .exe successfully for the first time.
- Create a shortcut on the taskbar by dragging the .exe to the taskbar or simply right clicking the launched app and hitting pin to taskbar.
- Close the app.
- Click on the taskbar shortcut to relaunch the app.
Expected behavior
Expected Behavior:
The app should launch properly without showing a blank white screen when launched via the taskbar shortcut.
Actual Behavior:
Launching the app via the taskbar shortcut causes a blank white screen. The shortcut points to C:\Users(USERNAME).flet\bin\flet-0.25.2\flet\flet.exe, which results in a failed launch.
Screenshots / Videos
Captures
The blank white screen after launching the shortcut:What the shortcut links to (which should link to the compiled .exe the compliler made):
Operating System
Windows
Operating system details
Windows 11
Flet version
flet 0.23.0 and higher have been tested and producing the same result
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
There is no useful logs as its not launching my application from the shortcut. If there is a location for logs that might be useful for my case, please tell me where I can find these and I will provide them.
Additional details
This issue occurs only when launching the app from the taskbar after its first successful launch.
The taskbar shortcut appears to be pointing to the incorrect executable (flet.exe located in C:\Users(USERNAME).flet\bin\flet-0.25.2\flet\flet.exe).
When the .exe that was created by flet pack/pyinstaller/nuitka is run directly, the issue does not occur.
Seems like this issue has been around for a while too. https://github.com/flet-dev/flet/issues/1704#issue-1846095798
I am guessing that soultion was flet build, however, using flet build is not an option for me as I prefer to use Nuikta.
The problem has never been fixed
I am having this issue now
I am having this issue now
Use something other than Flet, I moved away from it as these issues were never even looked at. Flet is super buggy with windows applications and there are better solutions out there
I rewrote my code with PySide6, and it does fix the issue, but unfortunately it just doesn't look as good. Pros and cons I guess.