Skip to content

[v1] Exceptions inside before_main are silent #5787

@oussama-gourari

Description

@oussama-gourari

When an exception occurs inside the before_main callback, it is not reported anywhere, and the app will be stuck in the "Working..." state. Example:

import flet as ft


def before_main(page):
    1 / 0


def main(page):
    page.add(ft.Button("Button"))


ft.run(main=main, before_main=before_main)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions