Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

bug: `flet test` on freshly created project fails on Windows with an empty window

Đang mở
#6,993 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@ndonkoHenri đang làm issue này rồi.

Từ ngày 23/10/2026.

  • #6995 của @ndonkoHenri — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
66/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
flutter, python
Lĩnh vực
desktop, testing

Hướng nghiên cứu

Start with the generated project's integration test and the flet test entry point, then compare the reported Windows run with the passing Windows CI run. Reproduce using the listed uvx, uv sync, and uv run flet test commands; done when the fresh project's default test_increment test passes on Windows instead of finding an empty window.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
Duplicate Check
Describe the bug

Running flet test on a freshly scaffolded project (right after flet create) fails.

Code sample
Code

Default project generated by flet create — unmodified.
No custom code is required to trigger the problem.

To reproduce
uvx --with flet-cli flet create counter
cd counter
uv sync
uv run flet test
Expected behavior

flet test on a freshly created project should build the Windows integration test app successfully and run the default test_increment test to completion (passing).

Screenshots / Videos
Captures Image
Operating System

Windows

Operating system details

Microsoft Windows 11 Pro (10.0.26200 Build 26200)

Flet version

1.0.5

Regression

I'm not sure / I don't know

Suggestions

The same counter test passes in CI on Windows. The screenshot shows the window is still blank when the test looked for "0".

