cancel
Showing results for 
Search instead for 
Did you mean: 

Uncaught ReferenceError: ui is not defined

former_member602416
Participant
0 Kudos

i Experts,

I just deployed newly developed custom fiori app to abap backend server from VS Code using nwabap-ui5uploader. It looks all good and created BSP application in backend.

When I try to execute it from backend, It throws error "Uncaught ReferenceError: ui is not defined" in console. I google and found SAP Note 2833005 which says that loading old version of UI5 is an issue.

I checked backend version from http://<host>:<port>/sap/public/bc/ui5_ui5/index.html and version is 1.38. Then I looked manifest file version which has version "1.32.0" originally so I changed it to "1.38.0" manually to match it with backend but still same error.

Can someone please advice what's the issue here?

I used UI5 free style worklist template to create this app. App looks like below when launched locally.

pfefferf
Active Contributor
0 Kudos

Can you post the complete error log to be able to identify what "ui" reference is not defined?

Do you use an index.html with a SAPUI5 bootstraping script tag (standalone app) or is the app integrated in Fiori Launchpad?

former_member602416
Participant
0 Kudos

Thanks Florian for replying back. I have updated error log image to show complete error. I am able to launch it locally using below url but when launched from backend it gives error.

Local URL -

http://localhost:8080/index.html

Backend URL -

/sap/bc/ui5_ui5/bti/lot_proc_doc/index.html?sap-client=100

View Entire Topic
Joseph_BERTHE
Active Contributor
0 Kudos

Hello,

You issue comes from the index.html which refers to a wrong UI5 library. You should not call your application from index.html but directly by the component.js

If you want it working, change the bootstrap src parameter by something like this :

<script id="sap-ui-bootstrap" src="https://ui5.sap.com/1.38.51/resources/sap-ui-core.js"

Regards,

Joseph

mahmood_hammood
Participant
0 Kudos

Hallo Joseph,

I have the same problem and I tried so much solution, yours too, but no success. Two weeks I try. Can you help please?