Skip to content
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

Axios Let's Encrypt Bug #4162

Closed
pokecheater opened this issue Oct 8, 2021 · 11 comments
Closed

Axios Let's Encrypt Bug #4162

pokecheater opened this issue Oct 8, 2021 · 11 comments

Comments

@pokecheater
Copy link

Describe the bug

Hello Axios-Team,

we are facing a strange error where we always get SSL_CERT_EXPIRED when we try to make a axios call from nodejs. This was working like a charm a week ago... As far as we found out we had to renew the Let's Encrypt Certificate with a new trusted authority root certificate but the problems still persists. Do you have any ideas how to deal with that?

Greetz and thx in advance :-)

Make a call against a let's encrypt ssl web page.

const {data: {uuid}} = await simpleCallAPI("GET", "auth/uuid", null, false);
const cookies = await session.defaultSession.cookies.get({url: authHost});
const refreshOptions = {
method: 'POST',
url: ${authHost}${refreshPath},
headers: {
"Cookie": "sid="+cookies[0].value,
"x-api-key": apikey
},
data: {
"uuid": uuid
}
};

try {
    const response = await axios(refreshOptions);
    accessToken = response.data.token;
    await simpleCallAPI("POST", "auth/token", { token: accessToken }, false);
} catch (error) {
    console.error(error);
    throw error;
}  

Expected behavior

Should run like a charm

Environment

  • Axios Version [e.g. 0.21.4]
  • Adapter [e.g. XHR/HTTPS]
  • Browser [e.g. Electron]
  • Browser Version [e.g. 12]
  • Node.js Version [e.g. 12.18.3]
  • OS: [WIN 10, PopOS 20.04]

Additional context/Screenshots

None

@dentarg
Copy link

dentarg commented Oct 8, 2021

You probably need to update Node.js? See nodejs/node#40352, nodejs/node#40282

@wojgie
Copy link

wojgie commented Nov 24, 2021

@dentarg same problem with nodejs-17.1.0-2

@jasonsaayman
Copy link
Member

Please look at https://runkit.com/embed/z7m43rn3qw5a it seems to be working for getting the lets encrypt site itself? Can you please check the SSL version on the machine running the request?

@wojgie
Copy link

wojgie commented Nov 25, 2021

Please look at https://runkit.com/embed/z7m43rn3qw5a it seems to be working for getting the lets encrypt site itself? Can you please check the SSL version on the machine running the request?

i did copy it 1 TO 1 and it does not work

@wojgie
Copy link

wojgie commented Nov 25, 2021

also there is same EXACT problem with "got" https requesting.

@jasonsaayman
Copy link
Member

I think you need to check the SSL version on the machine you are running the code on, which platform is the code being run on Mac, Linux or PC?

@wojgie
Copy link

wojgie commented Nov 26, 2021

@jasonsaayman OpenSSL 1.1.1

@jasonsaayman
Copy link
Member

Please check that you have the ISRG Root X1 in your trust store, there are a couple explanations on how to do this online but since I do not know the OS you are using I cannot link one here.

@jasonsaayman
Copy link
Member

Hi 👋

Please could you retry with the latest pre-release version and open a new issue should this error still be relevant?

Thanks

@wojgie
Copy link

wojgie commented Jun 23, 2022

Hi!

it works now, thanks! i totally forgot about this issue!

@jasonsaayman
Copy link
Member

Awesome 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants