Skip to main content
Question

Unable to configure BOX CLI with OAuth 2.0 Error: self signed certificate in certificate chain

  • May 22, 2025
  • 2 replies
  • 197 views

Forum|alt.badge.img

Hi Everyone,

I was following the guide provided in (https://developer.box.com/guides/tooling/cli/quick-start/)

and after configuring box app and running the login command, I introduced the client ID client secret of my application, I get redurected to the URL where I can grant access and somehow I get the following message :

"(node:18936) UnhandledPromiseRejectionWarning: BoxCLIError: Error: self signed certificate in certificate chain
    at C:\Program Files\@boxcli\client\src\commands\login.js:122:11
(Use `node --trace-warnings ...` to show where the warning was created)
(node:18936) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:18936) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code."

could you help?

 

thanks in advance

2 replies

Forum|alt.badge.img

Any resolution to this? I got this same error this morning when trying to authenticate.


Forum|alt.badge.img

In my environment, a company SSL certificate must be installed on each workstation, in the Trusted Root Store, to access the internet. As a result, I received this error. To fix this problem

  1. Convert company SSL certificate to base64, name cannot contain spaces
  2. Set environment variable: NODE_EXTRA_CA_CERTS=c:\temp\nameofcert.pem
  3. Don't use quotes in the value of the variable, I placed the cert in the temp directory as it was easy and there are not any spaces.