# Cannot Login - 🌳🌳🌳 Authorization error: Forest server request error: certificate has expired

**URL:** <https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394>\
**Category:** Help me!\
**Created:** [October 1, 2021, 9:48am UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394 "2021-10-01T09:48:45Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmcb](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/kmcb/32/3215_2.png) [@kmcb](https://community.forestadmin.com/u/kmcb)\
**Post date:** [October 1, 2021, 9:48am UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/1 "2021-10-01T09:48:46Z")

</div>

Hi, following my message in the “Cannot login” thread, i create a new topic as requested  
I already tried the curl request given in the other thread

## Actual behavior

We cannot login on the dashboard since yesterday. No changes were made on our side in the past months. Here is the message :

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/8/89973aeeb110c2a5a36b441c2016eb5e775f66f5.png)

## Failure Logs

Not sur if this is related but i see this log on our server :

```javascript
TypeError: Cannot read property 'status' of undefined
    at /home/user/ma-domiciliation-forestadmin/node_modules/forest-express/dist/services/forest-server-requester.js:25:18
    at Request.callback (/home/user/ma-domiciliation-forestadmin/node_modules/superagent/lib/node/index.js:704:3)
    at ClientRequest.<anonymous> (/home/user/ma-domiciliation-forestadmin/node_modules/superagent/lib/node/index.js:637:10)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at TLSSocket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)

```

## Context

Please provide any relevant information about your setup.

- forest-express-sequelize version : 4.0.2  
(i know we should upgrade someday and i hope it’s not related to this, but the breaking changes on the Smart Actions will require a lot of work on our side and our customer can’t afford it right now)
- Express Version: 4.16.4
- Sequelize Version: 4.42.0
- Database Dialect: postgres
- Project Name: ma-domiciliation

Thanks in advance

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [October 1, 2021, 10:01am UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/2 "2021-10-01T10:01:21Z")

</div>

Hello @kmcb,

Thanks for sharing your problem with us, with all the details you provided 👍

Can you confirm that you are using `forest-express-sequelize` version `4`? If it is the case, your problem is not related to the thread “Cannot login”, which impacted only recent versions 7 and above.

I’ll investigate on my side about the specific line that is causing this issue and let you know if I find anything.

---

<div class="post-metadata">