Logs
Logs
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\jules> python.exe -m pip install --upgrade pip
Requirement already satisfied: pip in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (26.2.2)
PS C:\Users\jules> pip install flet[all]>=1.0.5
Requirement already satisfied: flet>=1.0.5 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet[all]>=1.0.5) (1.0.5)
Requirement already satisfied: oauthlib>=3.2.2 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet>=1.0.5->flet[all]>=1.0.5) (3.3.1)
Requirement already satisfied: httpx>=0.28.1 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet>=1.0.5->flet[all]>=1.0.5) (0.28.1)
Requirement already satisfied: repath>=0.9.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet>=1.0.5->flet[all]>=1.0.5) (0.9.0)
Requirement already satisfied: msgpack>=1.1.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet>=1.0.5->flet[all]>=1.0.5) (1.2.3)
Requirement already satisfied: flet-cli==1.0.5 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet[all]>=1.0.5) (1.0.5)
Requirement already satisfied: flet-web==1.0.5 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet[all]>=1.0.5) (1.0.5)
Requirement already satisfied: flet-desktop==1.0.5 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet[all]>=1.0.5)(1.0.5)
Requirement already satisfied: flet-platform-assets==1.0.5 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet-cli==1.0.5->flet[all]>=1.0.5) (1.0.5)
Requirement already satisfied: watchdog>=4.0.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet-cli==1.0.5->flet[all]>=1.0.5) (4.0.2)
Requirement already satisfied: packaging>=25.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet-cli==1.0.5->flet[all]>=1.0.5) (26.0)
Requirement already satisfied: qrcode>=7.4.2 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet-cli==1.0.5->flet[all]>=1.0.5) (7.4.2)
Requirement already satisfied: cookiecutter>=2.6.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet-cli==1.0.5->flet[all]>=1.0.5) (2.7.1)
Requirement already satisfied: binaryornot<0.5 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet-cli==1.0.5->flet[all]>=1.0.5) (0.4.4)
Requirement already satisfied: chardet<6 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet-cli==1.0.5->flet[all]>=1.0.5) (5.2.0)
Requirement already satisfied: rich>=13.0.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet-cli==1.0.5->flet[all]>=1.0.5) (14.3.3)
Requirement already satisfied: pillow>=11.3.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet-platform-assets==1.0.5->flet-cli==1.0.5->flet[all]>=1.0.5) (13.0.0)
Requirement already satisfied: fastapi>=0.115.12 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet-web==1.0.5->flet[all]>=1.0.5) (0.135.1)
Requirement already satisfied: websockets>=13.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet-web==1.0.5->flet[all]>=1.0.5) (16.0)
Requirement already satisfied: uvicorn>=0.35.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from flet-web==1.0.5->flet[all]>=1.0.5) (0.41.0)
Requirement already satisfied: Jinja2<4.0.0,>=2.7 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (3.1.6)
Requirement already satisfied: click<9.0.0,>=7.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (8.3.1)
Requirement already satisfied: pyyaml>=5.3.1 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (6.0.3)
Requirement already satisfied: python-slugify>=4.0.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (8.0.4)
Requirement already satisfied: requests>=2.23.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (2.32.5)
Requirement already satisfied: arrow in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (1.4.0)
Requirement already satisfied: colorama in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from click<9.0.0,>=7.0->cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (0.4.6)
Requirement already satisfied: MarkupSafe>=2.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from Jinja2<4.0.0,>=2.7->cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (3.0.3)
Requirement already satisfied: starlette>=0.46.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from fastapi>=0.115.12->flet-web==1.0.5->flet[all]>=1.0.5) (0.52.1)
Requirement already satisfied: pydantic>=2.7.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from fastapi>=0.115.12->flet-web==1.0.5->flet[all]>=1.0.5) (2.12.5)
Requirement already satisfied: typing-extensions>=4.8.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from fastapi>=0.115.12->flet-web==1.0.5->flet[all]>=1.0.5) (4.15.0)
Requirement already satisfied: typing-inspection>=0.4.2 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from fastapi>=0.115.12->flet-web==1.0.5->flet[all]>=1.0.5) (0.4.2)
Requirement already satisfied: annotated-doc>=0.0.2 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from fastapi>=0.115.12->flet-web==1.0.5->flet[all]>=1.0.5) (0.0.4)
Requirement already satisfied: anyio in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from httpx>=0.28.1->flet>=1.0.5->flet[all]>=1.0.5) (4.12.1)
Requirement already satisfied: certifi in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from httpx>=0.28.1->flet>=1.0.5->flet[all]>=1.0.5) (2026.2.25)
Requirement already satisfied: httpcore==1.* in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from httpx>=0.28.1->flet>=1.0.5->flet[all]>=1.0.5) (1.0.9)
Requirement already satisfied: idna in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from httpx>=0.28.1->flet>=1.0.5->flet[all]>=1.0.5) (3.11)
Requirement already satisfied: h11>=0.16 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from httpcore==1.*->httpx>=0.28.1->flet>=1.0.5->flet[all]>=1.0.5) (0.16.0)
Requirement already satisfied: annotated-types>=0.6.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from pydantic>=2.7.0->fastapi>=0.115.12->flet-web==1.0.5->flet[all]>=1.0.5) (0.7.0)
Requirement already satisfied: pydantic-core==2.41.5 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from pydantic>=2.7.0->fastapi>=0.115.12->flet-web==1.0.5->flet[all]>=1.0.5) (2.41.5)
Requirement already satisfied: text-unidecode>=1.3 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from python-slugify>=4.0.0->cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (1.3)
Requirement already satisfied: pypng in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from qrcode>=7.4.2->flet-cli==1.0.5->flet[all]>=1.0.5) (0.20220715.0)
Requirement already satisfied: six>=1.9.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from repath>=0.9.0->flet>=1.0.5->flet[all]>=1.0.5) (1.17.0)
Requirement already satisfied: charset_normalizer<4,>=2 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from requests>=2.23.0->cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (3.4.5)
Requirement already satisfied: urllib3<3,>=1.21.1 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from requests>=2.23.0->cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (2.6.3)
Requirement already satisfied: markdown-it-py>=2.2.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from rich>=13.0.0->flet-cli==1.0.5->flet[all]>=1.0.5) (4.0.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from rich>=13.0.0->flet-cli==1.0.5->flet[all]>=1.0.5) (2.19.2)
Requirement already satisfied: mdurl~=0.1 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from markdown-it-py>=2.2.0->rich>=13.0.0->flet-cli==1.0.5->flet[all]>=1.0.5) (0.1.2)
Requirement already satisfied: httptools>=0.6.3 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from uvicorn[standard]>=0.35.0; sys_platform != "win32" or platform_machine != "ARM64"->flet-web==1.0.5->flet[all]>=1.0.5) (0.7.1)
Requirement already satisfied: python-dotenv>=0.13 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from uvicorn[standard]>=0.35.0; sys_platform != "win32" or platform_machine != "ARM64"->flet-web==1.0.5->flet[all]>=1.0.5) (1.2.2)
Requirement already satisfied: watchfiles>=0.20 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from uvicorn[standard]>=0.35.0; sys_platform != "win32" or platform_machine != "ARM64"->flet-web==1.0.5->flet[all]>=1.0.5) (1.1.1)
Requirement already satisfied: python-dateutil>=2.7.0 in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from arrow->cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (2.9.0.post0)
Requirement already satisfied: tzdata in .\AppData\Local\Programs\Python\Python313\Lib\site-packages (from arrow->cookiecutter>=2.6.0->flet-cli==1.0.5->flet[all]>=1.0.5) (2025.3)
PS C:\Users\jules> flet --version
Flet: 1.0.5
Flutter: 3.44.8
PS C:\Users\jules> uv self update
info: Checking for updates...
success: You're already on version v0.13.5 of uv (the latest version).
PS C:\Users\jules> cd $env:TEMP
PS C:\Users\jules\AppData\Local\Temp> Remove-Item -Path "counter" -Recurse -Force
PS C:\Users\jules\AppData\Local\Temp> uvx --with flet-cli flet create counter
The app has been created.

cd counter

Run the app:

flet run

Run the integration tests:

flet test

