Restart.txt is uploaded before the server connect file is uploaded to remote server

Wappler Version : 3.4
Operating System : mac / remote node

Expected behavior

When saving a server connect file, the trigger to restart the server (upload of restart.txt) is performed AFTER the server connect file is uploaded completely.

Actual behavior

The restart.txt is sent before the new file is ready

How to reproduce

Create a new Server Connect file within a node project.

The following output is produced:

Start upload for app/api/security/test.json
Uploading restart.txt to restart the NodeJS server ...
cd ok, cwd=/home/dev-01/domains/nodeworld1.uniqueideas.com/nodeapp            
16 bytes transferred                                              
Uploaded /app/api/security/test.json successfully    

Open the server connect file in a browser:

{"status":"404","message":"/api/security/test not found."}

Restart the node server (I use PM2 restart )

The file runs properly.

This might be related to the double save that sometimes is needed due to code formatting.

Just save again and see if the upload goes well now.

Yes, saving twice, or restarting manually resolves.

Actually, I take that back…I did another test.

With a simple Single login action, I changed the password and saved several times in a row. The new password was not valid until I restarted the node server.

@George Is this confirmed, or do you need some more examples/tests?

No we are all fine, will see if this get fixed when we fix the double save problem

@patrick This issue persists for me on 3.5.1. Saving a server connect file when using a remote node server, does not trigger a restart. My changes are only applied if I manually restart the remote node server.

actually we are moving away from auto upload on save to remote production targets. As single upload can break your live site.

you should just work on your development target and when everything is done - just change to the live production target and hit deploy so everything is synched and server restarted after that by uploading restart.txt as last.

Personally, I only do dev on a remote server that matches my production server. In other words, no local. For one thing, it prevents surprises when pushing to production, and also allows for incoming connections without ngrok, etc.

That being said, my target was set to Production instead of Development…but that has its own issues. I’ll open up a new ticket on that.