Strange error in WEB Core using the Delphi IDE (10.4.2)

I've been building an app and it has been working just fine.

Now for some reason I changed a bunch of code, changed things on the form, rebuilt the app, and when I run it, it opens in the browser with the same OLD VERSION of the code.

None of the changes I've made since that version are showing up. (It's a version from a day or two ago.)

I right-click on the project and select Clean and I can see all of the files are removed from the two execution folders. Then I do a rebuild and when I run it, the same OLD VERSION shows up again.

I'm looking at the files in the project and the IDE and they're the same on the disk, both the HTML and the PAS files.

There are things I deleted, added, and changed on the form, and none of them are showing up. In particular, I was reading data from a JSON object into objects that were put onto a list, then I was displaying them on a TWebStringGrid. I change it so they're being put into a TWebClientDataSet and then displayed on a TWebDBGrid. The code is completely different. I moved the TWebStringGrid onto another tab to get it out of the way. NONE of that is showing up, and the code is filling up the TWebStringGrid just as before.

I'm getting NO ERRORS AT ALL!

I've tried everything I can think of, but the current source files are correct, and I cannot figure out where the older code might be coming from.

The folder names haven't changed, there are no older copies of the files hidden away that I can find, the IDE seems to be working exactly as it should.

Only the app that runs is completely different (older) code than what's in the IDE and on disk in the project's folder.

I've also tried closing Delphi, completely rebooting my VM, restarting everything. It's as if it's running a ghost and I can't get the current code to run. ARRRGGGGG!!!!!!

I even looked inside of the JS file and searched for the new objects and changed code, and they're present.

So where is this previous version coming from that's being built?


If a restart did not help then it sounds like a caching issue in the browser. Which browser are you using?


The steps below solved a similar issue in Chrome. Since both browsers are based on Chromium, can you try:

  1. Open the developer tools on the same page your application is running
  2. Go to the "Application" tab
  3. Select "Storage"
  4. Click on "Clear site data"
  5. Refresh page

Works fine in Chrome, not in Edge. I guess I'll avoid Edge for now.

I'm trying BriskBard for a while.

Sometimes the browser can aggressively cache the project itself. When developer tools are open in Chrome or Edge (hit F12), long press on the refresh button and try the "Empty Cache and Hard Reload" option.

This won't remove the localStorage elements but does a better job of clearing out the last project run.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.