PS C:\Users\jules\AppData\Local\Temp> cd counter
PS C:\Users\jules\AppData\Local\Temp\counter> uv sync
Using CPython 3.14.2
Creating virtual environment at: .venv
Resolved 82 packages in 405ms
Prepared 24 packages in 7.42s
Installed 64 packages in 3.91s
 + annotated-doc==0.0.5
 + annotated-types==0.8.0
 + anyio==4.15.1
 + arrow==1.4.0
 + binaryornot==0.4.4
 + certifi==2026.10.23
 + chardet==5.2.0
 + charset-normalizer==3.5.2
 + click==8.5.0
 + colorama==0.4.6
 + cookiecutter==2.7.1
 + fastapi==0.161.1
 + flet==1.0.5
 + flet-cli==1.0.5
 + flet-desktop==1.0.5
 + flet-platform-assets==1.0.5
 + flet-web==1.0.5
 + h11==0.16.0
 + httpcore==1.0.9
 + httptools==0.9.0
 + httpx==0.28.1
 + idna==3.20
 + imageio==2.38.1
 + iniconfig==2.3.1
 + jinja2==3.1.6
 + lazy-loader==0.6
 + markdown-it-py==4.2.0
 + markupsafe==3.0.4
 + mdurl==0.1.2
 + msgpack==1.2.3
 + networkx==3.7
 + numpy==2.5.4
 + oauthlib==4.0.0
 + opentelemetry-api==1.45.1
 + packaging==26.3
 + pillow==13.0.0
 + pluggy==1.7.0
 + pydantic==2.14.1
 + pydantic-core==2.50.1
 + pygments==2.21.0
 + pytest==9.1.1
 + pytest-asyncio==1.4.0
 + python-dateutil==3.0.0
 + python-dotenv==1.2.4
 + python-slugify==9.1.3
 + pyyaml==6.0.3
 + qrcode==8.2
 + repath==0.9.0
 + requests==2.34.2
 + rich==15.0.0
 + scikit-image==0.26.0
 + scipy==1.18.1
 + six==1.17.0
 + starlette==1.9.0
 + text-unidecode==1.3
 + tifffile==2026.10.15
 + typing-extensions==4.16.0
 + typing-inspection==0.4.4
 + tzdata==2026.5
 + urllib3==2.8.0
 + uvicorn==0.54.0
 + watchdog==6.0.0
 + watchfiles==1.3.0
 + websockets==17.3
PS C:\Users\jules\AppData\Local\Temp\counter> uv run flet test
[14:02:07] Flutter SDK not found or invalid version installed.
(  ●   ) Provisioning windows test host...
Flutter SDK 3.44.8 is required. It will be installed now. Proceed?   [y/n] (y): y
[14:02:18] Created app shell ✅
[14:03:26] Packaged Python app ✅
(    ● ) Test host ready. Starting tests...
[14:03:29] Running tests: C:\Users\jules\AppData\Local\Temp\counter\.venv\Scripts\python.exe -m pytest
           C:\Users\jules\AppData\Local\Temp\counter\tests
========================================================== test session starts ==========================================================
platform win32 -- Python 3.14.2, pytest-9.1.1, pluggy-1.7.0
rootdir: C:\Users\jules\AppData\Local\Temp\counter
configfile: pyproject.toml
plugins: anyio-4.15.1, flet-1.0.5, asyncio-1.4.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 1 item

tests\test_main.py F                                                                                                               [100%]

=============================================================== FAILURES ================================================================
____________________________________________________________ test_increment _____________________________________________________________

flet_app = <flet.testing.flet_test_app.FletTestApp object at 0x000002CD57777620>

    async def test_increment(flet_app: ftt.FletTestApp):
        """Counter sample: tap the FAB and assert the counter goes 0 -> 1.

        The `flet_app` fixture is provided automatically by the flet pytest plugin.
        Run with `flet test` (or `uv run pytest`) from the project directory.
        """
        tester = flet_app.tester

        await tester.pump_and_settle()

        # Initial state
>       assert (await tester.find_by_text("0")).count == 1
E       assert 0 == 1
E        +  where 0 = Finder(id=0, count=0, index=0).count

tests\test_main.py:15: AssertionError
--------------------------------------------------------- Captured stdout setup ---------------------------------------------------------
Started remote tester on 127.0.0.1:63101
Started Flutter test process.
Waiting for the Flutter app to connect...
------------------------------------------------------- Captured stdout teardown --------------------------------------------------------

Waiting for Flutter test process to exit...
Flutter test process has exited (code 0).
======================================================== short test summary info ========================================================
FAILED tests/test_main.py::test_increment - assert 0 == 1
===================================================== 1 failed in 150.79s (0:02:30) =====================================================
Additional details

No response

Ngôn ngữ chính
Python
Star
17.4k
Fork
728
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
54

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của flet-dev/flet

Tất cả issue của flet-dev/flet

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.