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] Bad state no element #61

Closed
ghost opened this issue Oct 28, 2021 · 4 comments
Closed

[BUG] Bad state no element #61

ghost opened this issue Oct 28, 2021 · 4 comments
Assignees
Labels
bug Something isn't working fixed bug fixed

Comments

@ghost
Copy link

ghost commented Oct 28, 2021

ℹ️ Info

Version: 2.6.1

💬 Description

Since upgrade from 2.5..4 to 2.6.1 i got the following error : Bad state no element :

[10:34:49]: ▸ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 0% parsing cli arguments..
[10:34:49]: ▸ ☑ parsing cli arguments
[10:34:49]: ▸ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 7% validating config values..
[10:34:49]: ▸ ☑ validating config values
[10:34:49]: ▸ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 14% cleaning temporary files..
[10:34:49]: ▸ ☑ cleaning temporary files
[10:34:49]: ▸ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 21% copying assets folder..
[10:34:49]: ▸ ☑ copying assets folder
[10:34:49]: ▸ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 28% creating app icons folder..
[10:34:49]: ▸ ☑ creating app icons folder
[10:34:49]: ▸ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 35% copying app icons..
[10:34:49]: ▸ ☑ copying app icons
[10:34:49]: ▸ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 42% copying VC libraries..
[10:34:49]: ▸ ☑ copying VC libraries
[10:34:49]: ▸ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 50% getting certificate publisher..
[10:34:49]: ▸ [❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 50% getting certificate publisher..                                     Certificate Details: ==
============== Certificat 0 ================
[10:34:49]: ▸ ================ Commencement de l’imbrication au niveau 1 ================
[10:34:49]: ▸ Élément 0 :
[10:34:49]: ▸ Numéro de série : 05beb48eCENSORED_FOR_GITHUB2f7
[10:34:49]: ▸ Émetteur: O=CENSORED_FOR_GITHUB, S=France, C=FR
[10:34:49]: ▸ NotBefore : 20/10/2021 10:14
[10:34:49]: ▸ NotAfter : 07/03/2049 10:14
[10:34:49]: ▸ Objet: O=CENSORED_FOR_GITHUB, S=France, C=FR
[10:34:49]: ▸ La signature correspond à la clé publique
[10:34:49]: ▸ Certificat racine : le sujet correspond à l’émetteur
[10:34:49]: ▸ Hach. cert. (sha1) : 275f5CENSORED_FOR_GITHUB0cbf24f
[10:34:49]: ▸ ----------------  Fin de l’imbrication au niveau 1  ----------------
[10:34:49]: ▸ Fournisseur = Microsoft Enhanced Cryptographic Provider v1.0
[10:34:49]: ▸ Succès du test de chiffrement
[10:34:49]: ▸ CertUtil: -dump La commande s’est terminée correctement.
[10:34:49]: ▸
[10:34:49]: ▸ Bad state: No element
[10:34:49]: ▸ This error happen when this package tried to read the certificate details,
[10:34:49]: ▸ please report it by pasting all this output (after deleting sensitive info) to:
[10:34:49]: ▸ https://github.com/YehudaKremer/msix/issues
[10:34:49]: ▸ #0      ListMixin.lastWhere (dart:collection/list.dart:180:5)
[10:34:49]: ▸ #1      Signtool.getCertificatePublisher (package:msix/src/cli/signtool.dart:34:12)
[10:34:49]: ▸ #2      Signtool.getCertificatePublisher (package:msix/src/cli/signtool.dart:44:22)
[10:34:49]: ▸ #3      Msix.createMsix (package:msix/msix.dart:29:16)
[10:34:49]: ▸ <asynchronous suspension>

📜 Pubspec.yaml

  msix: 2.6.1


msix_config:
  display_name: "My flutter app"
  publisher_display_name: CONSORED_FOR_GITHUB
  identity_name:  CONSORED_FOR_GITHUB.WindowsApp
  logo_path: assets/images/icon.png
  vs_generated_images_folder_path: assets/images
  # Permissions are here : location,microphone,webcam'
  capabilities: 'internetClient'

In addition i run the following command :

flutter pub run msix:create -o ENV['APP_FILE_PATH'] -n ENV['APP_NAME'] -c ENV['MSIX_CERTIFICATE_PATH'] -p ENV['MSIX_CERTIFICATE_PASSWORD'] -b ENV['MSIX_CERTIFICATE_PUBLISHER'] -v 1.0.0.0
@ghost
Copy link
Author

ghost commented Oct 28, 2021

In addition of this issue :

Command line return True on windows so my CI-CD didn't detect that command line failed, it's important to make a return code different like False or -1.

YehudaKremer added a commit that referenced this issue Oct 28, 2021
@YehudaKremer
Copy link
Owner

@EA-YOUHOU Thank you for this report

I fixed the two problems you mention here and publish new version 2.6.2

please try it

@YehudaKremer
Copy link
Owner

and @EA-YOUHOU

You can omit the -b ENV['MSIX_CERTIFICATE_PUBLISHER'] part,
the "publisher" is recognize automatically

@YehudaKremer YehudaKremer added the bug Something isn't working label Oct 28, 2021
@YehudaKremer YehudaKremer self-assigned this Oct 28, 2021
@YehudaKremer YehudaKremer added the fixed bug fixed label Oct 28, 2021
@ghost
Copy link
Author

ghost commented Oct 28, 2021

INSANE, well played :) ! It works well

@ghost ghost closed this as completed Oct 28, 2021
This issue was closed.
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

1 participant