App.js version breaks our app

We have an issue where our app becomes slow and backend api's time out after the update of the app.js file.

We stopped updating this file as part of our Wappler lib updates a couple of weeks ago and today tried to incorporate the update again, but same happend.

We reverted back. Unfortunately app.js does not have a version number, so all I could do is post screenshots of the reverted version on git. Red would be parts of the file that has updates that one or more of the code lines/functions potentially breaks the app. The green is what we reverted to for the app to work gain.

How can we troubleshoot this problem?

1 Like

Something to maybe mention is that we use encrypted environmental variables that we declare in a .env file for the database connection. Maybe this could cause the issue.

It is in the site root.

Seeing the diffs it was an update to make sure that dynamic expressions in database configurations are evaluated per request. In the old situation the expressions in a database connection were only evaluated once at startup of the server.

I didn't expect any mayor slowdowns with this update, what kind of slowdowns do you get? Is there a memory increase, perhaps a memory leak?

Thanks for getting back to us @patrick . We use encrypted environmental variables for the database connection. Example of the username expression:

$_ENV.NODE_ENV==='development'?$_ENV.DB_USERNAME:$_ENV.DB_USERNAME.decrypt($_ENV.KEY)

screenshot of the db connection ui in Wappler:

We will run specific tests by adding the updates again and get back to you asap.

We're having the same issues on an established site, all API requests are slowing down since the most recent app.js update. We're not using encrypted environment variables. Stable 6.8 - there was an update a couple of weeks ago that had changes to core components, we avoided adding these for a while but they ended up getting added to some extensions updates recently.

@patrick is there any way I can have a copy of the old version of app.js please? Also, I'm sure there was another core component updated at the same time but I cant remember which one that was. I tried reinstalling 6.8. from the Wappler download area but that looks like it contains the modified file and not the older one.

We have been using a months old version since I do not really know how to troubleshoot. I am afk but when back later I can zip and send you the version we are stuck on

1 Like

many thanks - ,much appreciated!

app.js.zip (6.0 KB)

Just use a compare tool and see if this one differs from the one you have.

It could be that one of my contracted devs updated the file by accident and the problem was either something else or something was changed that fixed our problem.

1 Like

I've tried multiple versions of app.js and also dmxAppConnect, multiple new installs of 6.8.0 and my page load times have increased massively on anything that has a complex API on the backend.

I'd been avoiding updating both of those files, each time Wappler starts it prompts me to update..

@patrick Do you have a copy of dmxAppconnect.js prior to the current version please? Current version is: 2.0.22 @build 2025-05-02 10:23:53 same also with the previous version of the current app.js (theres no versioning on this file).

Update: I updated the whole site to run on Wappler V7 RC1 and it seems to have fixed whatever the issue was.

2 Likes