# Forest Admin on Heroku with Postgres / not all the data is showing

**URL:** <https://community.forestadmin.com/t/forest-admin-on-heroku-with-postgres-not-all-the-data-is-showing/1300>\
**Category:** Help me!\
**Created:** [November 13, 2020, 6:10pm UTC](https://community.forestadmin.com/t/forest-admin-on-heroku-with-postgres-not-all-the-data-is-showing/1300 "2020-11-13T18:10:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Bagard](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/christopher_bagard/32/1078_2.png) [@Christopher\_Bagard](https://community.forestadmin.com/u/Christopher_Bagard)\
**Post date:** [November 13, 2020, 6:10pm UTC](https://community.forestadmin.com/t/forest-admin-on-heroku-with-postgres-not-all-the-data-is-showing/1300/1 "2020-11-13T18:10:12Z")

</div>

HI,  
I am new to Forest Admin, I just set up the Forest Admin App connected to a Postgres database hosted on Heroku.  
When I run Forest Admin locally,

## Expected behavior

Show all the data, navigate between pages.

## Actual behavior

Forest Admin works as expected when I run the server locally connected to the Heroko DB. The data is correctly fetched, I can navigate to the next 50 page, I can see the total number of items per table.  
However, when run on Heroku, the data is indeed fetched and I can see the first page of results. However I am not able to navigate and show the next 50 elements or see the total number of items per table. I am able to search accross all items of each table.  
Heroku Logs do not show any errors.

What might be causing this error ?  
Thanks a lot for your help,  
Chris

## Context

Server hosted on heroku, Postgres DB on Heroku

```
"body-parser": "1.19.0",
"chalk": "~1.1.3",
"cookie-parser": "1.4.4",
"cors": "2.8.5",
"debug": "~4.0.1",
"dotenv": "~6.1.0",
"express": "~4.16.3",
"express-jwt": "5.3.1",
"forest-express": "^7.4.0",
"forest-express-sequelize": "^6.0.0",
"morgan": "1.9.1",
"require-all": "^3.0.0",
"sequelize": "~5.15.1",
"pg": "~8.2.2"
```

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [November 16, 2020, 10:27am UTC](https://community.forestadmin.com/t/forest-admin-on-heroku-with-postgres-not-all-the-data-is-showing/1300/2 "2020-11-16T10:27:46Z")

</div>

Hi @Christopher_Bagard and welcome in our community 🍾 !

Hmm I might have an idea where that come from. In your browser console, do you have a 403 error on the `/count` request 🤔 ?

---

<div class="post-metadata">

**Author:** ![Christopher\_Bagard](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/christopher_bagard/32/1078_2.png) [@Christopher\_Bagard](https://community.forestadmin.com/u/Christopher_Bagard)\
**Post date:** [November 16, 2020, 1:09pm UTC](https://community.forestadmin.com/t/forest-admin-on-heroku-with-postgres-not-all-the-data-is-showing/1300/3 "2020-11-16T13:09:49Z")

</div>

Hi @anon62739609,  
Thanks a lot for your reply.  
Yes indeed, I do have a 403 (Forbidden) on the count request.  
When I check the Forest Api message, I see “Forest cannot authenticate the user for this request.”.  
This seems surprising because Forest the app has access to the data as it is showing the first page of results.

What do you have in mind ? 😃

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [November 16, 2020, 2:11pm UTC](https://community.forestadmin.com/t/forest-admin-on-heroku-with-postgres-not-all-the-data-is-showing/1300/4 "2020-11-16T14:11:10Z")

</div>

Okey this is what I though.  
You are seeing this issue because of a conflict between 2 routes: the `/modelName/:recordId` and `/modelName/count`.  
To fix it you just need to replace: `/modelName/:recordId` by `/modelName/:recordId(?!count)` and it should fix your issue 😄

---

<div class="post-metadata">

**Author:** ![Christopher\_Bagard](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/christopher_bagard/32/1078_2.png) [@Christopher\_Bagard](https://community.forestadmin.com/u/Christopher_Bagard)\
**Post date:** [November 16, 2020, 2:45pm UTC](https://community.forestadmin.com/t/forest-admin-on-heroku-with-postgres-not-all-the-data-is-showing/1300/5 "2020-11-16T14:45:41Z")

</div>

Awesome ! That did the trick, thanks a lot for your fast answers @anon62739609.  
Just for my understanding, how come the routes conflicted together ? I can’t see any overlap  
And why only in production ?

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [November 16, 2020, 2:58pm UTC](https://community.forestadmin.com/t/forest-admin-on-heroku-with-postgres-not-all-the-data-is-showing/1300/6 "2020-11-16T14:58:51Z")

</div>

Why they are conflicting together I’m still trying to understand as the `/count` is declared before the `/:recordId` so this should not… 🤔

For your question why it’s only on production, it’s because you have deactivated the `Access record details` in your production environment 😉
