Skip to content

Flet web isn't working properly. Unknown Controls. #5876

@Wanna-Pizza

Description

@Wanna-Pizza

Duplicate Check

Describe the bug

Steps to reproduce

Question

My application is working fine with iOS, or macOS. But after build in web - I don't see my controls, unknown extensions, and even assets folder can't be resolved.

uv run flet build web 
uv run flet run --web --port 8000 src/main.py
Screenshot 2025-12-02 at 08 16 04

There is no any errors. Just unknown extensions. And assets folder for some reason doesn't work (For example I have to find all images inside one folder that inside of assets)

when im trying do this: python -m http.server --directory build/web - I just don't see any render of my app.
Screenshot 2025-12-02 at 08 18 53
Screenshot 2025-12-02 at 08 19 49

How to fix it? I need to move and edit my application for web. So would be nice to get some help from developers.

But!

app=ft.app(main,export_asgi_app=True)
if __name__=="__main__":
	import uvicorn
	uvicorn.run(app)

after that if I will run with just "uv run flet -r src/main.py" - working fine. But it doesn't take web build, it takes macOS build. But I see my application as web app (But I guess its not same).

Also I don't see asset image from assets folder.
For example I have image "lol.png" in "assets/lolz/lol.png".
in ft.Image I just put "lolz/lol.png" - and its work fine for desktop or mobile. But not for web at all.

The problem is that there too much ways to run web, and I don't understand how to run it, or how to work with that.

We are planning to put application on AWS. So would be nice to get some help.

Code sample

Code
[Paste your code here]

To reproduce

Create flet project, add some extension, and to use it.

Expected behavior

I hope to use my application in web. We are planning to put on AWS.

Screenshots / Videos

Captures

[Upload media here]

Operating System

macOS

Operating system details

Macos Sequoia 15.7.2

Flet version

0.28.3

Regression

No, it isn't

Suggestions

Honestly I don't know.

Logs

Logs
[Paste your logs here]

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions