Code.js not updating

@lotsofcows, does clearing the Chrome cache make a difference?

@RyanS, try clearing the cache as well

As you wrote that reply, I tried to run the project in Firefox using Firefox developer tools instead of Chrome with Chrome Developer tools and I got a more specific error message that a function of mine was missing a “}”. I fixed that line and the code.js is updated now.
Interesting that I did not see that same error pointed out in the Chrome tools.
So, all appears well now.


Thanks for the good news. If you’re working in JavaScript, you can use the syntax checking feature in the Code Window to catch this and other issues:

I use this when making production code myself. Many problems are caught before I run the app.

I am working in Javascript. I really appreciate your time on the forum on a weekend!!

Sometimes. Just the hassle of losing all the app data, localstorage etc. Other times, time is the only cure. I regularly change a comment line to quickly identity if code.js has updated.

I would guess @RyanS issue won’t be solved as he just used a new browser with a clear cache. I’ve had the issue with chrome, safari and edge. Guessing again obviously but the error he found would be in his code.js file which was not updated. Change browser and the code.js file with the error then ran for the first time.

I’ll keep investigating but it’s a weird one.

I use Quick Heal Total security as my virus checker. With that turned off my code.js file updates every time… so far :wink: I’ve put my site’s IP address on the white list. Seems to be working so far.

@lotsofcows I am using Webroot as AV and Malwarebytes. I will have to see if it is blocking my code.js

I don’t think it is Antivirus now. Windows firewall off helps but not the complete solution. More here…

The StackOverflow article you refer to is from 2010. However, clearing the cache is still the first thing to do.

What version of AppStudio are you using? There were recently big changes in this area.

Are you deploying to your own server or Volt?

Latest version. Own server.

I have been getting this recently too. The index.html file updates immediately but the code.js takes 1 to 2 hours before it will update. In the meantime the app is full of errors - difficult to explain to an end user. Own server. Happens mainly on desktop (Windows, Chrome and Opera) but also on Android.

I’ve have a problem with Chrome not clearing cache, even with right click on reload button, selecting clear cache and hard reload… The only way I know to be sure your internal cache is really cleared for a site is to go to the site in Incognito mode. Incognito ignores the cache and updates the cache. I’m still looking into my problem - if I find something I’ll post it.

Same here, last week, two computers on same Chrome account would not update code.js. Firefox, IE, Edge were ok. Tried everything including reinstalling Chrome on PC. A third computer not on the same Chrome account updated. The next day everything was back to normal. Was using Version 6.x of AS. When I redeployed to a new Folder name not used before, it would update. I think I tested on Android without issue. AS 7.x no issue but I didn’t have any older deployed apps to test.


I bet MicroSoft sent out an update to the wininet API that is not working recently. I’m betting MAC users are not seeing this. I’m on Win10.

You guys have any joy with the firewall turned off?

I’ve had problems with my code not updating on my server too. I’m running the latest NSB version.
When this happens, i move a control such as a button to a different position on the screen then deploy again, and then everything updates as it should. Not sure why.

Whose server are you deploying to?

Don’t suppose we could write an Ajax call within the app to download code.js? Assume an ajax call won’t save code.js to where it needs to be saved?

Issue just started on my Galaxy S9+ today. To date it had only been on pc and with my firewall off it is not happening much.

George is there any chance you could save a code.js version in the index.htm (or somewhere else) file? The app could compare the versions on loading to make sure it it running the correct code.js. Very frustrating wasting time “fixing” a bug when your fixes aren’t even going through.

Followup: A day later my code.js was updating again. Suggestion, if you have a Google account try logging into a different account. When I did that it worked the day it was failing on two computers logged into the same Google account. The third computer was on a different account. Maybe just coincidental but worth a try.


It always updates for me within a day later. On the plus side at least you know clients are getting the app update eventually.