View Full Version : User was able to detect that there's an update, but fails to download from the HTTP
Elleah
06-13-2005, 03:08 AM
Hi!
I just want to ask what would be the possible cause when user was able to detect that there's an update, but fails to download from the HTTP?
A snippet of my script below:
HTTP.Download("http://www.myserver.com/tu2/".._UpdateFile, _SourceFolder.."\\".._FullFile, MODE_BINARY, 60, 80, nil, nil, HTTPDownloadCallback);
screen_globals.DownloadResult = Application.GetLastError();
Please note that user doesn't use any proxy server settings.
Thanks for the help, in advance.
Brett
06-13-2005, 08:50 AM
What error code are you getting? Call Application.GetLastError() right after the HTTP action and see what it says.
Hi Elleah,
On what operating system are people having this problem? Does it seem to only happen on one version of Windows? Or does it seem to happen on all of them?
What error code are you getting? You might try using the HTTP.GetHTTPErrorInfo() action to learn more about the failure:
if (Application.GetLastError() ~= 0) then
local http_error = HTTP.GetHTTPErrorInfo();
local error_text = http_error.Message .. "\r\nServer Status: " .. http_error.Status;
Dialog.Message("HTTP Error: " .. http_error.Number, error_text, MB_OK, MB_ICONEXCLAMATION);
end
Since the user is able to detect that there is an update, it means that they are able to connect to the Internet (unless you are using a LAN based server). If they can connect to the Internet it is likely that the problem has nothing to do with proxy settings, which are not specified for TrueUpdate servers.
Just from looking at your code I would say that the problem may arise from _UpdateFile or _FullFile being set incorrectly. How are these values being set?
Elleah
06-13-2005, 09:10 PM
Hi Mark,
I am still waiting for the log file from our user, but there's a typo error on the sample script I've given you, _FullFile should also be _UpdateFile, as below:
HTTP.Download("http://www.myserver.com/tu2/".._UpdateFile, _SourceFolder.."\\".._UpdateFile, MODE_BINARY, 60, 80, nil, nil, HTTPDownloadCallback);
However, _UpdateFile is being set as follow:
g_UpdateFile = "MyUpdate.zip";
_UpdateFile = g_UpdateFile;
I will try to use the HTTP.GetHTTPErrorInfo(); as per your advise.
Thanks.
Elleah
06-14-2005, 02:19 AM
Hi Mark,
I have attached the IBP Update log file of our user for your reference. I am just puzzle with this error "An error occurred when trying to download the server file. : The incorrect status was returned by the server. (3614)". Would it mean that the user wasn't able to get a server file from the list?
[06/14/2005 10:18:35] Success Display screen: Welcome
[06/14/2005 10:18:38] Success Display screen: Check for Update
[06/14/2005 10:19:05] Error An error occurred when trying to download the server file. : The incorrect status was returned by the server. (3614)
[06/14/2005 10:19:05] Error Incorrect HTTP status returned by server: 407 (3614)
[06/14/2005 10:19:05] Error Script: Check for Update > On Start, Line 116 (3614)
[06/14/2005 10:19:06] Success Language set: Primary = 9, Secondary = 1
[06/14/2005 10:19:06] Error Script: GetVersionNo, Line 39 (2501)
[06/14/2005 10:38:13] Error Script: Server Script, Line 107: attempt to compare nil with string (-1)
[06/14/2005 10:38:14] Error Script: Client Script, Line 107 (3602)
[06/14/2005 10:38:14] Success Run client data event: Client Script
Please advise. What is the possible reason behind this problem?
Thanks,
Elleah
Hi Elleah,
If you take a look at the log file you can see that five things are happening:
1) TrueUpdate is failing to connect to one of your TrueUpdate servers because the server is returning incorrect status, i.e. a 407 error. A 407 error means that the server requires proxy authentication, i.e. a Proxy username and a Proxy password.
Are these users required to enter a username and password every time they start Internet Explorer?
2) After failing to connect to one of the TrueUpdate servers, TureUpdate is able to connect to a TrueUpdate server, which you can see from the line:
[06/14/2005 10:19:06] Success Language set: Primary = 9, Secondary = 1
3) Then when the server script is running error 2501 ("Failed to create the HTTP connection.") occurs. This error means that the Internet session was unable to create an Internet connection. As with error 2502, this error occurs very early in the Download process. More information on this error should be available via the HTTP.GetHTTPErrorInfo() action.
Try using the HTTP.GetHTTPErrorInfo() as I instructed below around line 39 on your GetVersionNo to determine exactly why this is failing. You can either send this information to the log file, or display it to the user for further debugging.
4) You are attempting to access a nil value on line 107 of your Server Script, which probably means that either a variable is not being set properly, or an action is returning a nil value and you are not taking that into account.
5) Your update does not fail every time, before the sixth your update ran properly with no errors. After the sixth you began to get errors in your Status Dialog script. On the seventh your user was able to perform the update properly, and it appears as though the update succeeded until the fourteenth, at which time the DAT file was updated and you began to get your current errors.
It is difficult for me to be able to see exactly why these errors are occurring with your update. I would suggest that you make the changes that I have outlined I the other post regarding your callback function, and then use HTTP.GetHTTPErrorInfo() in your project to log more error information (i.e. TrueUpdate.WriteToLogFile() or Dialog.Message(), if using the Dialog.Message() approach be sure to get your user to record all of the error information). After that, get your user to re-test the update and send you the log file again, and any other error information.
Elleah
06-15-2005, 03:44 AM
Hi Mark,
Thanks for making things clear for me. I am still confirming with the user if they are using a username and password when accessing the IE.
But for now, as I have reviewed the log file and my script, I came to notice that although the user fails to connect to the first server list which is the HTTP, and causes the error "An error occurred when trying to download the server file. The incorrect status was returned by the server (3614)", user was still able to connect to the other server from the list which is the FTP (my second server). As I've checked my script in the GetVersionNo script, I have placed a wrong URL for FTP in line 39, which causes the user to fail in creating a connection and giving an error 2501. Instead of using the complete URL "ftp://ftp.myserver.com/tu2/".._VersionNo, I've used "ftp.myserver.com".._VersionNo (where _VersionNo = version.ini). Being unable to retrieve from the GetVersionNo script produces a nil value for the variables that corresponds for the latest version no from version.ini file. This cause the user to get an error "Server Script, Line 107: attempt to compare nil with string (-1)". Do you think this is also the reason behind those errors?
Why I was given an error 2501 which is "failed to create HTTP connection", wherein I have an FTP failure connection?
But I am really puzzled why our user can download http://www.myserver.com/tu2/test.zip and cannot connect using the HTTP server from my server lists.
I am a bit confuse with your explanation in your 5th findings. What sixth, seventh and fourteenth are you refering to?
Thanks,
Elleah
Elleah
06-15-2005, 05:07 AM
Hi Mark,
Our user confirm that a login is required when they access the IE. The user is using 'MIMEsweeper for Web' from Clearswift.com which is a HTTP/FTP security system. When the user opens IE it triggers a login screen. However, TU2 is not able to trigger that and the user has no opportunity to login. If the user first opens IE and login, then run TU2 the result is the same error.
Do you have any suggestion if this is the case? How will I able to connect using HTTP then?
Thanks,
Elleah
Hi Elleah,
It sounds probable that what you mentioned is the cause of your errors.
As far as the FTP/HTTP error is concerned, the same error code is used for both HTTP and FTP. I will submit a suggestion to make this more obvious in our help file.
In my fifth finding, I was simply revering to the dates in the log file.
I'm not sure why the user cannot connect to your HTTP server and then apparently download the ZIP file via HTTP. Is it possible that they are downloading the file via FTP?
As far as your users who are using "MIMEsweeper for Web" we have been working on a solution for you. If you are interested, we can send you a debug build of the TrueUpdate client, which you can then give to your user and have them test it.
What will happen with this debug build is a dialog should come up if proxy authentication is required. Then TrueUpdate will use those settings.
If you would like to test this, please email me at: mark@indigorose.com
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.