Code.js not updating

My code.js file seems to not be updating with code changes. I have read through related posts in this forum and followed various steps but I cannot get the code.js to update at all. I cleared the cache in multiple browsers that I have tested with.
I have version 7.4.0.6
Ryan

How are you deploying?

It is happening when I run in desktop browser from AppStudio.

Are there any messages in the Chrome Dev Tools Console?

Also, if you right click in Chrome and select View Page Source, you can see the build time in one of the first few lines:

<meta name='date' content='2019-07-27 09:32:28.339155' />

I see this message:
Uncaught SyntaxError: Unexpected end of input … code.js line 500

however –

If I click to look at code.js and go to line 500 I see this code

function skipError(transaction, results) {
 //Called On failure of Sql command
}

which previously existed in my project database code but does not exist now. After I removed that function it has not updated in code.js

I’m not sure what you are saying here.

When you look at line 500 in code.js, you’re looking at the old version which doesn’t get updated, right?

code.js is generated by AppStudio from the various bits of code in your project. It’s looking like the problem might be someplace in your project. You might check for mismatched quote, parenthesis and brackets.

The function skipError does not exist in the project. It did at one point, but it was removed. The function skipError is still in code.js.

Would code.js not get updated if there were a syntax error in the project?

What happened when you looked at View Page Source? What was the date?

It is today and current time at launch

Thanks!

Next, go into the About AppStudio screen. It has a View Log button. Anything there?

nothing in the log

This is exactly what happens to me. Sometimes a cache clear is enough, other times the only way forward is I simply have to stop developing for the day. A deploy the next day seems to update first time.

George the code.js file updates on the server, it is chrome (any browser) after successive deploys during bug fixing will not update code.js but index.html does so the errors occur as stated above. It seems like the browser is potentially noticing the regular downloads of code.js and blocking it thinking that it a security problem. Which makes me think, is it a virus checker issue?

@RyanS, could you zip your project folder and send it to me? Let’s see what happens here.

@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.

Ryan

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:

https://blog.appstudio.dev/2018/10/as7-syntax-checking-for-javascript/

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