Skip to content

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

@zeldridge

Description

@zeldridge

Duplicate Check

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    👀 In review

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions