Deploy to FTP/SFTP Server not working

Tested with “Hello World” Win10 AS 8.0.1.0. A full deploy works ok the first time the app is deployed. The Full Deploy will then fail at “Removing old deployment.” in the status line. Refresh Deploy (from the Menu or F7) works ok. Workaround: Removing the app folder from my server permits a full deploy again since the “Removing old deployment” procedure is not called. This could be a problem unique to my specific production computer or Server but hopefully a fix can be found.

Note: A Deploy to FTP/SFTP without an intervening Refresh Deploy is now required for the app to run in offline mode. If a Refresh Deploy is used and the device is in offline mode when the app doesn’t run and the Console has lots of errors. In version 6x of AS a Refresh Deploy would not prevent the app from running in offline mode as is now the case with versions 7 and 8 of AS.

See below partial log file:

2020-01-13 10:02:36,047 - 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

etc

It might be your server. I can Deploy and Refresh Deploy without issues to our test servers.

Offline Mode: What errors are you seeing? Can you give me a step by step to reproduce?

George:

You can see the errors in the error log from AS which is included in my post. Since it does not deploy at all there are no errors in the Console. When I delete the folder from my server it deploys without error. This did not happen in Version 7.x and before. There is clearly a switch in AS that is not reset after a full deploy. I’m sure someone there can find this switch without needing to reproduce this problem. Just look at your code that is executed in the "Removing old deployment”. Because the "Removing old deployment.” does not in fact remove the old deployment (the folder and all of the files are still there), I’m sure you, or someone at AS, can find the issue in this code.

Please have someone look at the code that is used for "Removing old deployment”.

Thanks, John

The code to remove the old deployment does not appear to have been changed in AppStudio 8.

Could you zip your project folder and send it to me? I’ll try deploying it to a server here to see if the same thing happens.

It’s not my project. Its the sample Hello World.

John

In that case, I have to believe the problem is specific to your server.

Not that is probably helps - but I deployed something about a week ago to FTP and had no issues at all.

There are two issue here:

  1. Hello World when deployed will not do another full deploy unless the folder for it is removed from my server first. Refresh deploys work ok.

  2. The other is apps will not run in offline mode if a refresh deploy is done after a full deploy. A full deploy is required again to run offline.

Neither of these are stoppers but needing to delete an app folder from my Server before I can do another full deploy for Hello World and all other apps is a bigger inconvenience. But still just an inconvenience.

Thanks, John

  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.