flet icon indicating copy to clipboard operation
flet copied to clipboard

Blank White Screen When Launching Flet App from Taskbar After Initial Launch

Open zeldridge opened this issue 8 months ago • 5 comments

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

  1. Compile a Flet app using Flet Pack/PyInstaller/Nuitka.
  2. Launch the compiled .exe successfully for the first time.
  3. 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.
  4. Close the app.
  5. 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:

Image

What the shortcut links to (which should link to the compiled .exe the compliler made):

Image

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.

zeldridge avatar Mar 29 '25 08:03 zeldridge

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.

zeldridge avatar Mar 29 '25 09:03 zeldridge

The problem has never been fixed

HG-ha avatar Apr 02 '25 07:04 HG-ha

I am having this issue now

henrydaum avatar Nov 06 '25 19:11 henrydaum

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

zeldridge avatar Nov 12 '25 01:11 zeldridge

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.

henrydaum avatar Nov 12 '25 03:11 henrydaum