Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flet build windows failed but worked previously in same version #4621

Closed
1 task done
vishnu-rvb opened this issue Dec 25, 2024 · 7 comments
Closed
1 task done

Flet build windows failed but worked previously in same version #4621

vishnu-rvb opened this issue Dec 25, 2024 · 7 comments

Comments

@vishnu-rvb
Copy link

vishnu-rvb commented Dec 25, 2024

Duplicate Check

Describe the bug

Flet build windows is no longer working.
Used to work previously in the same version 0.25.2 itself last week but now not working.

Building with pyInstaller is still working.
Flet run command is working.

Requirements

requirements.txt
flet

Code sample

Code
import flet as ft

def main(page: ft.Page):
    page.title='Flet test'
    page.vertical_alignment=ft.MainAxisAlignment.CENTER
    
    number_txtbx=ft.TextField(value='1',
                              text_align=ft.TextAlign.CENTER,
                              width=100)
    def minus_click(e):
        number_txtbx.value=str(int(number_txtbx.value)-1)
        page.update()
    def plus_click(e):
        number_txtbx.value=str(int(number_txtbx.value)+1)
        page.update()

    minus_btn=ft.IconButton(ft.Icons.REMOVE,on_click=minus_click)
    plus_btn=ft.IconButton(ft.Icons.ADD,on_click=plus_click)
    
    page.add(
        ft.Row([
        minus_btn,
        number_txtbx,
        plus_btn
        ],alignment=ft.MainAxisAlignment.CENTER))

ft.app(main)

To reproduce

1.Navigate to root in terminal/shell
2.Run command flet build windows -v

Expected behavior

Build success

Operating System

Windows

Operating system details

Windows 10

Flet version

0.25.2

Regression

Yes, it used to work in a previous Flet version (please specify the version in additional details)
used to work in 0.21.x,0.22.0, 0.22.2, 0.22.1 and 0.25.2

Logs

Logs
C:\Users\User\Documents\Python scripts\Python class\Flet\test>flet build windows -v
[23:19:46] No additional Flutter dependencies!
[23:19:48] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.25.2 ✅
           Copying C:\Users\User\Documents\Python scripts\Python class\Flet\test\assets\icon.png to C:\Users\User\Documents\Python scripts\Python
           class\Flet\test\build\flutter\images
           Customized app icons and splash images ✅
           Run subprocess: ['C:\\dev\\flutter\\bin\\dart.BAT', 'run', 'flutter_launcher_icons']
( ●    ) Generating app icons ⏳...
Built flutter_launcher_icons:flutter_launcher_icons.
(●     ) Generating app icons ⏳...   ════════════════════════════════════════════
     FLUTTER LAUNCHER ICONS (v0.14.2)
  ════════════════════════════════════════════

• Creating default icons Android
( ●    ) Generating app icons ⏳... • Overwriting the default Android launcher icon with a new icon
(  ●   ) Generating app icons ⏳... • Creating adaptive icons Android
(     ●) Generating app icons ⏳... • Updating colors.xml with color for adaptive icon background
• Creating mipmap xml file Android
(    ● ) Generating app icons ⏳... • Overwriting default iOS launcher icon with new icon
(  ●   ) Generating app icons ⏳... Creating Icons for Web...
(    ● ) Generating app icons ⏳... Creating Icons for Windows...
(     ●) Generating app icons ⏳... Creating Icons for MacOS...
(●     ) Generating app icons ⏳...
✓ Successfully generated launcher icons
[23:19:51] Generated app icons ✅
           Run subprocess: ['C:\\dev\\flutter\\bin\\dart.BAT', 'run', 'serious_python:main', 'package', 'C:\\Users\\User\\Documents\\Python scripts\\Python
           class\\Flet\\test', '--platform', 'Windows', '--requirements', '-r,C:\\Users\\User\\Documents\\Python scripts\\Python
           class\\Flet\\test\\requirements.txt', '--exclude', 'build', '--cleanup']
(  ●   ) Packaging Python app ⏳...
Built serious_python:main.
( ●    ) Packaging Python app ⏳... Running package command
Extra PyPi indexes: [https://pypi.flet.dev]
Created temp directory: C:\Users\User\AppData\Local\Temp\serious_python_temp5c764009
Copying Python app from C:\Users\User\Documents\Python scripts\Python class\Flet\test to a temp directory
(●     ) Packaging Python app ⏳... Cleanup app
Configured Windows/ platform with sitecustomize.py
Installing [-r, C:\Users\User\Documents\Python scripts\Python class\Flet\test\requirements.txt] with pip command to C:\Users\User\AppData\Local\Temp\serious_python_temp5c764009\__pypackages__
( ●    ) Packaging Python app ⏳... Cleanup installed packages
(  ●   ) Packaging Python app ⏳... Creating app archive at C:\Users\User\Documents\Python scripts\Python class\Flet\test\build\flutter\app/app.zip from a temp directory
(     ●) Packaging Python app ⏳... Writing app archive hash to C:\Users\User\Documents\Python scripts\Python class\Flet\test\build\flutter\app/app.zip.hash
(    ● ) Packaging Python app ⏳... Deleting temp directory
[23:20:05] Packaged Python app ✅
           Run subprocess: ['C:\\dev\\flutter\\bin\\flutter.BAT', 'build', 'windows']
( ●    ) Building Windows app ⏳...
Downloading packages...
(     ●) Building Windows app ⏳...   archive 3.6.1 (4.0.2 available)
  characters 1.3.0 (1.4.0 available)
  clock 1.1.1 (1.1.2 available)
  collection 1.19.0 (1.19.1 available)
  fl_chart 0.69.2 (0.70.0 available)
  flutter_lints 2.0.3 (5.0.0 available)
  image 4.3.0 (4.5.2 available)
  intl 0.19.0 (0.20.1 available)
  js 0.6.7 (0.7.1 available)
  lints 2.1.1 (5.1.1 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  meta 1.15.0 (1.16.0 available)
  path 1.9.0 (1.9.1 available)
  sensors_plus 4.0.2 (6.1.1 available)
  sensors_plus_platform_interface 1.2.0 (2.0.1 available)
  toml 0.15.0 (0.16.0 available)
  url_strategy 0.2.0 (discontinued)
! wakelock_plus 1.2.10 (overridden)
! web 1.1.0 (overridden)
  web_socket_channel 2.4.5 (3.0.1 available)
! window_manager 0.4.3 (overridden)
Got dependencies!
1 package is discontinued.
18 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
( ●    ) Building Windows app ⏳...
windows/flutter/CMakeLists.txt does not use FLUTTER_TARGET_PLATFORM, updating.
../../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/flet-0.25.2/lib/src/utils/theme.dart(356,28): error G44692867: A value of type 'TabBarThemeData' can't be returned from a function with return type 'TabBarTheme?'. [C:\Users\User\Documents\Python scripts\Python class\Flet\test\build\flutter\build\windows\x64\flutter\flutter_assemble.vcxproj]
../../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/flet-0.25.2/lib/src/utils/theme.dart(438,28): error G44692867: A value of type 'DialogThemeData' can't be returned from a function with return type 'DialogTheme?'. [C:\Users\User\Documents\Python scripts\Python class\Flet\test\build\flutter\build\windows\x64\flutter\flutter_assemble.vcxproj]
../../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/flet-0.25.2/lib/src/utils/theme.dart(482,26): error G44692867: A value of type 'CardThemeData' can't be returned from a function with return type 'CardTheme?'. [C:\Users\User\Documents\Python scripts\Python class\Flet\test\build\flutter\build\windows\x64\flutter\flutter_assemble.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\Users\User\Documents\Python scripts\Python class\Flet\test\build\flutter\build\windows\x64\CMakeFiles\933ecf84623cf955788720650c195560\flutter_windows.dll.rule;C:\Users\User\Documents\Python scripts\Python class\Flet\test\build\flutter\build\windows\x64\CMakeFiles\3cc366cd75f67fc74193a748eadb8596\flutter_assemble.rule;C:\Users\User\Documents\Python scripts\Python class\Flet\test\build\flutter\windows\flutter\CMakeLists.txt' exited with code 1. [C:\Users\User\Documents\Python scripts\Python class\Flet\test\build\flutter\build\windows\x64\flutter\flutter_assemble.vcxproj]
(   ●  ) Building Windows ap   35.3s
Build process failed.
[23:20:42] Error building Flet app - see the log of failed command above.
           Run subprocess: ['C:\\dev\\flutter\\bin\\flutter.BAT', '--version']
[23:20:43] Run subprocess: ['C:\\dev\\flutter\\bin\\flutter.BAT', 'doctor']
[23:20:46] Doctor summary (to see all details, run flutter doctor -v):
           [✓] Flutter (Channel stable, 3.27.0, on Microsoft Windows [Version 10.0.19045.5247], locale en-US)
           [✓] Windows Version (Installed version of Windows is version 10 or higher)
           [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
           [✓] Chrome - develop for the web
           [✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.1)
           [✓] Android Studio (version 2023.1)
           [✓] VS Code (version 1.96.2)
           [✓] Connected device (3 available)
           [✓] Network resources

           • No issues found!

@jlb2-abc
Copy link

For some reason the text color in bottom sheet is red with yellow underlines and I can not figure out why?
image

@pnkmem429
Copy link

I don't know whether it works, but try using Flutter 3.24.5 or below.

@baebranch
Copy link

+1. I'm having this exact same issue.
flet v0.25.1

@baebranch
Copy link

I don't know whether it works, but try using Flutter 3.24.5 or below.

I've tried this and can confirm it works. Used FVM to downgrade and it built.

@juaningpose
Copy link

@baebranch I love you so much. Installing that older version solved my problem. Thank you.

@vishnu-rvb
Copy link
Author

I don't know whether it works, but try using Flutter 3.24.5 or below.

I've tried this and can confirm it works. Used FVM to downgrade and it built.

Can you please add the instructions for this with steps

@baebranch
Copy link

I don't know whether it works, but try using Flutter 3.24.5 or below.

I've tried this and can confirm it works. Used FVM to downgrade and it built.

Can you please add the instructions for this with steps

In the terminal:

  1. Use where flutter to find and delete your current flutter install
  2. Follow the instructions here to install flutter version manager https://fvm.app/documentation/getting-started/installation (may have to install chocolatey)
  3. Install Flutter fvm install 3.24.5
  4. Run fvm use 3.24.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants