Bug: Not falling back on multiple download sites

Internally, we will soon be moving our FTP server, so we are updating our internal apps that depend on wyBuild, so that they will check the existing IP and the new server name.

The old FTP download site (app version 1.8) was:

ftp://XXX:YYY@192.168.0.10/%file%

The new FTP sites (v1.8.1) are

ftp://XXX:YYY@liservice1/%file%ftp://XXX:YYY@192.168.0.10/%file%

So we can correctly upgrade from 1.8 to 1.8.1, depending on the FTP server to be alive at 192.168.0.10. But when we temporarily disable the FTP server* and check for updates in 1.8.1, we get the following message:

Error trying to save file: Error downloading "ftp://XXX:YYY@192.168.0.10/wyserver.wys": The underlying connection was closed: An unexpected error occurred on a receive.

* "By disabling the FTP server," I believe that IT has disabled the XXX account. When I try to connect to the same site with FileZilla, the log says:

Status: Connecting to 192.168.0.10:21...Status: Connection established, waiting for welcome message...Error: Could not connect to server

In contrast, connecting to an IP address that is known to not be running an FTP server, FileZilla just says "Connection timed out".

The FTP connection was established and then rejected. wyBuild should be able to cope with this and completely fall back to just the liservice1 download site (which is indeed hosting the correct update files, to the best of my knowledge).

Upon further review, it appears that the real issue is that, on the client-side, client.wyc *does* get updated to version 1.8.1 (looking at the unzipped iuclient.iuc), but it *does not* pick up the new update site. This is particularly strange because looking at the contents of wyserver.wys on 192.168.0.10, we can see that both 192.168.0.10 and liservice1 are listed right at the top of the file.

If there's anything more you need from my end, I should be able to email it to you. Just let me know.

Hey Mark,

The server file (*.wys) download sites are stored in the client.wyc file. So if you add, remove, or change servers you must include the updated client.wyc file in your updates. This way the next time your user updates wyUpdate will be able to use the new server site as a backup.

Also, see "What does the "client.wyc" file contain?"

Does this make sense?

Hey Mark,

The server file (*.wys) download sites are stored in the client.wyc file. So if you add, remove, or change servers you must include the updated client.wyc file in your updates. This way the next time your user updates wyUpdate will be able to use the new server site as a backup.

Also, see "What does the "client.wyc" file contain?"

Does this make sense?

Actually, I am a little confused.

Reading the FAQ you linked a little more closely, I read the following statements in order:

> The "client.wyc" file contains ... The sites to find your server files (the server.wys file). For example: http://example.com/updates/server.wys

> You don't need to include the client.wyc or wyUpdate.exe in your updates.

The first two or three times I looked at it, I stopped reading there (the second statement was in bold). Finally, in another paragraph, the FAQ states "... if you change any of listed items above (other than the version number) then you should include the new "client.wyc" in your update."

I feel like this is a bit misleading in that the FAQ says clearly that you don't need to include client.wyc in updates, but then it says you "should" include it under some circumstances (not even "must" include).

Would it be too much to ask for some kind of notification that you need to include client.wyc when you modify those items? I would think that it would be simple enough to see that you are working from a .wyp file that has already been saved, and then if you change the product/company name or add/remove a download site, the user needs a little reminder that if the product has already been deployed that he must include client.wyc too for the next update. I would think that I couldn't have been the first person to run into this.

And so I'm clear, including client.wyc in the update just means that my v1.0 folder might include only App.exe, but my v1.1 folder would need to include both App.exe and client.wyc?

I feel like this is a bit misleading in that the FAQ says clearly that you don't need to include client.wyc in updates, but then it says you "should" include it under some circumstances (not even "must" include).

You're right, this is unclear. I've updated the page to clarify it a bit.

Would it be too much to ask for some kind of notification that you need to include client.wyc when you modify those items? I would think that it would be simple enough to see that you are working from a .wyp file that has already been saved, and then if you change the product/company name or add/remove a download site, the user needs a little reminder that if the product has already been deployed that he must include client.wyc too for the next update. I would think that I couldn't have been the first person to run into this.

You're absolutely right. We'll add the ability for wyBuild to keep track of changes and notify the user about including the client.wyc file.

And so I'm clear, including client.wyc in the update just means that my v1.0 folder might include only App.exe, but my v1.1 folder would need to include both App.exe and client.wyc?

Correct.

Also, the client.wyc file is a special case in wyBuild -- it's always added as a full file (it's never patched). That is, you never have to worry about wyUpdate trying (and potentially failing) to patch the client.wyc file. This is a long way of saying "just include the client.wyc with every new version of your software."

Thanks for reporting this, Mark.

I came back to discussing this topic with my coworker who came across it originally, and I found myself a bit confused again.

For version 1.0 of my app, the Files & Folders would just be App.exe. Later on, I want to release version 1.1, which is only an update to App.exe, but for the sake of argument, I want to include client.wyc in the update as well.

Going through the left-hand menu on wyBuild, I would normally make my update notes for 1.1, then I would add the new v1.1 App.exe, and then "Build wyUpdate & updates" for v1.1. Now that I have a client.wyc that is specifically tailored to v1.1, how do I include that in the update?

Do I have to go back to "Files & Folders" and add the newly-built client.wyc to "Your program's folder", even though the update has already been generated? Intuitively, adding client.wyc to the folder would seem to indicate that I need to build updates one more time... but if we do that, we should get a new client.wyc and have to repeat the cycle infinitely.

I specifically looked through the walkthrough for this topic, but I didn't see any mention of it.

Hey Mark,

The client.wyc file doesn't contain a list of files. It contains the version numbers, the theme images, the product info (name, company name), signing info, the location of the self update server file, and the location of your product's server file.

So, the correct order of building would be like this:

- Add the latest version tab. Add your files, registry, etc.- Build wyUpdate (and include the client.wyc file in the latest version)- Build the updates- Build your installer

Does this clarify things?

Okay, I think I get it now.

Here is what I think confused me the most: Typically you would just go down the entire left-hand side in order (and this works perfectly for the majority of situations, I'm sure). But when we want to add a new download site in expectation that the original site is going to be deprecated, we need to perform the steps "out of order" with respect to the order of presentation.

Following the order as laid out, we have:

1. General Information2. Theme3. Languages-----------4. Update Information5. Files & Folders6. Registry Changes7. Update Actions----------8. Download Sites9. Build wyUpdate & Updates 9a. Build wyUpdate 9b. Build Updates10. Upload your Updates

For the very first update, you generally go straight through 1-10. Then on your next update, you generally would do 4-7, 9, 10. Normally 8 is skipped because the download sites generally do not change.

So when our download site WAS changing, we did 4-10 again, in order. It should have been 4-7, 8, 9a, 5 , 9b, 10. Or 8, 9a, 4-7, 9b, 10 would probably work just as well. (And of course, in both paths, we are adding the newly built client.wyc in Step 5.)

Hopefully my thought process was clear and can be helpful to others coming across this issue. I think my problem was a lack of knowledge about client.wyc's exact purpose. Keeping in mind that, with respect to 9b, it is just another file, then the solution becomes quite clear for me.