flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.56k stars 452 forks source link

Flet app startup issue in Windows Build #3736

Open wpritom opened 3 months ago

wpritom commented 3 months ago

Inconsistent performance in Windows build has been observed. There are 3 scenarios after running the executable file.

  1. UI Loads instantly
  2. UI loads after a waiting for a few seconds
  3. UI does not load even after 10 seconds. (seems like app has been crashed)

There is no way to sense the reason behind this behavior. This happens for as simple code as following:

import datetime
import flet as ft

def notify_user(e):
   pass

async def main(page: ft.Page):

    tool_column = ft.Column([ft.Text("HELLO")])

    page.add(
        tool_column
        )

ft.app(main)

The app is build with the following command.

flet build windows --project sample--module-name app.py --output build --verbose

OS : Windows 11 Python: 3.12.4 Flet: 0.23.2 Flutter: 3.22.3

The build is also tested in other desktops. The behavior was same.

suifeng2018 commented 3 months ago

the same issue! UI loading very slower

imadityacoder commented 3 months ago

It also happening with me. UI not refresh automatically.

ndonkoHenri commented 3 months ago

Will you guys mind sharing a screen record?

baseplate-admin commented 3 months ago

Sounds like the issue i faced in


Will you guys mind sharing a screen record?

I shared a screen record

VordyV commented 1 month ago

I observe the same situation. In demonstrating this problem, the program was build using "flet build windows" command, there were no errors during assembly, the code was taken from the example.

https://github.com/user-attachments/assets/2714be92-4d20-4f74-b6fa-d7005266d146

wpritom commented 1 month ago

This problem still remains in the latest version (0.24.0).

imadityacoder commented 1 month ago

It is also happening in android

https://github.com/user-attachments/assets/b2eb70de-382d-44b1-8e35-56bee07642f0.mp4