skip to Main Content

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


  1. 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:

    104.16.24.34
    104.16.28.34
    104.16.26.34
    104.16.1.35
    104.16.25.34
    104.16.31.34
    104.16.3.35
    104.16.30.34
    104.16.2.35
    104.16.27.34
    104.16.29.34
    104.16.0.35
    

    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.

    Login or Signup to reply.
  2. 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:

    1. Go to Network Setting / Advanced Settings (this might differ based on language and configuration)
    2. SSL/TLS
    3. Edit on Application Scan Rules
    4. Add Node (node.exe) as an exception. Select "ignore"

    There are other ways to fix it (waiting for ESET official update):

    • Setup > Web access protection > Disable HTTPS traffic scanning
    • Download the new update (1475), which should fix the issue (needs the pre-release update enabled in settings)
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search