# Collection does not display

**URL:** <https://community.forestadmin.com/t/collection-does-not-display/3064>\
**Category:** Help me!\
**Tags:** howtos\
**Created:** [August 4, 2021, 4:03pm UTC](https://community.forestadmin.com/t/collection-does-not-display/3064 "2021-08-04T16:03:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Prior](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/andrew_prior/32/1275_2.png) [@Andrew\_Prior](https://community.forestadmin.com/u/Andrew_Prior)\
**Post date:** [August 4, 2021, 4:03pm UTC](https://community.forestadmin.com/t/collection-does-not-display/3064/1 "2021-08-04T16:03:18Z")

</div>

I have a collection in my local environment that does not display in the Forest Admin UI. I get the “Cannot reach your data” message. When I inspect the network traffic there is data coming back from my backend. The collection count also displays correctly in the UI. There are no errors in my server logs and none in the browser console. I have done a quick troubleshooting session with @louis. We have verified that the UI does receive updates from my server (we removed an action which was picked up by the UI). We have tried to simplify the model by removing an association (which was also picked up by the UI). Neither of those steps resulted in any change to the problem.

## Expected behavior

Should display collection  
Please describe here the behavior you are expecting.

## Actual behavior

What is the current behavior?  
Displays “Cannot reach data” message

## Failure Logs

None  
Please include any relevant log snippets, if necessary.

## Context

Please provide any relevant information about your setup.  
“forest-express”: “^7.10.0”,  
“forest-express-sequelize”: “^6.7.7”,  
“sequelize”: “^6.5.0”,  
“sequelize-cli”: “^6.2.0”,  
“express”: “^4.16.3”,

- Database Dialect: mysql
- Database Version: 5.7.24
- Project Name: Woodpecker

---

<div class="post-metadata">

**Author:** ![Andrew\_Prior](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/andrew_prior/32/1275_2.png) [@Andrew\_Prior](https://community.forestadmin.com/u/Andrew_Prior)\
**Post date:** [August 4, 2021, 5:48pm UTC](https://community.forestadmin.com/t/collection-does-not-display/3064/2 "2021-08-04T17:48:49Z")

</div>

I should note that when I delete the 113,000 records from the table and instead just upload 89 records. Those 89 records are displayed as expected. This leads me to believe that it is an issue with the number of records in this table.

---

<div class="post-metadata">

**Author:** ![anon79585656](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@anon79585656](https://community.forestadmin.com/u/anon79585656)\
**Post date:** [August 5, 2021, 8:19am UTC](https://community.forestadmin.com/t/collection-does-not-display/3064/3 "2021-08-05T08:19:25Z")

</div>

Hello @Andrew_Prior

Sorry to hear about this issue.

Can you check the network tab of your browser developper tools? If this is indeed related to the quantity of data, you might find a timeout or something similar for some request.  
Please look for call on routes like `/forest/abc` and `/forest/abc/count` (with “abc” you collection name).

You can also start your Forest agent with `DEBUG=sequelize* npm start` to display the queries and their execution time.  
(`DEBUG=* npm start` will give you more logs if needed)

Thank you

---

<div class="post-metadata">

**Author:** ![Andrew\_Prior](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/andrew_prior/32/1275_2.png) [@Andrew\_Prior](https://community.forestadmin.com/u/Andrew_Prior)\
**Post date:** [August 5, 2021, 4:32pm UTC](https://community.forestadmin.com/t/collection-does-not-display/3064/4 "2021-08-05T16:32:05Z")

</div>

Thank you for your response. In my network tab the calls to get data from the collection are not timing out, they are return data as expected. The data is just not getting displayed. Please sync with @louis. He has a video of troubleshooting session that shows this.

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [August 9, 2021, 8:07am UTC](https://community.forestadmin.com/t/collection-does-not-display/3064/5 "2021-08-09T08:07:51Z")

</div>

Hi @Andrew_Prior 👋

Could you please check the response on the `getAll` request of this collection and verify that all your records have an “id” field (And that this id also has a value)?

This is a mandatory field for a collection to work and it can definitely cause issues if this requirement is not met.

Let me know if that helps 🙏

---

<div class="post-metadata">

**Author:** ![Andrew\_Prior](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/andrew_prior/32/1275_2.png) [@Andrew\_Prior](https://community.forestadmin.com/u/Andrew_Prior)\
**Post date:** [August 9, 2021, 1:43pm UTC](https://community.forestadmin.com/t/collection-does-not-display/3064/6 "2021-08-09T13:43:57Z")

</div>

@jeffladiray Does the model have to have a primary key that is named `id`? Because if that is required then that is the issue. I have a primary key that is named `file_key` instead of `id`.

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [August 9, 2021, 2:00pm UTC](https://community.forestadmin.com/t/collection-does-not-display/3064/7 "2021-08-09T14:00:33Z")

</div>

To give a more explicit response:

The `id` field is not required on your model - we are able to detect which one of your field is the primary key, and our serialization process will duplicate your primary key (In order to have both `id` & your primary key sent back to our frontend).

In the video, I can see that the first record of the `GET /forest/yourModel` has an `id: ""`, which is the source of the issue you are experiencing (I’m able to reproduce the issue with a similar setup, which should clearly display a better log for this case).

---

<div class="post-metadata">

**Author:** ![Andrew\_Prior](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/andrew_prior/32/1275_2.png) [@Andrew\_Prior](https://community.forestadmin.com/u/Andrew_Prior)\
**Post date:** [August 9, 2021, 2:03pm UTC](https://community.forestadmin.com/t/collection-does-not-display/3064/8 "2021-08-09T14:03:04Z")

</div>

Yes, once I removed that record it start to display correctly. Thank you!
