You are here

Updater uninstalls apps that were not downloaded

8 posts / 0 new
Last post
Swwright
Offline
Last seen: 6 days 3 hours ago
Joined: 2008-07-17 20:25
Updater uninstalls apps that were not downloaded

There's a bug in the updater: it uninstalls apps even if there is not a replacement.

TO REPRODUCE THE PROBLEM:
1. Wait until there are two or more updates to be downloaded.
2. Begin the update process.
3. Cancel each of the downloads.
At the end of the downloads, the updater will uninstall all apps to be updated, then will discover the update files are not present and display an error for each of them. (Sure would be nice if the updater had a log, the error display vanished rather quickly.)

TO FIX THE PROBLEM:
The updater should NOT UNINSTALL any program until it has VERIFIED that the update file HAS BEEN DOWNLOADED and IS AVAILABLE.

BACKGROUND AND DETAILS:
My internet connection is DSL. At best it is 2.5 megabits per second, but it is often as slow as 50 kilobits per second. I may think I've got a good connection when I start something like a video or a PortableApps update, but then it becomes apparent that the throughput has become molasses in January. I typically stop the update and wait, take my laptop to work, and do the update there (gigabit ethernet, sweet!).

A couple of weeks ago, I found my Thunderbird was missing. I moved the Data folder elsewhere, installed Thunderbird again and moved the Data folder back. I thought it might have something to do with a recent canceled update, so I decided to keep an eye on the next update.

Today, I started the update and the internet connection went to practically zero. It had already started downloading something, so I hit the Cancel button, once for each app until all the downloads had been canceled. The updater proceeded to try to install everything it had been told to download. It uninstalled all the apps in the update session, and then was unable to update any of them. I looked in my Thunderbird folder (because Thunderbird had an update available) and found nothing but the Data folder, help.html, and ThunderbirdPortable.exe.

When I tried to repeat the update, there were no updates available. I checked Help > About > Apps, and none of the apps I had seen in the update list, were installed. So the uninstalls were done completely (except that the Data folder, help file, and XXXPortable.exe were left behind).

As far as my instance of PortableApps was concerned, none of the recent updates were installed on my laptop. I checked this by looking to see which apps were missing the App and Other folders.

You did get something right in all this. When I re-installed Thunderbird, I first backed up the Data folder elsewhere, but I did the install over the top of the carcass of the previous Thunderbird. Then I compared the saved copy with the original. Identical. The installer saw what looked like the remains of a prior ThunderbirdPortable and left the Data folder alone. Excellent. I'm presently reinstalling all the other apps that the updater trashed, and I don't have to worry about my settings.

John T. Haller
John T. Haller's picture
Offline
Last seen: 8 hours 57 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Can't Reproduce, Code Doesn't Work That Way

I followed your exact steps with Thunderbird and can't reproduce your error. If I cancel the download in the Updater, it simply displays an error that the download fails. Thunderbird Portable's install is untouched. The updater doesn't have any code in it to uninstall or delete any of the directories of Thunderbird Portable.

Sometimes, the impossible can become possible, if you're awesome!

Swwright
Offline
Last seen: 6 days 3 hours ago
Joined: 2008-07-17 20:25
Interesting! I'll try again

It wasn't just Thunderbird, there were about five apps that were missing their Apps and Other folders, nothing there but help.html, Data folder, and WhateverPortable.exe.

Since I know I can recover any PortableApp without data loss just by reinstalling it (having done so twice), I will try again next time I have updates to install. I'll make a list of what's being updated, cancel the downloads, and check the apps afterward to see if they got munched by the updater.

I can try this on my laptop and on my desktop at work. If the laptop apps get munched, and the desktop apps don't, then my problem is NOT the updater itself, and I'll have to figure out what is screwed up on my laptop to make this happen.

Swwright
Offline
Last seen: 6 days 3 hours ago
Joined: 2008-07-17 20:25
Tried again, did not fail

So I set up a camera to record exactly what happened, hit "Record", and did updates on my laptop (where the failure occurred before). Checked on-camera to make sure everything to be updated, had an App folder. Did the update, canceled each download as it started. Got a list of download errors, but did NOT see a bunch of updaters running. When I was all done, all apps to be updated still had their App folders, and selecting Update again gave the whole list of apps to update. This differs from the update session that engendered my complaint (updates ran even though there were no update files, and when I went to update again, there was nothing to update because they were all "uninstalled"). So I did the whole update again. Same results: the updater said that all downloads failed and everything still had its App folder.

Something happened to me, twice. Once I saw it happen, once I infer it happened because the result was the same: one app (Thunderbird in that case) lost its App folder. But now I cannot reproduce it myself, on the laptop where it happened before.

I have to conclude that, whatever happened, it was not a PortableApps bug.

Mr. Haller, thanks for risking your software to try to reproduce the problem. I'll keep an eye on things, but at least I know that if it ever occurs again, the faulty uninstall will not delete the Data folder, so I will be able to recover.

And I guess this issue can be closed.

Anton_D
Offline
Last seen: 10 months 3 days ago
Translator
Joined: 2018-01-20 12:43
The platform updater erased binaries on cancellation.

Right now, I just canceled the FFx Portable Update over the Platform Updater because of the slow connection. Afterward, I can't start FFx because the EXE is missing. I looked into the FFx Portable folder; there are only the portable starter, help HTML file and "Data" folder here. "Other" and "App" folders are gone. Don't think that this is a good scenario for the end user.

I can't update FFx anymore because the updater thinks I already have the current version. I have to manually download the installer.

Reading the comments in the topic, maybe cancel alone isn't the sole culprit here? We both have slow connections in this case, so maybe the connection speed is somehow also important? There is no data loss here, the "Data" folder is still here, but one can't fix this with the platform alone.

John T. Haller
John T. Haller's picture
Offline
Last seen: 8 hours 57 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Antivirus?

What antivirus are you running? The only thing I can think of is if the platform is downloading something and the end user cancels it. The updater would notice that it is incomplete since the hash doesn't match and delete it. But the antivirus is preventing it from being deleted. Would you please try this test updater to see if it solves the issue for you? Download this and place it in your PortableApps\PortableApps.com folder after backing up the current one. https://portableapps.com/downloads/temp/PortableAppsUpdater.exe

Sometimes, the impossible can become possible, if you're awesome!

Anton_D
Offline
Last seen: 10 months 3 days ago
Translator
Joined: 2018-01-20 12:43
Thank you for the reply.

Thank you for the reply. First and foremost, as a topic starter, I can't reproduce the issue even with an old updater. I downgraded the FFx and cancelled the download in the updater many times. With the old (26.2) one and the new one posted here. But the issue isn't here anymore. And I can update with the new one.

I just saw the issue and wanted to report it. And then I discovered this topic. And as a topic starter, I canceled the download because of the slow connection. Sometimes the connection to SourceForge is slow, so I cancel the download and start the update process again. But even if during the testing I got a slow connection and canceled the download, I can't reproduce the issue. I thought that the slow connection could cause this because it was reported by me and the topic starter, but it probably does not.

Your explanations look logical to me. On the uninstallation part of the update, you don't check if the cancel button was pressed or the hash of the file is OK. You just think that if the file is still here, everything worked fine, and you uninstall the application. But then there is no installation because the installation file is broken. Could we build more robust logic here? And shouldn't I see some of the rest of the partly downloaded file somewhere?

This reminds me of another issue that I previously reported. There, some DLLs of the FFx were locked. You also thought about antivirus (I use NOD32) or OS locking. So the FFx wasn't completely installed, and then a new version was installed, creating the non-working mix.

Better transaction handling would be better here, but it's probably complex. Situations like this are not easy to handle for "normal" users. How this could be diagnosed and what can be done? One either have to download and install the application manually. Or remove it from the folder, saving the data, and install it once again on the platform, restoring the data afterward. Not so easy.

Swwright
Offline
Last seen: 6 days 3 hours ago
Joined: 2008-07-17 20:25
Somebody else had this problem? Interesting . . .

My antivirus is Symantec Endpoint Protection, which is garbage but is required by company policy (I use my laptop at work often). But Symantec will typically leave some bit of malware for a week or two, then suddenly scream and shout that I have malware. More often, it screams and shouts about some perfectly harmless portable app or Cygwin program, or even something that MUST be a virus because Symantec has never seen it before (I kid you not, one of their "virus" criteria is "Have we ever seen this program before?"). End Symantrash rant.

I would be surprised to see any antimalware tool PREVENT deletion of a file. My experience is that they delete files you want to keep (as noted in the rant above).

Log in or register to post comments