# 403 Forbidden Error on Test env

**URL:** <https://community.forestadmin.com/t/403-forbidden-error-on-test-env/7063>\
**Category:** Help me!\
**Created:** [February 20, 2024, 10:04am UTC](https://community.forestadmin.com/t/403-forbidden-error-on-test-env/7063 "2024-02-20T10:04:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamerlan\_Musayev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/tamerlan_musayev/32/6750_2.png) [@Tamerlan\_Musayev](https://community.forestadmin.com/u/Tamerlan_Musayev)\
**Post date:** [February 20, 2024, 10:04am UTC](https://community.forestadmin.com/t/403-forbidden-error-on-test-env/7063/1 "2024-02-20T10:04:45Z")

</div>

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

## Feature(s) impacted

I receive 403 errors on each model on TEST env (ADMIN role). But on Prod env all is working. Also other team members also receive 403 errors on creation (ADMIN role).

## Failure Logs

==================================  
2024-02-20 13:56:51.199   
at async cors (/app/node\_modules/@koa/cors/index.js:109:16)  
2024-02-20 13:56:51.199   
at async bodyParser (/app/node\_modules/koa-bodyparser/index.js:78:5)  
2024-02-20 13:56:51.199   
at async ErrorHandling.errorHandler (/app/node\_modules/@forestadmin/agent/dist/routes/system/error-handling.js:20:13)  
2024-02-20 13:56:51.199   
at async Logger.logger (/app/node\_modules/@forestadmin/agent/dist/routes/system/logger.js:20:13)  
2024-02-20 13:56:51.199   
at async CountRoute.handleCount (/app/node\_modules/@forestadmin/agent/dist/routes/access/count.js:15:9)  
2024-02-20 13:56:51.199   
at async AuthorizationService.assertCanBrowse (/app/node\_modules/@forestadmin/agent/dist/services/authorization/authorization.js:15:9)  
2024-02-20 13:56:51.199   
at process.processTicksAndRejections (node:internal/process/task\_queues:95:5)  
2024-02-20 13:56:51.199   
at AuthorizationService.assertCanOnCollection (/app/node\_modules/@forestadmin/agent/dist/services/authorization/authorization.js:40:26)  
2024-02-20 13:56:51.199   
at Object.throw (/app/node\_modules/koa/lib/context.js:97:11)  
2024-02-20 13:56:51.199   
ForbiddenError: Forbidden  
2024-02-20 13:56:51.199

2024-02-20 13:56:51.199   
Forbidden

## Context

- **Project name:** Seaya
- **Team name:** Seaya
- **Environment name:** TEST
- **Agent (forest package) name & version:** [Widget Name & Version]:  
“@forestadmin/agent”: “^1.36.11”,  
“@forestadmin/datasource-sequelize”: “^1.5.26”,  
“@forestadmin/datasource-sql”: “^1.7.43”,  
“@forestadmin/datasource-toolkit”: “^1.29.1”,  
“forest-express-sequelize”: “^9.3.9”,
- **Database type:** PostgreSQL
- **Recent changes made on your end if any:** Changing the Editor role to disable creation

---

<div class="post-metadata">

**Author:** ![morganperre](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/morganperre/32/1296_2.png) [@morganperre](https://community.forestadmin.com/u/morganperre)\
**Post date:** [February 20, 2024, 1:32pm UTC](https://community.forestadmin.com/t/403-forbidden-error-on-test-env/7063/2 "2024-02-20T13:32:45Z")

</div>

Hello @Tamerlan_Musayev,

Let’s try to understand what’s going on.

> [@Tamerlan\_Musayev](#):
>
> other team members also receive 403 errors on creation (ADMIN role)

First of all, you shared failure logs about the count route note the creation. 👀

> [@Tamerlan\_Musayev](#):
>
> at async CountRoute.handleCount (/app/node\_modules/@forestadmin/agent/dist/routes/access/count.js:15:9)

I double-checked your role and indeed the Admin role must be able to Create a Booking and also Browse a Booking (looking at your screenshot example).

We need to dig a little more bit to find the culprit.

> [@Tamerlan\_Musayev](#):
>
> - **Recent changes made on your end if any:** Changing the Editor role to disable creation

- Did it work before that?

> [@Tamerlan\_Musayev](#):
>
> “@forestadmin/datasource-sequelize”: “^1.5.26”,  
> “@forestadmin/datasource-sql”: “^1.7.43”,

- I see two [datasources](https://docs.forestadmin.com/developer-guide-agents-nodejs/data-sources/provided-data-sources/sql). Which one of the datasource are you using in your project?

- Did you check your TEST database to ensure the data are right? Are every tables well-defined? (`@forestadmin/datasource-sql` introspect your DB at runtime when a server start this may cause troubles)

- Did you try to restart your TEST server?

Thanks in advance for your answers.

Kind regards,  
Morgan

---

<div class="post-metadata">

**Author:** ![Tamerlan\_Musayev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/tamerlan_musayev/32/6750_2.png) [@Tamerlan\_Musayev](https://community.forestadmin.com/u/Tamerlan_Musayev)\
**Post date:** [February 21, 2024, 7:12am UTC](https://community.forestadmin.com/t/403-forbidden-error-on-test-env/7063/3 "2024-02-21T07:12:40Z")

</div>

Hello! Thanks for your answer.

1. Other team members can view the tables, but errors occur when creating Pms users. I have the same admin role but I get 403 everywhere

2. These are the logs that the forest admin returned to us. In the current situation I’m getting 403 everywhere

3. Exactly. It used to work, but at one point it stopped working. Everything works in production

4. It worked before

5. Nothing has changed in the project code.

6. Everything is fine with the TEST database, because… our site is working. And the content from the forest is loaded. The problem is only in Forest Admin

7. Yes, we restarted TEST server 2-3 times, same problem

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [February 21, 2024, 10:31am UTC](https://community.forestadmin.com/t/403-forbidden-error-on-test-env/7063/5 "2024-02-21T10:31:07Z")

</div>

Hello Tamerlan,  
It should be fixed, can you retry to navigate on you forestadmin 🙏 ?

---

<div class="post-metadata">

**Author:** ![Tamerlan\_Musayev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/tamerlan_musayev/32/6750_2.png) [@Tamerlan\_Musayev](https://community.forestadmin.com/u/Tamerlan_Musayev)\
**Post date:** [February 21, 2024, 10:36am UTC](https://community.forestadmin.com/t/403-forbidden-error-on-test-env/7063/6 "2024-02-21T10:36:44Z")

</div>

Hello, Thanks, it works!