**Author:** ![kmcb](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/kmcb/32/3215_2.png) [@kmcb](https://community.forestadmin.com/u/kmcb)\
**Post date:** [October 1, 2021, 10:07am UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/3 "2021-10-01T10:07:51Z")

</div>

Ok thanks a lot, yes i confirm that we use `forest-express-sequelize` version `4`

I thought it was related to the other topic because it happened at the same time

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [October 1, 2021, 10:09am UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/4 "2021-10-01T10:09:39Z")

</div>

Looking at the code, your agent is getting an error when contacting the api from forest, but there is a problem with the code that handles errors.

This has been [fixed with version 5.0.1](https://github.com/ForestAdmin/forest-express/blob/v5.1.0/src/services/forest-server-requester.js#L24)

Do you have the possibility to upgrade to 5.0.1, just to have more details about this error?

---

<div class="post-metadata">

**Author:** ![kmcb](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/kmcb/32/3215_2.png) [@kmcb](https://community.forestadmin.com/u/kmcb)\
**Post date:** [October 1, 2021, 10:39am UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/5 "2021-10-01T10:39:41Z")

</div>

I just upgraded to 5.1  
Now i get the error “your password is incorrect, please try again”, even after a password reset.  
And i see this error in the server logs :

```javascript
An error occured while retrieving your IP whitelist. Your Forest envSecret seems to be missing or unknown. Can you check that you properly set your Forest envSecret in the Forest initializer?

```

The FOREST\_ENV\_SECRET is still defined in the env, i didn’t see any change about this in the “migrate to v5” guide, is there something we need to do ?

edit : in our code it’s set like this :

```javascript
app.use(
  Liana.init({
    modelsDir: __dirname + "/models",
    envSecret: process.env.FOREST_ENV_SECRET,
    authSecret: process.env.FOREST_AUTH_SECRET,
    sequelize: require("./models").sequelize
  })
)

```

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [October 1, 2021, 11:32am UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/6 "2021-10-01T11:32:31Z")

</div>

Do you have any log entry before the one you pasted?

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [October 1, 2021, 12:47pm UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/7 "2021-10-01T12:47:43Z")

</div>

I’m just thinking about it, do you have a way to run a curl on [https://api.forestadmin.com](https://api.forestadmin.com) from the server that is having the issue?  
I would like to know if you have an error regarding the certificate of this endpoint.

---

<div class="post-metadata">

**Author:** ![kmcb](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/kmcb/32/3215_2.png) [@kmcb](https://community.forestadmin.com/u/kmcb)\
**Post date:** [October 1, 2021, 12:49pm UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/8 "2021-10-01T12:49:29Z")

</div>

No, it’s the only line i see in the logs  
I tried to upgrade liana to v6.4 and i’m back to the first message : “Your admin backend is unreachable. Please check that it is running and respond to [https://admin.ma-domiciliation.fr](https://admin.ma-domiciliation.fr).”

I just tried a simple “curl [https://api.forestadmin.com](https://api.forestadmin.com)” from the server and i get this response :

```javascript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /</pre>
</body>
</html>

```

---

<div class="post-metadata">

**Author:** ![kmcb](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/kmcb/32/3215_2.png) [@kmcb](https://community.forestadmin.com/u/kmcb)\
**Post date:** [October 1, 2021, 1:00pm UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/9 "2021-10-01T13:00:57Z")

</div>

after a few more changes - i’m still on liana 6.4 -, i now have this error in the logs when login :

```javascript
OPTIONS /forest/sessions 200 6.997 ms - 2
[forest] 🌳🌳🌳 Authorization error: Forest server request error: certificate has expired
VError: Forest server request error: certificate has expired
    at /home/user/ma-domiciliation-forestadmin/node_modules/forest-express/dist/services/forest-server-requester.js:46:23
    at Request.callback (/home/user/ma-domiciliation-forestadmin/node_modules/forest-express/node_modules/superagent/lib/node/index.js:893:3)
    at ClientRequest.<anonymous> (/home/user/ma-domiciliation-forestadmin/node_modules/forest-express/node_modules/superagent/lib/node/index.js:810:12)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at TLSSocket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)
POST /forest/sessions 401 231.367 ms - -

```

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [October 1, 2021, 1:50pm UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/10 "2021-10-01T13:50:08Z")

</div>

Hello, @kmcb,

Someone else is having the same issue, and it seems to come from the version of the OS.

Let’s encrypt’s root certificate expired yesterday, and it is using now a new root certificate. Old versions of OSs only embed the old version of this root certificate, and then consider that the new certificate for `https://api.forestadmin.com` has expired.

Another client managed to get your initial problem fixed by upgrading the docker image it was using.

Are you in a situation where you can upgrade the context on which it is running?

I think you can rollback all other changes made before.

---

<div class="post-metadata">

**Author:** ![kmcb](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/kmcb/32/3215_2.png) [@kmcb](https://community.forestadmin.com/u/kmcb)\
**Post date:** [October 1, 2021, 2:38pm UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/11 "2021-10-01T14:38:14Z")

</div>

Hello again Guillaume,  
We just updated the server’s OS but we still have the same error.  
And i have the same error on my localhost with a different (and also up-to-date) OS.

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [October 1, 2021, 2:39pm UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/12 "2021-10-01T14:39:58Z")

</div>

Which version of node are you using?

---

<div class="post-metadata">

**Author:** ![kmcb](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/kmcb/32/3215_2.png) [@kmcb](https://community.forestadmin.com/u/kmcb)\
**Post date:** [October 1, 2021, 3:07pm UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/13 "2021-10-01T15:07:00Z")

</div>

This project was on Node 8. I just tested with Node 10 but still the same error

---

<div class="post-metadata">

**Author:** ![kmcb](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/kmcb/32/3215_2.png) [@kmcb](https://community.forestadmin.com/u/kmcb)\
**Post date:** [October 1, 2021, 5:07pm UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/14 "2021-10-01T17:07:06Z")

</div>

It turns out that when using node 10’s latest version the problem seems to be solved 🎉

However i have one last question : Despite upgrading to Liana v6, i get a message when starting my server saying that our current version “is DEPRECATED and will soon be BLOCKED”.  
Do you know the approximative date for this ?  
While debugging the login problem, i tried to upgrade to Liana v7, i spent quite some time having problems one after another, and i finally gave up on this one because the suggestions didn’t work for me : [Unexpected error: connect ECONNREFUSED 127.0.0.1:443 - #10 by schalkwijk](https://community.forestadmin.com/t/unexpected-error-connect-econnrefused-127-0-0-1-443/2507/10)

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [October 5, 2021, 6:55am UTC](https://community.forestadmin.com/t/cannot-login-authorization-error-forest-server-request-error-certificate-has-expired/3394/15 "2021-10-05T06:55:06Z")

</div>

Hello,

The blocking will be done by the browsers, that won’t support connecting to localhost from an unsecure web application.

This will prevent you to use your development environments. Chrome was supposed to release this new rule this summer.

You can open a new thread and we will help you upgrading to the v7.
