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

No file or variants found for asset: app/app.zip. #2372

Open
Slakeec opened this issue Jan 11, 2024 · 12 comments
Open

No file or variants found for asset: app/app.zip. #2372

Slakeec opened this issue Jan 11, 2024 · 12 comments

Comments

@Slakeec
Copy link

Slakeec commented Jan 11, 2024

PS C:\Users\user\PycharmProjects\MSM> flet build windows -vv
Flutter bootstrap directory: C:\Users\user\AppData\Local\Temp\flet_flutter_build_arrvgVFfgq
Creating Flutter bootstrap project...OK
Customizing app icons and splash images...OK
Generating app icons... ╔════════════════════════════════════════════════════════════════════════════╗
║ The Dart tool uses Google Analytics to report feature usage statistics ║
║ and to send basic crash reports. This data is used to help improve the ║
║ Dart platform and tools over time. ║
║ ║
║ To disable reporting of analytics, run: ║
║ ║
║ dart --disable-analytics ║
║ ║
╚════════════════════════════════════════════════════════════════════════════╝

Resolving dependencies in C:\Users\user\AppData\Local\Temp\flet_flutter_build_arrvgVFfgq... (2.8s)
Got dependencies in C:\Users\user\AppData\Local\Temp\flet_flutter_build_arrvgVFfgq.
Building package executable... (2.2s)
Built flutter_launcher_icons:flutter_launcher_icons.
════════════════════════════════════════════
FLUTTER LAUNCHER ICONS (v0.13.1)
════════════════════════════════════════════

• Creating default icons Android
• Overwriting the default Android launcher icon with a new icon
• Overwriting default iOS launcher icon with new icon
Creating Icons for Web...
Creating Icons for Windows...
Creating Icons for MacOS...

✓ Successfully generated launcher icons
OK
Packaging Python app...Building package executable... (1.3s)
Built serious_python:main.
Running package command
Creating asset directory: C:\Users\user\AppData\Local\Temp\flet_flutter_build_arrvgVFfgq\app
Copying Python app from C:\Users\user\PycharmProjects\MSM to C:\Users\user\AppData\Local\Temp\serious_python_temp24caec34
Error: FileSystemException: Failed to decode data using encoding 'utf-8', path = 'C:\Users\user\AppData\Local\Temp\serious_python_temp24caec34\requirements.txt'
Deleting temp directory C:\Users\user\AppData\Local\Temp\serious_python_temp24caec34
OK
Building Windows app...['C:\Users\user\Desktop\flut\flutter\bin\flutter.BAT', 'build', 'windows']
Resolving dependencies...
fl_chart 0.65.0 (0.66.0 available)
flutter_lints 2.0.3 (3.0.1 available)
flutter_native_splash 2.3.7 (2.3.9 available)
js 0.6.7 (0.7.0 available)
lints 2.1.1 (3.0.0 available)
matcher 0.12.16 (0.12.16+1 available)
material_color_utilities 0.5.0 (0.8.0 available)
meta 1.10.0 (1.11.0 available)
package_info_plus 4.2.0 (5.0.1 available)
path 1.8.3 (1.9.0 available)
petitparser 5.4.0 (6.0.2 available)
test_api 0.6.1 (0.7.0 available)
toml 0.14.0 (0.15.0 available)
web 0.3.0 (0.4.0 available)
web_socket_channel 2.4.0 (2.4.3 available)
xml 6.3.0 (6.5.0 available)
Got dependencies!
16 packages have newer versions incompatible with dependency constraints.
Try flutter pub outdated for more information.

windows/flutter/CMakeLists.txt does not use FLUTTER_TARGET_PLATFORM, updating.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: �஬������ ��⠫�� ��� ��⠫�� ��室� �� ����� �ᯮ�������� �� �६����� ��⠫���, ��⮬� �� �� ����� ���� ��稭
�� �஡��� � ������筮� ᡮમ�. [C:\Users\user\AppData\Local\Temp\flet_flutter_build_arrvgVFfgq\build\windows\x64\ZERO_CHECK.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: �஬������ ��⠫�� ��� ��⠫�� ��室� �� ����� �ᯮ�������� �� �६����� ��⠫���, ��⮬� �� �� ����� ���� ��稭
�� �஡��� � ������筮� ᡮમ�. [C:\Users\user\AppData\Local\Temp\flet_flutter_build_arrvgVFfgq\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: �஬������ ��⠫�� ��� ��⠫�� ��室� �� ����� �ᯮ�������� �� �६����� ��⠫���, ��⮬� �� �� ����� ���� ��稭
�� �஡��� � ������筮� ᡮમ�. [C:\Users\user\AppData\Local\Temp\flet_flutter_build_arrvgVFfgq\build\windows\x64\flutter\flutter_assemble.vcxproj]
Error detected in pubspec.yaml:
No file or variants found for asset: app/app.zip.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: ���짮��⥫�᪠� ᡮઠ ��� "C:\Users\user\AppData\Local\Temp\flet_flutter_build_arrvgVFfgq\build\windows
x64\CMakeFiles\97ccedc66f37bc442ea4e473dec1ca92\flutter_windows.dll.rule;C:\Users\user\AppData\Local\Temp\flet_flutter_build_arrvgVFfgq\build\windows\x64\CMakeFiles\9736cc717a512a8e02eaa94d6095a866\flutter_assemble.rule;C:\Users\u
ser\AppData\Local\Temp\flet_flutter_build_arrvgVFfgq\windows\flutter\CMakeLists.txt" �����訫� ࠡ��� � ����� 1. [C:\Users\user\AppData\Local\Temp\flet_flutter_build_arrvgVFfgq\build\windows\x64\flutter\flutter_assemble.vcxproj]
Building Windows application... 61,3s
Build process failed.
Deleting Flutter bootstrap directory C:\Users\user\AppData\Local\Temp\flet_flutter_build_arrvgVFfgq
Error building Flet app - see the log of failed command above.
PS C:\Users\user\PycharmProjects\MSM>

@FeodorFitsner
Copy link
Contributor

OK, this part worries me:

Error: FileSystemException: Failed to decode data using encoding 'utf-8', path = 'C:\Users\user\AppData\Local\Temp\serious_python_temp24caec34\requirements.txt'

What do you have in requirements.txt?

@Slakeec
Copy link
Author

Slakeec commented Jan 12, 2024

anyio==4.2.0
arrow==1.3.0
binaryornot==0.4.4
certifi==2023.11.17
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
cookiecutter==2.5.0
et-xmlfile==1.1.0
exceptiongroup==1.2.0
flet==0.18.0
flet-core==0.18.0
flet-runtime==0.18.0
h11==0.14.0
httpcore==0.17.3
httpx==0.24.1
idna==3.6
Jinja2==3.1.2
markdown-it-py==3.0.0
MarkupSafe==2.1.3
mdurl==0.1.2
numpy==1.26.3
oauthlib==3.2.2
openpyxl==3.1.2
packaging==23.2
pandas==2.1.4
Pygments==2.17.2
pypng==0.20220715.0
python-dateutil==2.8.2
python-slugify==8.0.1
pytz==2023.3.post1
PyYAML==6.0.1
qrcode==7.4.2
repath==0.9.0
requests==2.31.0
rich==13.7.0
six==1.16.0
sniffio==1.3.0
text-unidecode==1.3
types-python-dateutil==2.8.19.20240106
typing_extensions==4.9.0
tzdata==2023.4
urllib3==2.1.0
watchdog==3.0.0
websocket-client==1.7.0
websockets==11.0.3

@FeodorFitsner
Copy link
Contributor

Alright, please see "no pip freeze" note in this section: https://flet.dev/docs/guides/python/packaging-app-for-distribution#project-structure

Also, save requirements.txt in UTF-8 encoding.

@taaaf11
Copy link
Contributor

taaaf11 commented Jan 12, 2024

@FeodorFitsner I think, the culprit is powershell (it is my assumption). Because powershell uses UTF-16 encoding when Write-Output is used.

@FeodorFitsner
Copy link
Contributor

@taaaf11 that makes sense when you do pip freeze from PS! Let's wait for confirmation and then create a new issue for that.

@taaaf11
Copy link
Contributor

taaaf11 commented Jan 12, 2024

@FeodorFitsner I think I am getting the issue... I pip freeze > requirements.txt-ed from my virtual environment. Opened the file in python prompt. f.read() function gave a lot of \x-s, and f.encoding gave cp1252.

@FeodorFitsner
Copy link
Contributor

@taaaf11 yep, but in context of flet buid requirements.txt is opening from Dart ;)

@taaaf11
Copy link
Contributor

taaaf11 commented Jan 12, 2024

@FeodorFitsner I fear replying, I don't know Dart 🤐

@Slakeec
Copy link
Author

Slakeec commented Jan 15, 2024

Thank you very much for your advices.This time I made requirements file manually as it is in description and also got this error:

windows/flutter/CMakeLists.txt does not use FLUTTER_TARGET_PLATFORM, updating.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: �஬������ ��⠫�� ��� ��⠫�� ��室� �� ����� �ᯮ�������� �� �६����� ��⠫���, ��⮬� �� �� ����� ���� ��稭
�� �஡��� � ������筮� ᡮમ�. [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\ZERO_CHECK.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: �஬������ ��⠫�� ��� ��⠫�� ��室� �� ����� �ᯮ�������� �� �६����� ��⠫���, ��⮬� �� �� ����� ���� ��稭
�� �஡��� � ������筮� ᡮમ�. [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: ��室 �� ������� "setlocal [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\w
indows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\C
Make\CMake\bin\cmake.exe" -E make_directory C:/Users/user/AppData/Local/Temp/flet_flutter_build_hIKxvCPIMT/build/windows/x64/runner/Release [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\plugins
serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT
\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\C
Make\CMake\bin\cmake.exe" -E copy_directory C:/Users/user/AppData/Local/Temp/flet_flutter_build_hIKxvCPIMT/build/windows/x64/python/Lib C:/Users/user/AppData/Local/Temp/flet_flutter_build_hIKxvCPIMT/build/windows/x64/runner/Releas
e/Lib [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT
\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\C
Make\CMake\bin\cmake.exe" -E copy_directory C:/Users/user/AppData/Local/Temp/flet_flutter_build_hIKxvCPIMT/build/windows/x64/python/DLLs C:/Users/user/AppData/Local/Temp/flet_flutter_build_hIKxvCPIMT/build/windows/x64/runner/Relea
se/DLLs [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT
\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: IF "release" == "release" DEL "C:/Users/user/AppData/Local/Temp/flet_flutter_build_hIKxvCPIMT/bui
ld/windows/x64/runner/Release/DLLs*d.*" /S /Q [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT
\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: DEL "C:/Users/user/AppData/Local/Temp/flet_flutter_build_hIKxvCPIMT/build/windows/x64/runner/Rele
ase/DLLs*.ico" /S /Q [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT
\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: DEL "C:/Users/user/AppData/Local/Temp/flet_flutter_build_hIKxvCPIMT/build/windows/x64/runner/Rele
ase/DLLs*.cat" /S /Q [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT
\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: DEL "C:/Users/user/AppData/Local/Temp/flet_flutter_build_hIKxvCPIMT/build/windows/x64/runner/Rele
ase/DLLs\tcl86t.dll" /Q [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT
\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: DEL "C:/Users/user/AppData/Local/Temp/flet_flutter_build_hIKxvCPIMT/build/windows/x64/runner/Rele
ase/DLLs\tk86t.dll" /Q [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT
\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmEnd [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\plugins
serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\Users\user\AppData\Local\Temp\flet

flutter_build_hIKxvCPIMT\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmErrorLevel [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\p
lugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: exit /b %1 [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\plug
ins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmDone [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows\x64\plugins
\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT
\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :VCEnd" � ����� 1. [C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT\build\windows
x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
Building Windows application... 65,1s
Build process failed.
Deleting Flutter bootstrap directory C:\Users\user\AppData\Local\Temp\flet_flutter_build_hIKxvCPIMT
Error building Flet app - see the log of failed command above.

@Slakeec
Copy link
Author

Slakeec commented Jan 15, 2024

somehow the project was built (but with errors during building) and now when i am trying to start an exe file. mt app just blinks on startup and then closes itself. What could be a problem with that?

@taaaf11
Copy link
Contributor

taaaf11 commented Jan 15, 2024

@Slakeec Make your requirements.txt hand-picked, like, if you are using packages flet and flask, include the packages in requirements.txt like this (put in the versions):

flet==(some ver)
flask==(some ver)

Also, edit your second-last comment and put necessary code formatting like this:

  • Surround the error message text (the full output) with three backticks (this ``` ).

@gu1llermo
Copy link

windows/flutter/CMakeLists.txt does not use FLUTTER_TARGET_PLATFORM, updating.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning

Please correct the inverted slash thing.
If it is / just use that one
But if it's \ just that, nothing else please

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

4 participants