package_control
package_control copied to clipboard
Error when trying to run "Install Packages"
I have installed ST3 v3143 on macOS Sierra through the .dmg installer and I installed the package manager. I can list installed packages and it shows Package Control v3.3.0, but when I try to run the install Install Package I get the error shown below.
Package Control: Exported certificate: Common Name: KISA RootCA 1, Organizational Unit: Korea Certification Authority Central, Organization: KISA, Country: KR
Package Control: Exported certificate: Common Name: SwissSign Gold Root CA - G3, Organization: SwissSign AG, Country: CH
Package Control: Exported certificate: Common Name: DigiCert High Assurance EV Root CA, Organizational Unit: www.digicert.com, Organization: DigiCert Inc, Country: US
Package Control: Exported certificate: Common Name: SwissSign Platinum Root CA - G3, Organization: SwissSign AG, Country: CH
Package Control: Exported certificate: Common Name: Certum Trusted Network CA 2, Organizational Unit: Certum Certification Authority, Organization: Unizeto Technologies S.A., Country: PL
Package Control: Exported certificate: Organizational Unit: Trustis FPS Root CA, Organization: Trustis Limited, Country: GB
Package Control: Exported certificate: Common Name: UTN-USERFirst-Network Applications, Organizational Unit: http://www.usertrust.com, Organization: The USERTRUST Network, Locality: Salt Lake City, State/Province: UT, Country: US
Package Control: Exported certificate: Common Name: Certigna, Organization: Dhimyotis, Country: FR
Package Control: Exported certificate: Common Name: E-Tugra Certification Authority, Organizational Unit: E-Tugra Sertifikasyon Merkezi, Organization: E-Tuğra EBG Bilişim Teknolojileri ve Hizmetleri A.Ş., Locality: Ankara, Country: TR
Package Control: Exported certificate: Common Name: Deutsche Telekom Root CA 2, Organizational Unit: T-TeleSec Trust Center, Organization: Deutsche Telekom AG, Country: DE
Package Control: Exported certificate: Common Name: Admin-Root-CA; Organizational Unit: Certification Authorities, Services; Organization: admin; Country: ch
Package Control: Exported certificate: Organization: Government Root Certification Authority, Country: TW
Package Control: Exported certificate: Common Name: DST Root CA X3, Organization: Digital Signature Trust Co.
Package Control: Exported certificate: Common Name: VeriSign Class 1 Public Primary Certification Authority - G3; Organizational Unit: (c) 1999 VeriSign, Inc. - For authorized use only, VeriSign Trust Network; Organization: VeriSign, Inc.; Country: US
Package Control: Exported certificate: Common Name: Chambers of Commerce Root, Organizational Unit: http://www.chambersign.org, Organization: AC Camerfirma SA CIF A82743287, Country: EU
Package Control: Exported certificate: Email Address: [email protected], Common Name: EE Certification Centre Root CA, Organization: AS Sertifitseerimiskeskus, Country: EE
Package Control: Exported certificate: Common Name: TWCA Global Root CA, Organizational Unit: Root CA, Organization: TAIWAN-CA, Country: TW
Package Control: Exported certificate: Common Name: AddTrust External CA Root, Organizational Unit: AddTrust External TTP Network, Organization: AddTrust AB, Country: SE
Package Control: Exported certificate: Common Name: SwissSign Gold CA - G2, Organization: SwissSign AG, Country: CH
Package Control: Exported certificate: Organizational Unit: RSA Security 2048 V3, Organization: RSA Security Inc
Package Control: Exported certificate: Common Name: SZAFIR ROOT CA, Organization: Krajowa Izba Rozliczeniowa S.A., Country: PL
Package Control: Exported certificate: Common Name: WellsSecure Public Root Certificate Authority, Organizational Unit: Wells Fargo Bank NA, Organization: Wells Fargo WellsSecure, Country: US
Package Control: Exported certificate: Common Name: AAA Certificate Services, Organization: Comodo CA Limited, Locality: Salford, State/Province: Greater Manchester, Country: GB
Package Control: Exported certificate: Common Name: DigiCert Global Root G2, Organizational Unit: www.digicert.com, Organization: DigiCert Inc, Country: US
Package Control: Exported certificate: Common Name: TWCA Root Certification Authority, Organizational Unit: Root CA, Organization: TAIWAN-CA, Country: TW
Package Control: Exported certificate: Common Name: GeoTrust Primary Certification Authority - G3, Organizational Unit: (c) 2008 GeoTrust Inc. - For authorized use only, Organization: GeoTrust Inc., Country: US
Package Control: Exported certificate: Common Name: Class 2 Primary CA, Organization: Certplus, Country: FR
Package Control: Exported certificate: Common Name: UTN - DATACorp SGC, Organizational Unit: http://www.usertrust.com, Organization: The USERTRUST Network, Locality: Salt Lake City, State/Province: UT, Country: US
Package Control: Exported certificate: Common Name: QuoVadis Root CA 3 G3, Organization: QuoVadis Limited, Country: BM
Package Control: Exported certificate: Common Name: Izenpe.com, Organization: IZENPE S.A., Country: ES
Package Control: Exported certificate: Common Name: Staat der Nederlanden EV Root CA, Organization: Staat der Nederlanden, Country: NL
Package Control: Exported certificate: Organizational Unit: Go Daddy Class 2 Certification Authority; Organization: The Go Daddy Group, Inc.; Country: US
Package Control: Exported certificate: Common Name: Apple Root CA, Organizational Unit: Apple Certification Authority, Organization: Apple Inc., Country: US
Package Control: Exported certificate: Common Name: Swisscom Root EV CA 2, Organizational Unit: Digital Certificate Services, Organization: Swisscom, Country: ch
Package Control: Exported certificate: Common Name: Common Policy, Organizational Unit: FBCA, Organization: U.S. Government, Country: us
Package Control: Exported certificate: Common Name: GlobalSign, Organization: GlobalSign, Organizational Unit: GlobalSign ECC Root CA - R4
Package Control: Exported certificate: Common Name: Cisco Root CA 2048, Organization: Cisco Systems
Package Control: Exported certificate: Organizational Unit: Security Communication RootCA1, Organization: SECOM Trust.net, Country: JP
Package Control: Exported certificate: Common Name: DST ACES CA X6, Organizational Unit: DST ACES, Organization: Digital Signature Trust, Country: US
Package Control: Exported certificate: Common Name: AffirmTrust Commercial, Organization: AffirmTrust, Country: US
Package Control: Exported certificate: Common Name: Network Solutions Certificate Authority, Organization: Network Solutions L.L.C., Country: US
Exception in thread Thread-10:
Traceback (most recent call last):
File "./python3.3/threading.py", line 901, in _bootstrap_inner
File "package_control.commands.install_package_command in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 45, in run
File "package_control.package_installer in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 58, in make_package_list
File "package_control.package_manager in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 694, in list_available_packages
File "package_control.package_manager in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 554, in _list_available
File "package_control.package_manager in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 453, in list_repositories
File "package_control.providers.channel_provider in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 201, in get_repositories
File "package_control.providers.channel_provider in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 87, in fetch
File "package_control.download_manager in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 340, in fetch
File "package_control.downloaders.urllib_downloader in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 117, in download
File "package_control.downloaders.urllib_downloader in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 317, in setup_opener
File "package_control.ca_certs in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 31, in get_ca_bundle_path
File "package_control.ca_certs in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 166, in get_system_ca_bundle_path
File "package_control.deps.oscrypto.trust_list in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 122, in get_path
File "package_control.deps.oscrypto._osx.trust_list in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 153, in extract_from_system
File "package_control.deps.oscrypto._osx.trust_list in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 177, in _cert_callback
File "package_control.ca_certs in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 108, in print_cert_subject
File "package_control.deps.asn1crypto.x509 in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 1042, in human_friendly
File "package_control.deps.asn1crypto.x509 in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 1071, in _recursive_humanize
File "package_control.deps.asn1crypto.core in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 1100, in native
File "package_control.deps.asn1crypto.core in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 1702, in native
File "package_control.deps.asn1crypto.core in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 1672, in __unicode__
File "package_control.deps.asn1crypto._teletex_codec in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 20, in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x23 in position 32: character maps to \<undefined\>
Thanks @wbond for the quick response to this! Getting all the packages I need for my workflow is very important to my evaluation of this build of ST3, so I appreciate it.
Thanks @wbond, I really appreciate the quick response, I am also currently evaluating the switch to ST3 for my team (from atom) and it is so much faster, so I can't wait to have all the packages I need!
Relevant issue: https://github.com/wbond/asn1crypto/issues/60
Does the closed issue in asn1crypto (#60) bring a fix for the OSX version too? Sorry if the answer is obvious, crypto is definitely not my field of expertise.
I'm trying to install a package on to SB2 V2.0.2, build 2221 and am getting the same error as mentioned here. I also can list installed packages and am running Sierra v10.12.6
My other Mac running v10.12.6 and then same version of SB2 is NOT experiencing the problem!
Like @xvaier I'm not sure how to take advantage of the fix implied in https://github.com/wbond/asn1crypto/issues/60 - or do we just need to wait for the fix to be accepted and available? @wbond
The issues has been worked around in asn1crypto, but I still need to cut a release of that. Then upgrade the vendored version in Package Control. Once that is done, I will create a prerelease of PC that you may install to see if it fixes the issue for you.
The root cause of the issue is that there exists in your system CA root list a certificate that is using a Teletex string to store information about it, however that string isn't really a true Teletex string, but rather a string encoded using a different encoding. Unfortunately OpenSSL has a long habit of doing that, however almost all modern certificates use a UTF-8 string instead (because the CA browser forum, the organization that dictates how browsers and CAs deal with certificates, requires that new certs use UTF-8) so most users won't ever run into this issue.
My hope is to have the prerelease out within the next 24 hours or so, but it depends on how much free time I have.
I found the where the issue was on my end, I had generated a certificate to remove the chrome SSL warning on localhost at some point and PC apparently didn't like that. Deleting the certificate fixed the issue, thanks @wbond.
What is the trick to figuring out which certificate is causing the issue or do I just wait for the fix? Reinstalling Package Control had no effect.
not sure what the fix is here either tbh, i've been struggling for a while now.
Reinstalling Package Control won't help.
You may be able to figure out what the cert is by looking at the last exported cert in your debug log and finding it in the System Roots section of the Keychain Access app. It may be that the next one in the list is the cert causing issues.
However, looking at the list in the original post, it seems they aren't alphabetical and Keychain Access seems to sort them alphabetically.
The list in the console is alphabetical. If I follow manual installation methods like using git the in packages directory, will that break Package Control in the future?
I just checked - I'm seeing 110 lines of Package Control: Exported certificate:
before the exception (not sorted alphabetically), and my Keychain Access reports 168 items sorted alphabetically.
Ugg that's 57 candidates.
I have only one expired certificate in my System Roots - TÜBİTAK UEKAE Kök Sertifika Hizmet Sağlayıcısı - Sürüm 3
it expired 21 Aug 2017 - its on the trusted list of certs https://support.apple.com/en-us/HT205204
Could it be causing my issues - it gave me an error when I tried to delete it
An error occurred while deleting "TÜBİTAK UEKAE Kök Sertifika Hizmet Sağlayıcısı - Sürüm 3
Unix[Operation not permitted]
An expired cert won't be the issue. It will be a cert that has a name that uses a character that is part of the encoding https://en.wikipedia.org/wiki/ISO/IEC_8859-1 but not part of https://en.wikipedia.org/wiki/ITU_T.61.
OpenSSL puts ISO-8859-1 in a place there only ITU T.61 should be used, and asn1crypto currently parses things according to the spec. The new version of asn1crypto is going to follow OpenSSL since most libraries now acquiesce to the non-standard behavior.
@wbond is there an ETA on the fix?
@ralph-carlisle Unfortunately not as I have to fit open source work in around the rest of my life. This morning I went to put out a new asn1crypto release, but the root .io name servers were causing issues, so the test suites wouldn't run on the various CI providers. Maybe later tonight or tomorrow morning I'll have some more time.
@wbond I looked at the two encoding links you sent and also compared the list of certs installed on my two macs - the one that shows the issue and the one that doesn't.
There are a couple of certs with characters that appear to be in one encoding and not the other eg:
TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı
the Ü (220)
or NetLock Arany (Class Gold) Főtanúsítvány
the ő maybe (252)
The thing that seems really weird to me is my two computers have the exact same list of 168 current certs. Could there be different versions of certs? Is there a delete and reinstall procedure we could follow to try and get the correctly encoded version of the certs installed on our machines?
I figured I would take a look for old/misc certs outside the normal Root CA list provided by Apple.
In my case there were a bunch of openvpn.net CA certs under Keychain Access > System. I am guessing the openvpn client installs these (awesome). Deleting them caused the issue to go away for me.
I have confirmed that it is this silly openVPN cert that somehow got installed, but here is how to check:
(make sure oscrypto
is installed)
import oscrypto.trust_list
import pdb
try:
def print_cert_subject(cert, reason):
print(cert.subject.human_friendly)
oscrypto.trust_list.get_path(cache_length=0, cert_callback=print_cert_subject)
except Exception as e:
pdb.post_mortem()
then when you are in the debugger, type
input_.tobytes()
and it should print out the certificate that it failed on
(Pdb) input_.tobytes()
b'http://openvpn.net/localca.html #1433234179'
it fails because of the #
character:
(Pdb) 0x23
35
(Pdb) ord('#')
35
and if you go to https://en.wikipedia.org/wiki/ITU_T.61 , you'll see that 35 is listed as 'undefined'.
I had a similar OpenVPN cert to that of mgrandi, and removing it solved the issue for me as well. Cheers!
@wbond, it looks like the new version of asn1crypto
was put out a couple weeks ago, which should have the fix for this issue, right? Would be great if package_control
could be updated to use it so this issue is resolved, it's probably impacting quite a few people since openvpn
is fairly common.
@dsanders11 I agree. Unfortunately I don't really have much free time ATM. Perhaps someone can send a PR that I can check over?
@wbond, created #1277, but without build instructions or an automated build on this repo I'm really just stabbing in the dark and can't test that it fixes anything.
Assuming asn1crypto
0.23.0 is a drop-in change and nothing needs to be done to take advantage of the relaxed parsing rules, then it should just be a matter of bumping package_control
to 3.3.1 after that PR and releasing it.
@mgrandi thanks wasn't clear on how to test but I found an OpenVPN cert, removed it and that did the trick. Happy days!
#1277 fixed issue with certificates for me
@mattpr I found something similar on my system - thanks for pointing me to looking there. I'm able to get package control to work now. :)
@mattpr that solved the problem for me too. thanks!
@mgrandi your answer pointed me to the openVPN cert that was causing my issue just like everyone else - thank you so much.
I also have this problem, and @mgrandi's script pointed me to an openvpn cert. What does that cert do? Seems destructive to just delete it.
I don't know where this cert comes from, you can back it up before removing it if you are scared you might need it
And you can remove it by searching for "openvpn.net" and deleting the cert from keychain manager.app, and then trying package control again.