-
Notifications
You must be signed in to change notification settings - Fork 73
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
Bad state no element (or user erroe? #84
Comments
hello can you try with .pfx certification type intended of .p12 |
Changing the extension results in the same problem. It seems to read the file fine (with both extensions) because the Cert Hash(sha1) is correct... The .p12 file was created using XCA. |
i see, you can use the see: please update me if you able to solve the problem |
is it test certificate? can you share it? |
Sure! files.zip |
Oeps: password in yaml is: meyn_lbh_simulation (changed it to paste in the above) Still same problem... |
It still resulted an empty subject. Filling in the other attributes resulted in: |
Any alternative suggestions how to create a pfx file on a win10 computer? |
wait, the error "type 'String' is not a subtype of type 'GeneralException'" is msix package bug, |
XCA is a good tool for certifications creations, i can try to help you create valid certificate for msix installer |
Works perfect now! Thanks so much for you great and speedy support. |
Thank you for reporting this problem 👍 |
ℹ️ Info
Version: 2.8.8
💬 "flutter pub run msix:create" results in: "Bad state no element" when getting certificate
Enter a description of your problem here.
flutter pub run msix:create
✓ parsing cli arguments
✓ validating config values
✓ cleaning temporary files
✓ creating app icons folder
✓ copying app icons
✓ copying VC libraries
❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚ 46% getting certificate publisher.. Certificate Details: ================ Certificate 0 ================
================ Begin Nesting Level 1 ================
Element 0:
Serial Number: 01
Issuer: EMPTY
NotBefore: 03/02/2022 9:23 am
NotAfter: 03/02/2032 9:23 am
Subject: EMPTY
Signature matches Public Key
Root Certificate: Subject matches Issuer
Cert Hash(sha1): 33480eede81bcaff00f82458c8dceba1ed67d5ba
---------------- End Nesting Level 1 ----------------
Provider = Microsoft Enhanced Cryptographic Provider v1.0
Encryption test passed
CertUtil: -dump command completed successfully.
Bad state: No element
This error happen when this package tried to read the certificate details,
please report it by pasting all this output (after deleting sensitive info) to:
https://github.com/YehudaKremer/msix/issues
#0 ListMixin.lastWhere (dart:collection/list.dart:180:5)
#1 SignTool.getCertificatePublisher (package:msix/src/signTool.dart:47:12)
#2 SignTool.getCertificatePublisher (package:msix/src/signTool.dart:54:22)
#3 Msix.createMsix (package:msix/msix.dart:44:7)
pub finished with exit code -1
📜 Pubspec.yaml
name: meyn_lbh_simulation
description: Meyn live bird handling simulation
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
collection: ^1.15.0
dev_dependencies:
flutter_test:
sdk: flutter
msix: ^2.8.8
windows installer (msix):
* see: https://pub.dev/packages/msix
* Add msxi config section in pubspec.yaml
* from command line: flutter build windows
* from command line (run as admin): flutter pub run msix:create
* output: build\windows\runner\Release\meyn_lbh_simulation.msix
create certificate file (once)
* download app: https://sourceforge.net/projects/xca/postdownload
* create certificate
* Export as PKCS#12
* Store in project folder root with pkf extension, e.g.: meyn_lbh_simulation.pfx
For information on the generic Dart part of this file, see the
following page: https://dart.dev/tools/pub/pubspec
The following section is specific to Flutter.
flutter:
uses-material-design: true
msix_config:
certificate_path: C:\Users\nilsth\AndroidStudioProjects\meyn_lbh_simulation\meyn_lbh_simulation.p12
certificate_password: secret
We ask that you include your pubspec.yaml file as a common problem we have seen has been the pubspec.yaml file being incorrect
The text was updated successfully, but these errors were encountered: