cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 Changes are not reflected when running app

JFULGENCIO
Explorer
0 Kudos
7,176

Hi experts,

We are currently making some updates to a custom UI5 application and then deploying it to Gateway/Front end server.

Based on the status in Web IDE the deployment was successful and even checking via SE80, we can see the updated code.

The problem is that when we run the app via its tile in the Launchpad, the changes were not reflecting.

When we open the debugging console, we saw that the app is still running the old version of the code.

So far, we tried clearing the caches using the following programs:

  • /UI2/INVALIDATE_GLOBAL_CACHES
  • /UI2/INVALIDATE_CLIENT_CACHES
  • /UI2/DELETE_CACHE
  • /UI2/CHIP_SYNCHRONIZE_CACHE
  • /UI2/DELETE_CACHE_AFTER_IMP

We also ran transactions /IWFND/CACHE_CLEANUP and /IWBEP/CACHE_CLEANUP but so far, we haven't had any luck.

If we test the app in Web IDE, everything is working fine.

We are deploying the app to a Gateway with SAP_UI 750, SP3 and SAP_GWFND 750, SP3.

Any help would be much appreciated.

Thanks,

Jeff

Accepted Solutions (1)

Accepted Solutions (1)

antonette_oberholster
Active Contributor

Hello Jeff

Have you tried clearing browser cache? This doesn't always work, the safest way to ensure that you are always seeing the latest version in your browser, is to have F12 developer tools open with the "always refresh from server" setting enabled and then launching/refreshing the app.

Hope this helps

Regards

Antonette

JFULGENCIO
Explorer
0 Kudos

Hi Antonette,

Thanks for the response.

We did try clearing our browser history and using Incognito mode but still nothing.

Just to confirm, is the "always refresh from server" setting the same as the "disable cache" checkbox when developer tools window is open?

Regards,

Jeff

antonette_oberholster
Active Contributor
0 Kudos

Hey Jeff

In IE 11 this is what the icon looks like:

Regards

Antonette

JFULGENCIO
Explorer
0 Kudos


Hi Antonette,


I believe the Disable Cache in Chrome works the same way although it still didn't work.

I tried redeploying the app using the original application files and somehow our updates showed up. I think the application files we imported were messed up so our deployment got messed up as well.

Thanks again for your response Antonette.

Regards,

Jeff

Ankit_Maskara
Advisor
Advisor
0 Kudos

Hi Jeff,

Disable cache will work from next time when you launch the application. Fiori Launchpad caches the application code also and thus you have to explicitly delete the old app code and force the FLP to get the latest codebase. This you can do by hard reloading the application from browser.

antonette_oberholster
Active Contributor
0 Kudos

Hey Jeff

That has happened to me as well in the past, not fun. If you don't see the latest result due to cache issues, but you think you are seeing the latest changes, then things get messy because you keep on making changes and never see them, so it is possible that there are a bunch of errors due to your coding or changes that are not showing but you are still seeing the "old version" in a working state.

I usually have some sort of identifier to make sure I'm seeing the latest version. If I'm not sure my changes are showing, I change the colour of the Title (or any other text or object) or I add a small Label/Alert/Console: "Yes Antonette, you are seeing your latest changes" .
So obviously you will then know that your colour did not change or your message is not showing.

Good luck!

Answers (3)

Answers (3)

JFULGENCIO
Explorer
0 Kudos

Hi guys,

Thanks for all the replies.

I tried all the cache clearing steps but nothing worked.

I was lucky that I just recently created the app so I have the original set of files in my WebIDE. I updated this original version instead of the copy I imported from GW and somehow everything worked fine.

I noticed some files were deleted when I redeployed the application so I'm guessing those files caused the issue.

Again thank you all for all your suggestions and help.

Regards,

Jeff

ugurkaya
Active Participant
0 Kudos

Hey Jeff,

Did you try using cache buster. Please refer to following page

Cache Buster - UI Development Toolkit for HTML5 (SAPUI5) - SAP Library

Regards

Ugur

ugurkaya
Active Participant
0 Kudos

Hey Jeff,

You might want to run it from incognito mode, also you can use following code in your index.html page for cache management.

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />

<meta http-equiv="Pragma" content="no-cache" />

<meta http-equiv="Expires" content="0" />

Regards

Ugur

Ankit_Maskara
Advisor
Advisor
0 Kudos

But do you always suggest not to cache the application code? I don't think its right to disable the application caches.

BR.

ugurkaya
Active Participant
0 Kudos

It makes my life easier to disable the cache on the development phase. Once the version is stabilized there is no need for that, you are right. Using cache buster may be a better approach here.