Deploy to FTP/SFTP Server not working

  1. Just tried deploying HelloWorld to a server here again. It worked fine.

  2. What errors are you seeing? Can you give me a step by step to reproduce?

I just uninstalled 8.0.1.0 and installed 7.4.2.0, started a new project with the sample Hello World, did a full deploy multiple times without issue.

I, just now again, reinstalled 8.0.1.0 and same problem. If the folder for Hello World is already on the server the full deploy stops at the Removing Old App. I also tried deleting one folder at a time below Hello World but only when all folders were deleted would it do a full deploy. I also made sure all permissions for folders and files were set to 777. Something different about 7x vs 8x. Below is the AS logfile.

Plus take a look at this line in particular:

“ftplib.error_perm: 550 Could not delete code.js: No such file or directory”

This seems a bit strange because code.js IS in the Hello World Directory.

2020-01-14 09:51:42,246 - root - ERROR - An exception has occurred!
Traceback (most recent call last):
  File "IDEController.py", line 1297, in FtpRmTree
  File "ftplib.py", line 631, in cwd
  File "ftplib.py", line 278, in voidcmd
  File "ftplib.py", line 251, in voidresp
  File "ftplib.py", line 246, in getresp
ftplib.error_perm: 550 Can't change directory to code.js: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "MainFrame.py", line 2701, in OnMenuRunDeploySFTP
  File "MainFrame.py", line 1858, in OnMenuRunDeployMenu
  File "IDEController.py", line 65, in wrapper
  File "IDEController.py", line 1418, in FtpDeploy
  File "IDEController.py", line 1301, in FtpRmTree
  File "ftplib.py", line 614, in delete
  File "ftplib.py", line 273, in sendcmd
  File "ftplib.py", line 246, in getresp
ftplib.error_perm: 550 Could not delete code.js: No such file or directory
2020-01-14 09:54:13,060 - root - ERROR - An exception has occurred!
Traceback (most recent call last):
  File "IDEController.py", line 1297, in FtpRmTree
  File "ftplib.py", line 631, in cwd
  File "ftplib.py", line 278, in voidcmd
  File "ftplib.py", line 251, in voidresp
  File "ftplib.py", line 246, in getresp
ftplib.error_perm: 550 Can't change directory to code.js: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "MainFrame.py", line 2701, in OnMenuRunDeploySFTP
  File "MainFrame.py", line 1858, in OnMenuRunDeployMenu
  File "IDEController.py", line 65, in wrapper
  File "IDEController.py", line 1418, in FtpDeploy
  File "IDEController.py", line 1301, in FtpRmTree
  File "ftplib.py", line 614, in delete
  File "ftplib.py", line 273, in sendcmd
  File "ftplib.py", line 246, in getresp
ftplib.error_perm: 550 Could not delete code.js: No such file or directory

In AppStudio Preferences, are you using FTP or SFTP?

I’m using FTP but my Domain is https.

John

Any chance you can DM credentials so I can deploy to your server?

There might be a change in AppStudio that contributes to this - nearly all the libraries we use were updated. It could be a change in one of those libraries, in which case, there isn’t much which can be done.

ftp is not widely used anymore. Security requirements have rendered it obsolete. Can you use sftp instead? That might help.

Rather not give credentials. As to sftp not sure how to make that work. My Servier Domain is an https, secure server (after deploying, a url would look like https:/prograsa.com/hw/index.html), but when I run Filezilla I use ftp, don’t know how to make sftp work. I use ftp also in the Preferences of AS. I could contact BlueHost to see if they can get me connected using Filezilla and sftp. Don’t have time to do this right now.

John

FYI: I was testing F5 to deploy locally. I thought that F5 was failing because AS was not activating the browser to run http://127.0.0.1:2000/Hello World unless the tab with this url was removed first. But it actually was upding this url, I just didn’t notice this because of this odd behavior. This may or may not be related to the issue of needing to delete the folder on my server before a full deploy. But probably not.

I have exactly the same issue here. 8.1.0.5 update has not resolved anything.
I was wondering George if you can’t find the problem could you make AS remember where it last deployed in a previous session to enable us to use refresh deploy instead of having to run a full deploy, let it fail, then do refresh deploy?

The only change in 8.1.0.5 was to keep up with the latest updates to the VoltBuilder server.

I’m not sure when the problem using F5 and then not being able to do an F7 happened. I thought it actually started in version 7.x, but cannot be sure. My workaround is to take tape and cover the F5 key as
a reminder not to press it accidentally. If I do, then I have to both remove the directory from my server and then do a full deploy.

John

Just the two of us with this issue?

I’m having a similar problem for months:
It seems like it depends if the webserver supports the RMD or DELE command for a folder, mine doesn’t. TotalCommander shows in the log those details, but their FTP detects the errors and deletes each file within the folder. It would be great if George could implement a similar logic, so I don’t have to use my own script to delete the folder before starting a new deployment.

We use standard libraries for this. For FTP, we use the latest version of ftplib:
https://docs.python.org/3/library/ftplib.html

We encourage you to use SFTP instead. FTP was not designed to be a secure protocol, and has many security weaknesses.

Changing the protocol to sftp works for me. Thank you.

Still be good if when I load a project it remembered where I deployed it to when I last had it open so I could just continue with Refresh deploy rather than doing a full deploy.

I noticed when I do a ‘Full deploy’ now it is set to sftp that it removes all the contents of the directory on the server, not just the files in the manifest. eg All data files created by my users will be deleted.

Is this expected? Anyone else experience this?

Yes, this correct. It deletes the folder before uploading the new version.

Can I suggest a change to this procedure? It’s a bit of a hassle having to restore all the client data at a full deploy. Can it be changed to not delete all files or give the option to refresh deploy without the need to full deploy first? Currently I have set it back to ftp and not sftp. That way I full deploy then it fails then allows me to refresh deploy.

If we didn’t do a delete first on a full deploy, files could be left over from the previous deploy which are obsolete or incorrect.

You’re probably better off keeping your app and your client data separate (it seems like good housekeeping to do so in any case).

Will it delete subfolders? Maybe a checkbox in preferences whether it should delete old version or not?

Yes, it deletes everything.