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

[BUG] msix:create error: MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid. #25

Closed
cccarv opened this issue Mar 3, 2021 · 10 comments
Labels
bug Something isn't working fixed bug fixed

Comments

@cccarv
Copy link

cccarv commented Mar 3, 2021

ℹ️ Info

dev_dependencies:
  flutter_test:
    sdk: flutter
  msix: ^0.1.14

💬 Description

Commands used:
flutter clean && flutter pub get

flutter build windows

flutter pub run msix:create

Full Output:

E:\Desenvolvimento Flutter\bmi_calculator_flutter>flutter clean && flutter pub get
Deleting build...                                                  213ms
Deleting .dart_tool...                                             157ms
Deleting .packages...                                                5ms
Deleting Generated.xcconfig...                                       1ms
Deleting flutter_export_environment.sh...                            1ms
Deleting ephemeral...                                               20ms
Deleting .flutter-plugins-dependencies...                            0ms
Deleting .flutter-plugins...                                         1ms
Running "flutter pub get" in bmi_calculator_flutter...             841ms
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


E:\Desenvolvimento Flutter\bmi_calculator_flutter>flutter build windows
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

Building Windows application...                                         

E:\Desenvolvimento Flutter\bmi_calculator_flutter>flutter pub run msix:create
getting config values..  [√]
validate config values..  [√]  
cleaning temporary files..  [√]
create icons folder..  [√]     
copy icons..  [√]
create manifest file..  [√]    
copy VCLibs files..  [√]
packing..  Microsoft (R) MakeAppx Tool
Copyright (C) 2013 Microsoft.  All rights reserved.

