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
ASN1 tag error when downloading components (IDFGH-8120) #9618
Comments
Could you please try running the following to check if urllib is working correctly in this Python installation?
Should print |
I guess the above should be
|
In that case I'm afraid this particular Python installation is not functioning correctly, as it fails while loading the certificates from the certificate store. You can try to fix this by installing another copy of Python or trying to repair that one. Alternatively, please consider installing IDF using the installer: https://docs.espressif.com/projects/esp-idf/en/v4.4.2/esp32/get-started/windows-setup.html#esp-idf-tools-installer. Among other things, it comes with an "embedded" Python interpreter which significantly reduces the likelihood of installation failure due to an issue with the existing installation. |
@igrr that was my initial go to to update to IDF 4.4.2! Thing is: the same error is happening. That's what prompted me to install Python... Please look at the last part of the install log from running
|
@georgik PTAL at the installer log above, have you seen something like this before? Seems that the error happens for every Python installed on this system: both in the %USERPROFILE%\AppData\Local\Programs\Python\Python37 and in %USERPROFILE%.espressif\tools\idf-python\3.8.7\python.exe. Looks like |
@igrr This looks very similar to what users were recently reporting for macOS esp-rs/rust-build#136 @josesimoes Please, use Offline installer as an alternative to deploy whole toolchain https://github.com/espressif/idf-installer#espressif-ide-offline-installer |
Looking at the cert from dl.espressif.com it seems that it was issued last month: 2022-07-20. Following the certificate chain seems that it's using a DigiCert Root CA, which is on the trust list for Windows. @georgik I'll give it a try with the offline installer, thanks. |
I don't think there was any recent change. The certificate was renewed, but it has the same root as previously. And looking at the code (Python37\lib\http\client.py), the failure happens in |
Follow up on this: using the offline installer I was able to get the toolchains installed. At some point the installer stopped with an error which I haven't take note of (sorry). Now after that I went to the install.bat and then I could see the toolchains being checked and it kept going. To my surprise it managed to install all the other stuff from dl.espressif.com. Worth noting: I had uninstall the Python installation from my machine and I did one last try to use the install script before going with the offline installer. So... not sure what's going on with this... |
Just tried to use install.ps1 (and install.bat) from v4.4.3 and I'm sorry to report that the issue remains...
I can't see the "help message" that I guess it was supposed to show when running on Windows... |
@josesimoes Because the issue is in your system and ESP-IDF cannot fix it. The best solution we could offer is to use the offline installer. |
@dobairoland I did look for an offline installer for 4.4.3 and couldn't find one... can you please advise? |
v4.4.3 was released just 2 hours ago. The installer will be available soon. |
Not happy with the outcome I've made some investigations and local testing. Definitive fix in PR #10147. |
The issue is related to some countries (usually in European union, but there are also other countries) as an additional prevention against attacks implemented in Python code, and is related to government certificates stored on the Windows Possible solutions: Removing government certificates, or installing whole ESP-IDF in virtual machine on blank Windows platform, or Offline installation. The following ERROR is generated by using provided online installer, here is a setup.log: |
Answers checklist.
IDF version.
v4.4.2
Operating System used.
Windows
How did you build your project?
Command line with CMake
If you are using Windows, please specify command line type.
PowerShell
What is the expected behavior?
Being able to use install scripts
What is the actual behavior?
Error in download step
Steps to reproduce.
run install.bat or install.ps1
Build or installation Logs.
More Information.
The above error is in Portuguese "ASN1 valor de tag inválido encontrado" in English that should something close to " ASN1 bad tag value met"
The text was updated successfully, but these errors were encountered: