Unable to Create restart.txt File

image

Getting this error every time I save any file. Can someone please help? @patrick @Teodor?

We have received this error as well. I am not 100%, but I think it is from not all files being uploaded to the server first. We seem to always get the error when first setting up a project, then after the next couple of tries it works for us. Sorry I can’t be more help.

Please show us the Project Settings for the remote.

As an illustration, this is what mine looks like

I have FTP (regular) and nothing in the “Remote Directory” field. Rest all is similar.
(Replying from phone, so no screenshot)

I have tried “Publish” multiple times. That also shows the same error message at the end when all other uploads have completed.

You need to create an app directory on the remote - Wappler requires this.

Then you need to configure the host to use the app directory as the root directory. All is explained in

I did read these docs. But it does not mention why a separate folder is needed?
The current setup works fine for me except for the restart.txt file.
Can you please share some info on why I need a separate folder?

Thats correct. I did get that. But I still don’t understamd WHY?
I have published my project without this, and it still works. Except for the restart.txt part.

Have a look at https://www.plesk.com/blog/product-technology/node-js-plesk-onyx/#:~:text=Log%20in%20to%20Plesk%2C%20go,and%20continue%20with%20the%20Node. where they are using hello-world as the root name. Wappler NodeJS has been designed to use app as the root name. However this can be changed if you prefer something else. IMHO, it is not worth your while to change the Wappler configuration.

The probable reason that you are getting the error is because the path to restart cannot be found, i.e. there is no app to be found.

I will reconfigure to use app folder… But if you look at the error message, the local path it shows is fine. The file is actually missing.

Moved everything to the /app folder. Website is running as earlier. But still seeing the same error.
FYI: The remote server is a sub-domain, with the FTP account having access only to the sub domain’s folder.

WAPPLER:

ON FILE SAVE:

CPANEL:

Can you please help @patrick ?

Can you view the files on your remote server? We had issues that Wappler would not create the tmp folder via ftp on the remote server. After multiple publishes, it would add it. Wappler sometimes has an issue of not placing the parent folder on a file via ftp.

Could you share a screenshot with your general project options? And your project folder structure?

The main.ejs in layout is not really in use. I had first configured the layout template format, but then switched to regular HTML to make it SPA.
The error was present in the layout template structure as well.

In the tmp folder shown in structure, I can see the restart.txt file getting created, but it just disappears before Wappler gets a chance to upload it after I save a file.

Additionally, here is the local development target settings that was created atuomatically:
image

I did check that. I even cleared out the remote folder completely and did a full publish. The tmp folder did get created in the remote directory but the restart.txt file error presented itself even at that point because it was deleted before Wappler got a chance to upload it.

I see now. Somehow a racing condition appear as restart.txt is being used also by the local server to restarts it self and then it deletes it.

However when you have selected a remote target to publish - the local server shouldn’t be running at all. Will investigate further.

1 Like

Thats exactly what I thought was happenning. But did not have the right words to put it. Hope to see a solution soon. :slightly_smiling_face: