Unable to run yarn clasp login
I am not good at English.
Please understand.
8> yarn clasp login
yarn run v1.22.22
$ C:UsersmynameDesktop個人開発プロジェクトclasp-240418node_modules.binclasp login
Error retrieving access token: FetchError: request to https://oauth2.googleapis.com/token failed, reason: unable to verify the first certificate
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
**I thought node.js does not recognize self certificates such as SSL/TLS communication. So I used openssl to generate the key. I made node.js recognize it as an environment variable, but it didn’t solve the problem. In addition, I have installed an anti-virus software "ESET", which may be the reason.
**
・Yarn is 1.2 series or higher
・node v20.11.1
Could someone please answer this question?
2
Answers
TLDR; We encountered network issues related to ESET antivirus mistakenly blocking certain IP addresses used by popular npm registries. By excluding these IPs in the ESET ENDPOINT SECURITY settings, the problem was resolved.
Since April 19, 2024, we’ve been experiencing connectivity issues on our network, which we traced back to our antivirus software, ESET. The problem was specifically with the domain name resolutions for registry.yarnpkg.com and registry.npmjs.com, which seemed to point to the same servers.
To resolve this, we compiled a list of IP addresses to exclude from ESET’s integrated protection. Here is the list of IPs:
You can add these IPs to the exclusion list in ESET ENDPOINT SECURITY by navigating to:
Advanced Configuration > Web Access Protection > IP Address Exclusions
In the exclusion window, use the multiple entry tool to add each IP on a new line.
I believe this should solve your problem, although it’s concerning that this issue occurred in the first place. There seems to be a misinterpretation of these addresses by the software. I’ll update this post if we observe any more relevant changes.
Please let me know if this solution works for you, or if you have any further issues.
It’s the last ESET update :
https://forum.eset.com/topic/40702-eset-ssl-protection-produces-an-invalid-certificate-chain-for-nodejs-apps/
You can fix it temporarily, but ESET should fix it permanently. So whatever you do, you should undo it later.
How I solved the problem for now:
There are other ways to fix it (waiting for ESET official update):