Skip to content

bug: Always stop ( ● ) Packaging Python app... #5989

Closed as duplicate
Closed as duplicate

Description

@yst-one

Duplicate Check

Describe the bug

       You may need to restart any open editors for them to read new settings.
       JDK installed ✅                                                                                                                             
       Android SDK installation found at C:\Users\Administrator\AppData\Local\Android\Sdk
       Android SDK package "cmdline-tools;latest" is already installed
       Android SDK package "platform-tools" is already installed
       Android SDK package "platforms;android-35" is already installed
       Android SDK package "build-tools;34.0.0" is already installed
       Android SDK installed ✅                                                                                                                     

[20:00:25] Created app shell ✅
Run subprocess: ['C:\Users\Administrator\flutter\3.38.3\bin\dart.BAT', 'run', '--suppress-analytics', 'serious_python:main', 'package',
'C:\Users\Administrator\Desktop\learn\my-app\src', '--platform', 'Android', '-r', 'android-notify>=1.60.6', '-r', 'flet>=0.80.1',
'--exclude', 'build', '--cleanup-packages']
( ● ) Packaging Python app...

Code sample

a

To reproduce

a

Expected behavior

No response

Screenshots / Videos

Captures

[Upload media here]

Operating System

Windows

Operating system details

11

Flet version

0.80.1

Regression

Yes, it used to work in a previous Flet version (please specify the version in additional details)

Suggestions

No response

Logs

Logs
[Paste your logs here]

Additional details

No response

Activity

  1. ndonkoHenri commented on Jan 10, 2026

    @ndonkoHenri
    Contributor

    Can you share a more verbose output using -vv flag?

  2. yst-one commented on Jan 10, 2026

    @yst-one
    Author

    Can you share a more verbose output using -vv flag?你能用 -vv 标志分享一个更详细的输出吗?

    (my-app) PS C:\Users\Administrator\Desktop\learn\my-app> flet build apk -vv
    [21:50:57] Run subprocess: ['C:\Users\Administrator\flutter\3.38.3\bin\flutter.BAT', '--version', '--no-version-check', '--suppress-analytics']
    [21:50:58] Flutter executable: C:\Users\Administrator\flutter\3.38.3\bin\flutter.BAT
    Dart executable: C:\Users\Administrator\flutter\3.38.3\bin\dart.BAT
    JDK installed at C:\Users\Administrator\java\17.0.13+11
    Configuring Flutter's path to JDK
    Run subprocess: ['C:\Users\Administrator\flutter\3.38.3\bin\flutter.BAT', 'config', '--no-version-check', '--suppress-analytics',
    '--jdk-dir=C:\Users\Administrator\java\17.0.13+11']
    [21:50:59] Setting "jdk-dir" value to "C:\Users\Administrator\java\17.0.13+11".

           You may need to restart any open editors for them to read new settings.
           JDK installed ✅                                                                                                                             
           Android SDK installation found at C:\Users\Administrator\AppData\Local\Android\Sdk
           Android SDK package "cmdline-tools;latest" is already installed
           Android SDK package "platform-tools" is already installed
           Android SDK package "platforms;android-35" is already installed
           Android SDK package "build-tools;34.0.0" is already installed
           Android SDK installed ✅                                                                                                                     
           Run subprocess: ['C:\\Users\\Administrator\\flutter\\3.38.3\\bin\\dart.BAT', 'run', '--suppress-analytics', 'serious_python:main', 'package',
           'C:\\Users\\Administrator\\Desktop\\learn\\my-app\\src', '--platform', 'Android', '-r', 'android-notify>=1.60.6', '-r', 'flet>=0.80.1',      
           '--exclude', 'build', '--cleanup-packages', '--verbose']                                                                                     
    

    ( ● ) Packaging Python app...

    Image
  3. yst-one commented on Jan 10, 2026

    @yst-one
    Author

    Can you share a more verbose output using -vv flag?你能用 -vv 标志分享一个更详细的输出吗?
    Even when I use -vv, I can only output this information. He has been stuck here for several hours...

  4. FeodorFitsner commented on Jan 10, 2026

    @FeodorFitsner
    Contributor

    It takes a lot to download Android SDKs for the first time. On a clean environment of GitHub Actions worker VM it takes 40 minutes to build an APK, see here: https://github.com/flet-dev/flet-build-test/actions/runs/20667336264

    If you have slow/throttled internet it could take much longer.

  5. FeodorFitsner commented on Jan 10, 2026

    @FeodorFitsner
    Contributor

    For workaround, configure GitHub Action workflow and build the app in it.

  6. yst-one commented on Jan 12, 2026

    @yst-one
    Author

    For workaround, configure GitHub Action workflow and build the app in it.作为变通方法,配置 GitHub Action 工作流程并在其中构建应用。

    Could a user manual for using github action work flow be written in the document?

  7. yst-one commented on Jan 12, 2026

    @yst-one
    Author

    For workaround, configure GitHub Action workflow and build the app in it.作为变通方法,配置 GitHub Action 工作流程并在其中构建应用。

    Furthermore, stuck on (●) Packaging Python app... I also encountered this issue on 2.8 and it still occurs up to now. I'm not sure what the reason is because there is no more detailed log output. I hope you can test it on Windows? Do you need a Windows computer? We can sponsor you with one

  8. ChenXinglinRobot commented on Feb 2, 2026

    @ChenXinglinRobot

    I’m experiencing the same issue.

    The build hangs at:
    ( ● ) Packaging Python app...

    Environment:

    • OS: Windows 11 (24H2)
    • Flutter: 3.38.7 (stable)
    • Flet: 0.80.x
    • Android SDK: 34 / 35
    • JDK: 17

    Before hanging, I see this error:
    Command '['git', 'clone', 'https://github.com/flet-dev/flet-build-template.git']'
    returned non-zero exit status 128

    flutter doctor also shows:
    [!] Proxy Configuration
    ! NO_PROXY is not set

    The process does not exit or throw any error, it just hangs for 30+ minutes.

    (GongGong) D:\update_gonggong\GongGong>flet build apk -vv
    [21:36:33] Run subprocess: ['D:\flutter\3.38.7\bin\flutter.BAT', '--version', '--no-version-check', '--suppress-analytics']
    [21:36:35] Flutter executable: D:\flutter\3.38.7\bin\flutter.BAT
    Dart executable: D:\flutter\3.38.7\bin\dart.BAT
    Configuring Flutter's path to JDK
    Run subprocess: ['D:\flutter\3.38.7\bin\flutter.BAT', 'config', '--no-version-check', '--suppress-analytics', '--jdk-dir=D:\java\17.0.13+11']
    [21:36:37] Setting "jdk-dir" value to "D:\java\17.0.13+11".

           You may need to restart any open editors for them to read new settings.
           JDK installed ✅
           Android SDK installation found at D:\Android\sdk
           Android SDK package "cmdline-tools;latest" is already installed
           Android SDK package "platform-tools" is already installed
           Android SDK package "platforms;android-35" is already installed
           Android SDK package "build-tools;34.0.0" is already installed
           Android SDK installed ✅
    

    [21:37:07] Created app shell ✅
    Run subprocess: ['D:\flutter\3.38.7\bin\dart.BAT', 'run', '--suppress-analytics', 'serious_python:main', 'package', 'D:\update_gonggong\GongGong\src', '--platform',
    'Android', '-r', 'flet-video>=0.80.5', '-r', 'flet>=0.80.5', '--exclude', 'build', '--cleanup-packages', '--verbose']
    ( ● ) Packaging Python app...
    Traceback (most recent call last):
    File "C:\Users\Chen Xinglin\AppData\Roaming\uv\python\cpython-3.10.19-windows-x86_64-none\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File "C:\Users\Chen Xinglin\AppData\Roaming\uv\python\cpython-3.10.19-windows-x86_64-none\lib\runpy.py", line 86, in run_code
    exec(code, run_globals)
    File "D:\GongGong.venv\Scripts\flet.exe_main
    .py", line 10, in
    File "D:\GongGong.venv\lib\site-packages\flet\cli.py", line 8, in main
    flet_cli.cli.main()
    File "D:\GongGong.venv\lib\site-packages\flet_cli\cli.py", line 115, in main
    args.handler(args)
    File "D:\GongGong.venv\lib\site-packages\flet_cli\commands\build.py", line 50, in handle
    self.package_python_app()
    File "D:\GongGong.venv\lib\site-packages\flet_cli\commands\build_base.py", line 1723, in package_python_app
    package_result = self.run(
    File "D:\GongGong.venv\lib\site-packages\flet_cli\commands\build_base.py", line 1940, in run
    return processes.run(
    File "D:\GongGong.venv\lib\site-packages\flet_cli\utils\processes.py", line 49, in run
    stdout_line = process.stdout.readline()
    File "C:\Users\Chen Xinglin\AppData\Roaming\uv\python\cpython-3.10.19-windows-x86_64-none\lib\codecs.py", line 319, in decode
    def decode(self, input, final=False):
    KeyboardInterrupt

  9. ndonkoHenri commented on Oct 6, 2026

    @ndonkoHenri
    Contributor

    Thanks for the report, and sorry for the slow follow-up. A build stuck on "Packaging Python app..." on Windows is tracked in #5507, so I'm closing this one as a duplicate to keep everything in one place.

    What has changed since 0.80.1:

    • Flet 0.85.0 fixed a Windows output redirect that hid the packaging log, which is why even -vv showed nothing.
    • Flet 1.0.0 runs pip with --no-input --timeout 30 --retries 3, so pip can no longer wait on a hidden credential prompt.

    The main cause we still know about: when pip can't reach pypi.org, pypi.flet.dev or GitHub, it writes retry warnings, and the packaging step stops reading them after about 1 KB. pip then blocks and the build hangs silently. A fix for serious_python is in progress.

    If you still see this on Flet 1.0.3, please post in #5507:

    • the last lines of flet build apk -v (output is visible again on 1.0)
    • whether pip download flet --no-deps --extra-index-url https://pypi.flet.dev works in a console on the same machine

    If you're behind a proxy, set HTTPS_PROXY/HTTP_PROXY before running flet build. pip and the Python download both honor them.

    About building on GitHub Actions: the docs now cover it at https://flet.dev/docs/publish#github-actions, using the official flet-build-action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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