Option /v specified, switching to verbose output.
Option /o specified, existing files will be overwritten.
Using default hash method: SHA256.
The path (/p) parameter is: "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release\bmi_calculator.msix"
The content directory (/d) parameter is: "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release"
Enumerating files from directory "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release"
Packing 18 file(s) in "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release" (content directory) to "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release\bmi_calculator.msix" (output file name).
Memory limit defaulting to 17154476032 bytes.
Using "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release\AppxManifest.xml" as the manifest for the package.
MakeAppx : error: Failure at appxFactory->CreateManifestReader(manifestStream, &manifestReader) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.MakeAppx : error: Error info: /*[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/*[local-name()="Identity" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/@Name
'com.flutter.bmi_calculator' viola a restrição pattern de '[-.A-Za-z0-9]+'.
Falha da análise do atributo 'Name' com valor 'com.flutter.bmi_calculator'.
Cleaning up output file "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release\bmi_calculator.msix".
MakeAppx : error: Failure at (CreatePackage( overwrite, hashAlgorithm, fileList, outputPath, manifestStream.Get(), forceCompressionNone, performanceOptions, encryptPackage, encryptionOptions, cgmPath, mainPackagePathForResourceExemption, makepriExeFullPath)) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.


E:\Desenvolvimento Flutter\bmi_calculator_flutter>

📜 Pubspec.yaml

name: bmi_calculator
description: A new Flutter application.

version: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.2
  font_awesome_flutter: ^8.11.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  msix: ^0.1.14

flutter:
  uses-material-design: true
# msix_config:
# display_name: BMI Calculator
# publisher_display_name: Carlos Carvalho
# identity_name: MyCompany.MySuite.MyApp
# msix_version: 1.0.0.0
# certificate_path: C:\<PathToCertificate>\<MyCertificate.pfx>
# certificate_password: 1234 (require if using .pfx certificate)
# publisher: CN=My Company, O=My Company, L=Berlin, S=Berlin, C=DE
# logo_path: C:\<PathToIcon>\<Logo.png>
# start_menu_icon_path: C:\<PathToIcon>\<Icon.png>
# tile_icon_path: C:\<PathToIcon>\<Icon.png>
# vs_generated_images_folder_path: C:\<PathToFolder>\Images
# icons_background_color: transparent (or some color like: '#ffffff')
# architecture: x64
# capabilities: 'internetClient,location,microphone,webcam'

@YehudaKremer
Copy link
Owner

YehudaKremer commented Mar 3, 2021

hey

change:
# msix_config:
# display_name: BMI Calculator
# publisher_display_name: Carlos Carvalho

to:
msix_config:
display_name: BMI Calculator
publisher_display_name: Carlos Carvalho

in Pubspec.yaml, line with # is a comment

@cccarv
Copy link
Author

cccarv commented Mar 3, 2021

hey

change:
# msix_config:
# display_name: BMI Calculator
# publisher_display_name: Carlos Carvalho

to:
msix_config:
display_name: BMI Calculator
publisher_display_name: Carlos Carvalho

in Pubspec.yaml, line with # is a comment

I did what you suggest but nothing changed. I received the same error.

And as far as I know, the config is optional, right?
https://github.com/YehudaKremer/msix#configuration-optional

@YehudaKremer
Copy link
Owner

yes is optional
but you must use it because i take the project name (bmi_calculator) by default to be the display_name,
And your project name have _ and that invalid character for display_name

i will fix this

@cccarv
Copy link
Author

cccarv commented Mar 3, 2021

I see!

Well, I tried using the config but I'm still getting errors.

Details:

📜 Pubspec.yaml

name: bmi_calculator
description: A new Flutter application.

version: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.2
  font_awesome_flutter: ^8.11.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  msix: ^0.1.14

flutter:
  uses-material-design: true

msix_config:
  display_name: BMICalculator
  publisher_display_name: Carlos
#   identity_name: MyCompany.MySuite.MyApp
#   msix_version: 1.0.0.0
#   certificate_path: C:\<PathToCertificate>\<MyCertificate.pfx>
#   certificate_password: 1234 (require if using .pfx certificate)
#   publisher: CN=My Company, O=My Company, L=Berlin, S=Berlin, C=DE
#   logo_path: C:\<PathToIcon>\<Logo.png>
#   start_menu_icon_path: C:\<PathToIcon>\<Icon.png>
#   tile_icon_path: C:\<PathToIcon>\<Icon.png>
#   vs_generated_images_folder_path: C:\<PathToFolder>\Images
#   icons_background_color: transparent (or some color like: '#ffffff')
#   architecture: x64
#   capabilities: 'internetClient,location,microphone,webcam'

💬 Output

E:\Desenvolvimento Flutter\bmi_calculator_flutter>flutter pub run msix:create
getting config values..  [√]
validate config values..  [√]
cleaning temporary files..  [√]
create icons folder..  [√]
copy icons..  [√]
create manifest file..  [√]
copy VCLibs files..  [√]
packing..  Microsoft (R) MakeAppx Tool
Copyright (C) 2013 Microsoft.  All rights reserved.

Option /v specified, switching to verbose output.
Option /o specified, existing files will be overwritten.
Using default hash method: SHA256.
The path (/p) parameter is: "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release\bmi_calculator.msix"
The content directory (/d) parameter is: "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release"
Enumerating files from directory "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release"
Packing 18 file(s) in "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release" (content directory) to "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release\bmi_calculator.msix" (output file name).
Memory limit defaulting to 17154476032 bytes.
Using "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release\AppxManifest.xml" as the manifest for the package.
MakeAppx : error: Failure at appxFactory->CreateManifestReader(manifestStream, &manifestReader) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.MakeAppx : error: Error info: /*[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/*[local-name()="Identity" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/@Name
'com.flutter.bmi_calculator' viola a restrição pattern de '[-.A-Za-z0-9]+'.
Falha da análise do atributo 'Name' com valor 'com.flutter.bmi_calculator'.
Cleaning up output file "\\?\E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release\bmi_calculator.msix".
MakeAppx : error: Failure at (CreatePackage( overwrite, hashAlgorithm, fileList, outputPath, manifestStream.Get(), forceCompressionNone, performanceOptions, encryptPackage, encryptionOptions, cgmPath, mainPackagePathForResourceExemption, makepriExeFullPath)) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.


E:\Desenvolvimento Flutter\bmi_calculator_flutter>

@YehudaKremer YehudaKremer mentioned this issue Mar 3, 2021
@YehudaKremer
Copy link
Owner

Hey again, i fixed it
please try version 0.1.15

@cccarv
Copy link
Author

cccarv commented Mar 3, 2021

Thanks a lot for the fast fix!!! the 0.1.15 version worked just fine!

E:\Desenvolvimento Flutter\bmi_calculator_flutter>flutter pub run msix:create
getting config values..  [√]
validate config values..  [√]
cleaning temporary files..  [√]
create icons folder..  [√]
copy icons..  [√]
create manifest file..  [√]
copy VCLibs files..  [√]
packing..  [√]
singing..  [√] *no certificate was specified, using TEST certificate
cleaning temporary files..  [√]

Msix installer created in:
E:\Desenvolvimento Flutter\bmi_calculator_flutter\build\windows\runner\Release

NOTE: This msix installer is signed with TEST certificate,
if you have not yet installed this test certificate on your PC please read the following guide:
https://www.advancedinstaller.com/install-test-certificate-from-msix.html


E:\Desenvolvimento Flutter\bmi_calculator_flutter>

@YehudaKremer
Copy link
Owner

well, good bug report
appreciate it

@YehudaKremer YehudaKremer added bug Something isn't working fixed bug fixed labels Mar 3, 2021
@Wolfskammer04
Copy link

Hi today with freshly installed MakeAppx I got the following error:

MakeAppx : error: Error info: /[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/[local-name()="Identity" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/@Version
'1.1.220412.0' verstößt gegen pattern-Einschränkung von '(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){3}'.
Analyse des Attributs 'Version' mit dem Wert '1.1.220412.0' fehlgeschlagen.

in English: the regex check failed for the version number of '1.1.220412.0'.

AppxManifest.xml:

...


So for me it seems, that the version number is to high. Any idea how to solve that?

@YehudaKremer
Copy link
Owner

YehudaKremer commented Apr 26, 2022

Hello

Add to your pubspec.yaml:

msix_config:
  msix_version: 1.0.0.0

@Wolfskammer04
Copy link

Thanks very much. It fixed the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed bug fixed
Projects
None yet
Development

No branches or pull requests

3 participants