# Unable to register the client error after upgrade v7

**URL:** <https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633>\
**Category:** Help me!\
**Created:** [December 2, 2022, 12:45pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633 "2022-12-02T12:45:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blockchain\_Game\_dev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/blockchain_game_dev/32/5451_2.png) [@Blockchain\_Game\_dev](https://community.forestadmin.com/u/Blockchain_Game_dev)\
**Post date:** [December 2, 2022, 12:45pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/1 "2022-12-02T12:45:45Z")

</div>

## Feature(s) impacted

after I try to upgrade my project to v7 I am getting this error.

## Observed behavior

## Unable to authenticate you

We can’t reach your server. Please check that your admin backend is correctly configured and running.

## Expected behavior

Working as expected without any error.

## Failure Logs

```javascript
[forest] 🌳🌳🌳 Unable to register the client
{
  "configuration": {
    "authorization_endpoint": "https://api.forestadmin.com/oidc/auth",
    "device_authorization_endpoint": "https://api.forestadmin.com/oidc/device/auth",
    "claims_parameter_supported": false,
    "claims_supported": [
      "sub",
      "email",
      "sid",
      "auth_time",
      "iss"
    ],
    "code_challenge_methods_supported": [
      "S256"
    ],
    "end_session_endpoint": "https://api.forestadmin.com/oidc/session/end",
    "grant_types_supported": [
      "authorization_code",
      "urn:ietf:params:oauth:grant-type:device_code"
    ],
    "id_token_signing_alg_values_supported": [
      "HS256",
      "RS256"
    ],
    "issuer": "https://api.forestadmin.com",
    "jwks_uri": "https://api.forestadmin.com/oidc/jwks",
    "registration_endpoint": "https://api.forestadmin.com/oidc/reg",
    "response_modes_supported": [
      "query"
    ],
    "response_types_supported": [
      "code",
      "none"
    ],
    "scopes_supported": [
      "openid",
      "email",
      "profile"
    ],
    "subject_types_supported": [
      "public"
    ],
    "token_endpoint_auth_methods_supported": [
      "none"
    ],
    "token_endpoint_auth_signing_alg_values_supported": [],
    "token_endpoint": "https://api.forestadmin.com/oidc/token",
    "request_object_signing_alg_values_supported": [
      "HS256",
      "RS256"
    ],
    "request_parameter_supported": false,
    "request_uri_parameter_supported": true,
    "require_request_uri_registration": true,
    "claim_types_supported": [
      "normal"
    ]
  },
  "registration": {
    "redirect_uris": [
      "http://localhost:3310/forest/authentication/callback"
    ],
    "token_endpoint_auth_method": "none"
  },
  "error": {
    "name": "RequestError",
    "code": "ECONNREFUSED",
    "timings": {
      "start": 1669984577551,
      "socket": 1669984577551,
      "lookup": 1669984577552,
      "error": 1669984577552,
      "phases": {
        "wait": 0,
        "dns": 1,
        "total": 1
      }
    }
  }
}
[forest] 🌳🌳🌳 Unexpected error: connect ECONNREFUSED 127.0.0.1:443
{
  "name": "RequestError",
  "code": "ECONNREFUSED",
  "timings": {
    "start": 1669984577551,
    "socket": 1669984577551,
    "lookup": 1669984577552,
    "error": 1669984577552,
    "phases": {
      "wait": 0,
      "dns": 1,
      "total": 1
    }
  },

```

## Context

- Project name: Sesto
- Team name: …
- Tech name: MongoDB + Nodejs
- Agent type & version: …
- Recent changes made on your end if any: version upgrade v6 to v7

---

<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:** [December 2, 2022, 1:20pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/2 "2022-12-02T13:20:00Z")

</div>

Hello @Blockchain_Game_dev,

Could you please fill in the required info at the end of the template, indicating your project’s name, technology, etc? It’ll help us helping you.

Also, can you please check if you have any of these packages in your dependencies:

- [@google/maps](https://community.forestadmin.com/t/problems-authenticating-when-upgrading-to-v7-of-liana-forest-express-mongoose/2681/9)
- [google-auth-library](https://community.forestadmin.com/t/upgrade-to-forest-express-mongoose-7-x-x-failed-due-to-openid-login-callback/2569/7)
- [signalfx-tracing](https://community.forestadmin.com/t/unable-to-register-the-client-unexpected-error-connect-econnrefused-127-0-0-1-443/2813/4)

It seems that these libraries (or at least old versions of them) are making strange things with http code, and it conflicts with our calls.

---

<div class="post-metadata">

**Author:** ![Blockchain\_Game\_dev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/blockchain_game_dev/32/5451_2.png) [@Blockchain\_Game\_dev](https://community.forestadmin.com/u/Blockchain_Game_dev)\
**Post date:** [December 2, 2022, 1:40pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/3 "2022-12-02T13:40:29Z")

</div>

Hi, i am using @google/maps but can’t I use google maps and forest admin at the same time even for testing on my local ?

---

<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:** [December 2, 2022, 1:42pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/4 "2022-12-02T13:42:13Z")

</div>

It seems that this library is deprecated in favor of ` @googlemaps/google-maps-services-js` which does not have the issue.

---

<div class="post-metadata">

**Author:** ![Blockchain\_Game\_dev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/blockchain_game_dev/32/5451_2.png) [@Blockchain\_Game\_dev](https://community.forestadmin.com/u/Blockchain_Game_dev)\
**Post date:** [December 2, 2022, 1:54pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/5 "2022-12-02T13:54:08Z")

</div>

Hi removed that library but now I am getting these in server seems like no problem but it is loading like in screenshot.  
 ![Screen Shot 2022-12-02 at 16.53.26](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/d/d0d58984f7fd5241722f764e71591f5b2d86ddfa.png)

```javascript
OPTIONS /forest/authentication 204 3.352 ms - 0
POST /forest/authentication 200 226.992 ms - 1020

```

also in network,

there is two authentication call one return 204 ( request method: options) other return 200 ( request method: origin)

---

<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:** [December 2, 2022, 2:02pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/6 "2022-12-02T14:02:30Z")

</div>

Can you share a screenshot with the different calls happening during the authentication?

Do you have any call in error? Do you have any error in the console?

Also, did you follow all the steps described in the [documentation to upgrade to V7](https://docs.forestadmin.com/documentation/how-tos/maintain/upgrade-notes-sql-mongodb/upgrade-to-v7)?

---

<div class="post-metadata">

**Author:** ![Blockchain\_Game\_dev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/blockchain_game_dev/32/5451_2.png) [@Blockchain\_Game\_dev](https://community.forestadmin.com/u/Blockchain_Game_dev)\
**Post date:** [December 2, 2022, 2:13pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/7 "2022-12-02T14:13:56Z")

</div>

I have no error in agent.

Agent logs :  
OPTIONS /forest/authentication 204 0.388 ms - 0  
POST /forest/authentication 200 2.052 ms - 1020

These are calls for authentication in network tabs.

 ![Screen Shot 2022-12-02 at 17.10.47](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/8/83f709e2edd3475d6ec6ff0ff48bfc06faa942f4.png)  
 ![Screen Shot 2022-12-02 at 17.11.41](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/9/92b5811b33f00e4a143a2336feb592ea4a51dcb8.png)

I did all the steps except Running up multiple server instances because i am testing my project on my server.

---

<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:** [December 2, 2022, 2:17pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/8 "2022-12-02T14:17:04Z")

</div>

Do you have any indication of a CORS error regarding the `POST`? It seems that it shows only provisional headers, which may indicate that there is a problem with CORS.

---

<div class="post-metadata">

**Author:** ![Blockchain\_Game\_dev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/blockchain_game_dev/32/5451_2.png) [@Blockchain\_Game\_dev](https://community.forestadmin.com/u/Blockchain_Game_dev)\
**Post date:** [December 2, 2022, 2:20pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/9 "2022-12-02T14:20:57Z")

</div>

yes, I am using cors unblock extension, otherwise I couldn’t access.

---

<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:** [December 2, 2022, 2:24pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/10 "2022-12-02T14:24:02Z")

</div>

Can you share the content of the CORS error?

---

<div class="post-metadata">

**Author:** ![Blockchain\_Game\_dev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/blockchain_game_dev/32/5451_2.png) [@Blockchain\_Game\_dev](https://community.forestadmin.com/u/Blockchain_Game_dev)\
**Post date:** [December 2, 2022, 2:24pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/11 "2022-12-02T14:24:23Z")

</div>

```javascript
Access to fetch at 'http://localhost:4040/forest' from origin 'https://app.forestadmin.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

```

---

<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:** [December 2, 2022, 2:30pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/12 "2022-12-02T14:30:39Z")

</div>

Ok, then there is a problem with the CORS configuration of your agent. Can you copy/paste the code related to CORS?

---

<div class="post-metadata">

**Author:** ![Blockchain\_Game\_dev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/blockchain_game_dev/32/5451_2.png) [@Blockchain\_Game\_dev](https://community.forestadmin.com/u/Blockchain_Game_dev)\
**Post date:** [December 2, 2022, 2:37pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/13 "2022-12-02T14:37:36Z")

</div>

```javascript
const whitelist = config.allowedOrgins.split(',');

const corsConfig ={
  credentials: true,
  allowedHeaders: ['Authorization', 'X-Requested-With', 'Content-Type'],
  origin: whitelist,
  maxAge: 86400, // NOTICE: 1 day
};

app.use('/forest/authentication', cors({
  ...corsConfig,
  origin: corsConfig.origin.concat('null')
}));
app.use(cors(corsConfig));

```

---

<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:** [December 2, 2022, 2:39pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/14 "2022-12-02T14:39:53Z")

</div>

Can you please use the same config we can find in the docs?

```javascript
let allowedOrigins = [/\.forestadmin\.com$/, /localhost:\d{4}$/];
if (process.env.CORS_ORIGINS) {
  allowedOrigins = allowedOrigins.concat(process.env.CORS_ORIGINS.split(','));
}
const corsConfig = {
  origin: allowedOrigins,
  allowedHeaders: ['Authorization', 'X-Requested-With', 'Content-Type'],
  maxAge: 86400, // NOTICE: 1 day
  credentials: true,
};

```

---

<div class="post-metadata">

**Author:** ![Blockchain\_Game\_dev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/blockchain_game_dev/32/5451_2.png) [@Blockchain\_Game\_dev](https://community.forestadmin.com/u/Blockchain_Game_dev)\
**Post date:** [December 2, 2022, 2:42pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/15 "2022-12-02T14:42:03Z")

</div>

> [@GuillaumeGautreau](#):
>
> ```javascript
> let allowedOrigins = [/\.forestadmin\.com$/, /localhost:\d{4}$/];
> if (process.env.CORS_ORIGINS) {
> allowedOrigins = allowedOrigins.concat(process.env.CORS_ORIGINS.split(','));
> }
> const corsConfig = {
> origin: allowedOrigins,
> allowedHeaders: ['Authorization', 'X-Requested-With', 'Content-Type'],
> maxAge: 86400, // NOTICE: 1 day
> credentials: true,
> };
> 
> ```

The same error is loading icon is spinning, just like cors blocked extension enabled.

---

<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:** [December 2, 2022, 2:48pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/16 "2022-12-02T14:48:36Z")

</div>

Do you have a CORS error now, and is it the same?

---

<div class="post-metadata">

**Author:** ![Blockchain\_Game\_dev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/blockchain_game_dev/32/5451_2.png) [@Blockchain\_Game\_dev](https://community.forestadmin.com/u/Blockchain_Game_dev)\
**Post date:** [December 2, 2022, 2:49pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/17 "2022-12-02T14:49:55Z")

</div>

I don’t have cors error, I only have authetication problem.

---

<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:** [December 2, 2022, 2:50pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/18 "2022-12-02T14:50:31Z")

</div>

Then can you please share a screenshot of the list of calls that are made by the frontend while trying to authenticate?

---

<div class="post-metadata">

**Author:** ![Blockchain\_Game\_dev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/blockchain_game_dev/32/5451_2.png) [@Blockchain\_Game\_dev](https://community.forestadmin.com/u/Blockchain_Game_dev)\
**Post date:** [December 2, 2022, 2:53pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/19 "2022-12-02T14:53:01Z")

</div>

![Screen Shot 2022-12-02 at 17.51.52](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/e/e6a8d6350fe30060d35e49e78784096bfdb4c2f9.png)  
 ![Screen Shot 2022-12-02 at 17.52.20](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/9/97567ae92edfa0f948f6d5b10f0eea3f092c8ff8.png)  
 ![Screen Shot 2022-12-02 at 17.52.39](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/b/badfc81d83e48c484937b2fdbed7c226f5ddd80b.png)

---

<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:** [December 2, 2022, 2:57pm UTC](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633/20 "2022-12-02T14:57:30Z")

</div>

It seems that there is still an error, as your POST request is not sent. But can you please make a screenshot of the list of all calls, not the details of these 3 calls please? I’d like to see how they are chained.

Please deactivate your extension to unblock CORS requests because we need to fix these cors issues.

[Next page](https://community.forestadmin.com/t/unable-to-register-the-client-error-after-upgrade-v7/5633.md?page=2)
