# Debug: Cannot resolve read order of datasources

**URL:** <https://community.appfarm.io/t/debug-cannot-resolve-read-order-of-datasources/1066>\
**Category:** Ask the community\
**Tags:** app-data\
**Created:** [February 21, 2024, 6:27pm UTC](https://community.appfarm.io/t/debug-cannot-resolve-read-order-of-datasources/1066 "2024-02-21T18:27:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SinanMaric](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/sinanmaric/32/1226_2.png) [@SinanMaric](https://community.appfarm.io/u/SinanMaric)\
**Post date:** [February 21, 2024, 6:27pm UTC](https://community.appfarm.io/t/debug-cannot-resolve-read-order-of-datasources/1066/1 "2024-02-21T18:27:45Z")

</div>

Hello, I am doing some cleaning in our code base, and I am wondering if you have any tips in how to start debugging the following error? I always like working in the browsers console when debugging, but I cannot find this error there.

Regarding circular dependencies. Is this a typical error message to get if you for example have two object classes referencing each other?

 ![Screenshot 2024-02-21 at 19.26.38](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/2X/3/3ab3a44e2f62d2c2f5f7dd5f267faa657c8094f1.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [February 21, 2024, 7:13pm UTC](https://community.appfarm.io/t/debug-cannot-resolve-read-order-of-datasources/1066/2 "2024-02-21T19:13:20Z")

</div>

Hello!

You typically encounter circular reference errors in two situations in Appfarm:

1. Reading App Data: Filters on data sources that are curcular. Example: Companies filtered on Departments, Departments filtered on Orders, Orders filtered on Companies.
2. Cascade Delete (Delete rule on Object Class Properties). Product.Main Photo, Photo.Product - both with cascade delete. Circular reference might occur upon delete.

I believe this is the first one. I would create an App copy and remove or disable data sources “one by one” to find the data source(s) causing this.
