cancel
Showing results for 
Search instead for 
Did you mean: 

No data in app - failed to create cache

former_member624584
Participant

Hi guys,

I deployed the app from the openSAP CAP course week 3 - unit 5. The srv-app works fine (displaying the metadata and the actual data) but when I try to start the app / UI - application the three different apps (browse, manage books, manage orders) do not show any data. In the console of the inspector I receive a 'Failed to create cache for binding sap.ui.model.odata.v4.ODataListBinding: ...'.

Why does the error occur? How do I resolve the error?

gregorw
Active Contributor
0 Kudos

I just run into the same issue and want to provide some Google keywords with my full log:

Log-dbg.js:452 2022-06-14 10:23:59.020600 Failed to create cache for binding sap.ui.model.odata.v4.ODataListBinding: /ExpiringPricingsView - TypeError: Cannot read properties of undefined (reading '$kind')
    at Object.wrapChildQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4573:14880)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:382)
    at https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:173
    at c (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:563:99)
    at new S (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:565:773)
    at S.then (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:151)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:358)
    at Array.map (<anonymous>)
    at O.fetchResolvedQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:301)
    at o.doFetchQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4204:68) sap.ui.model.odata.v4.ODataBinding
10:23:59.022 Log-dbg.js:452 2022-06-14 10:23:59.021800 sap.ui.model.odata.v4.ODataListBinding: /ExpiringPricingsView: Failed to enhance query options for auto-$expand/$select for child pricingId - TypeError: Cannot read properties of undefined (reading '$kind')
    at Object.wrapChildQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4573:14880)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:382)
    at https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:173
    at c (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:563:99)
    at new S (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:565:773)
    at S.then (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:151)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:358)
    at Array.map (<anonymous>)
    at O.fetchResolvedQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:301)
    at o.doFetchQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4204:68) sap.ui.model.odata.v4.ODataParentBinding
10:23:59.023 Log-dbg.js:452 2022-06-14 10:23:59.022399 Failed to create cache for binding sap.ui.model.odata.v4.ODataPropertyBinding: /ExpiringPricingsView/-9007199254740991[-9007199254740991]|pricingId - TypeError: Cannot read properties of undefined (reading '$kind')
    at Object.wrapChildQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4573:14880)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:382)
    at https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:173
    at c (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:563:99)
    at new S (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:565:773)
    at S.then (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:151)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:358)
    at Array.map (<anonymous>)
    at O.fetchResolvedQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:301)
    at o.doFetchQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4204:68) sap.ui.model.odata.v4.ODataBinding
10:23:59.024 Log-dbg.js:452 2022-06-14 10:23:59.023000 Failed to read path /ExpiringPricingsView/-9007199254740991/pricingId - TypeError: Cannot read properties of undefined (reading '$kind')
    at Object.wrapChildQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4573:14880)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:382)
    at https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:173
    at c (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:563:99)
    at new S (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:565:773)
    at S.then (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:151)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:358)
    at Array.map (<anonymous>)
    at O.fetchResolvedQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:301)
    at o.doFetchQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4204:68) sap.ui.model.odata.v4.ODataPropertyBinding
10:23:59.053 Log-dbg.js:452 2022-06-14 10:23:59.052600 Failed to get contexts for analytics-expiring-pricings/webapp/price-agreement/ExpiringPricingsView with start index 0 and length 30 - TypeError: Cannot read properties of undefined (reading '$kind')
    at Object.wrapChildQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4573:14880)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:382)
    at https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:173
    at c (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:563:99)
    at new S (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:565:773)
    at S.then (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:151)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:358)
    at Array.map (<anonymous>)
    at O.fetchResolvedQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:301)
    at o.doFetchQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4204:68) sap.ui.model.odata.v4.ODataListBinding
10:23:59.054 Log-dbg.js:452 2022-06-14 10:23:59.053600 Error in deregisterChange - TypeError: Cannot read properties of undefined (reading '$kind')
    at Object.wrapChildQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4573:14880)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:382)
    at https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:173
    at c (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:563:99)
    at new S (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:565:773)
    at S.then (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:151)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:358)
    at Array.map (<anonymous>)
    at O.fetchResolvedQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:301)
    at o.doFetchQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4204:68) sap.ui.model.odata.v4.ODataPropertyBinding
10:23:59.059 Log-dbg.js:452 2022-06-14 10:23:59.057800 Failed to get contexts for analytics-expiring-pricings/webapp/price-agreement/ExpiringPricingsView with start index 0 and length 30 - TypeError: Cannot read properties of undefined (reading '$kind')
    at Object.wrapChildQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4573:14880)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:382)
    at https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:173
    at c (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:563:99)
    at new S (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:565:773)
    at S.then (https://sapui5.hana.ondemand.com/1.96.8/resources/sap-ui-core.js:568:151)
    at eval (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:358)
    at Array.map (<anonymous>)
    at O.fetchResolvedQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4384:301)
    at o.doFetchQueryOptions (https://sapui5.hana.ondemand.com/1.96.8/resources/sap/ui/core/library-preload.js?eval:4204:68) sap.ui.model.odata.v4.ODataListBinding
gregorw
Active Contributor
0 Kudos

A similar issue was also reported in:

Fiori preview for bookshop doesnot work #44

Accepted Solutions (0)

Answers (3)

Answers (3)

gregorw
Active Contributor
0 Kudos

In my case the issue was caused by a missing entry in an index.cds file. It was not pointing to the annotaiton.cds where the UI annotations where defined.

klaus_kopecz
Participant
0 Kudos

Did you define the destination env variable of the application router correctly to point to the CAP server?

former_member624584
Participant
0 Kudos

Hi Klaus,

sry for the miscommunication. I deployed the sample app on the SCP.
The destinations and requirements in the mta.yaml file look fine between the UI-app and the srv-app (which works perfectly fine with the database-app).

gregorw
Active Contributor
0 Kudos

Have you already defined the Fiori Elements annotations? As the table doesn't show any columns I guess that is the issue.

former_member624584
Participant
0 Kudos

Yes, I used the source code from the SAP-samples repository.

When I start the app locally (using cds watch) I get the following result.