Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Unable to obtain builds from FTP server using the FTP extension
-
Hello, I am trying to use the buildmaster FTP extension to get builds from an FTP server but i am having the error
Unhandled exception: System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)Can someone help please
-
Hello; this error seems to be indicating that your FTP server is providing dates in an unexpected / non-standardized format.
https://github.com/Inedo/inedox-ftp/blob/master/FTP/InedoExtension/FtpWebRequestExtensions.cs#L70
It should be easy to fix the extension, if we can see the data...
Could you provide us with the dates that you're seeing?
Thanks.
Alana
-
@atripp Hi, that's the thing. I don't see the data which the FTP extension is getting and rejecting. I tried to do a tcpdump but couldn't find anything useful. When check the listing manually on the FTP server, we have the below:
The date format there will be MM-DD-YY. Could this be the problem?
-
By the way, I tried simulating using below code which from the source code it should be the same thing buildmaster is trying to do.
The code could run successfully without issues.
-
What version of BuildMaster are you running? Also, what version of the FTP extension do you have installed?
Thanks,
Rich
-
@rhessinger FTP extension version: 1.0.0
Buildmaster version: 6.2.17
-
Let me dig into this a bit and see if I can see anything that could be going on.
Thanks,
Rich
-
I'm not seeing anything that would cause this. I created a CI version of the FTP extension that includes more logging around the Date parsing. Would you be able to install version 1.0.1-CI.2? You can follow our documentation for installing extensions manually to install this.
Once you have this installed. Could you please repost the error output?
Thanks,
Rich
-
Hi @rhessinger,
I followed the steps mentioned but still cannot find this new version installed in the list of extensions. So i have not been able to install it.
-
Did you download the extension and copy it to the
Extensions.ExtensionsPath
folder manually or did you updateExtensions.UpdateFeedUrl
to point to the PreRelease Extensions URL? In either case, try restarting BuildMasters site and service. If you did the manual copy way, then upon restart, you should see the version change. If you updated the feed URL, then you should see an update available for your Ftp extension.Thanks,
Rich
-
Hello @rhessinger
I managed to install it by update the feedurl.
I tried again with this version and the error now contains some information, see below screenshot.
-
Are the server BuildMaster is running on and the FTP server using a different culture? For example, is Buildmaster
en-EU
and the FTP serveren-US
? It looks like the FTP server is sending the date asM-d-yy
, but BuildMaster is expectingd-M-yy
.Thanks,
Rich
-
Hi @rhessinger ,
Buildmaster is running on windows 10 and the FTP is running on windows 7. How can we check the culture you are talking about and how to change if possible.
-
The best way is to just adjust the date/time on each and tell me what timezone is selected in each?
Thanks,
Rich
-
Hello @rhessinger I have adjusted date format on the machine running buildmaster from dd/mm/yyyy to mm/dd/yy, yet issue is still there.
Timezone on buildmaster machine is UTC+01:00 West central Africa. I don't have access to the computer running the FTP service.
![0_1600697237180_20582c6f-6a1c-4294-acb3-9075110cc524-image.png](Uploading 100%)
-
I did some searching around and it seems like there are a bunch of users that have the same problem in Windows 7. It looks like the FTP server is not using the system's TimeZone and I could not find any way to set it. Unfortunately FTP does not give us a way to determine what timezone use dynamically.
I have created a new CI build, 1.0.1-CI.4, that gives you the ability to use the current date and time as the file modifed date when BuildMaster cannot parse it from the FTP server. You can enable it on the FTP operation by going to the
Advanced
tab and set the property ofUse current date on error
to true.Could you please update the extension, set the
Use current date on error
property, and give that a try?Thanks,
Rich
-
Hello @rhessinger,
It is working fine now, error no longer appears and it is downloading the needed files.
Thank you for the support.
So what's next, will you make this FTP build an official release?
-
Thanks for testing this out! I will get it released as a production version today!
Thanks,
Rich