ImranR98 / Obtainium

Get Android app updates straight from the source.
https://obtainium.imranr.dev
GNU General Public License v3.0
6.06k stars 144 forks source link

Older app version triggering update(fdroid) #920

Open Samandamand opened 10 months ago

Samandamand commented 10 months ago

Obtainium will alert me I have updates for apps. I batch update and almost all of them fail because they are older versions than what is already installed. This seems to only be happening with apps from Fdroid. I currently have 13 apps showing they have updates which are older than I have installed.

Examples: https://drive.proton.me/urls/4KBRXGZWBC#bUxq-b4d6O_q https://drive.proton.me/urls/DVA57VZT24#Qoe4v-LGRm1_ https://drive.proton.me/urls/TMJ474QVF4#YoAwbkhaCgn5

GenericMale commented 10 months ago

F-Droid seems to have deleted a bunch of releases just now. Other examples: Gadgetbridge 0.76.0 -> 0.75.1 Drinkable 1.37.0 -> 1.36.2

I don't think this should be a normal use case. Best thing obtainium could do is skip those downgrades and show a warning instead of the error popup.

pled commented 10 months ago

Yes, another app trigering updates when already installed with higher version : OsmAnd~ It is a bit strange because 4.5.10 is installed on the smartphone (some days ago), Obtainium prompts for update with same version : obt1 But looking at details, I see 4.5.8 as "last version" while on f-froid, last version is 4.5.10 ? obt2

b02860de585071a2 commented 10 months ago

Same here, with 4-5 of my F-Droid apps.

Screenshot_20230920_163237.png

ImranR98 commented 10 months ago

Could you try disabling "Select suggested versionCode APK" and see if that fixes it? It was added recently; maybe the F-Droid API isn't stable for that prop.

b02860de585071a2 commented 10 months ago

Could you try disabling "Select suggested versionCode APK" and see if that fixes it? It was added recently; maybe the F-Droid API isn't stable for that prop.

No change for me - although I'm not the OP. I tried both "try selecting suggested versionCode APK" and "auto-select highest versionCode APK".

Disabling version detection (or setting an app to track-only) is the only real workaround that I've found.

pled commented 10 months ago

Could you try disabling "Select suggested versionCode APK" and see if that fixes it? It was added recently; maybe the F-Droid API isn't stable for that prop.

Well, this is only possible for new installation, so it does not solve the issue with current apps like OsmAnd in my case, and I don't want to uninstall it !

But I try with qBitController as a new app : having "Select suggested versionCode APK" selected or not makes no change after refresh, but no issue observed : version 0.8.1 is installed, as expected (this is the version available on f-droid) :

Screenshot_20230922-095532

But I notice the 0.8.2 version is available on github repository for that app ?? so potential rollback on f-droid ?

ImranR98 commented 9 months ago

But I notice the 0.8.2 version is available on github repository for that app ?? so potential rollback on f-droid ?

There's no guarantee they will be in sync - F-Droid has their own app build process.

pled commented 9 months ago

Yes, I asked this for FAT9L screenshot.

ImranR98 commented 9 months ago

Still haven't figured out what could be going on (or been able to reproduce the issue). In the case of Gadgetbridge and Drinkable, you @GenericMale mentioned that "F-Droid seems to have deleted a bunch of releases just now" - did you verify this was actually an issue on the F-Droid side?

GenericMale commented 9 months ago

Yeah i checked the latest version directly on the F-Droid site and it definitely was the older one. In this case not an issue with Obtainium not picking up the latest one as far as i could tell.

I had Drinkable and Gadgetbridge installed with Obtainium via F-Droid since a long time and didn't change the configuration and never installed them manually from any other source. So a newer version must have been on F-Droid at one point before. Obtainium alerted me of an "update" for the older version and after downloading gave me an error that a newer version is already installed.

Obviously i can't reproduce it now because the latest versions are on F-Droid again. I tried to check the f-droid forums, their issue tracker and reddit to see if there was a reason for the rollback of some releases but couldn't find anything.

teemue commented 9 months ago

Faced this problem after the latest app update. It's serious bug because it turns the app unusable.

doug8888 commented 9 months ago

Same problem here this morning.

DwainZwerg commented 9 months ago

This problem is not unique to F-Droid: Whenever there is a newer version on the device (even if they have the same signature) than the one in the source given in Obtainium, Obtainium thinks there is an update, although it is in fact a downgrade. Actually, I have the problem that I have installed the AuroraStore (with my own Google account and activated beta updates) and sometimes get updates there that have not yet arrived in Apkpure and therefore not yet in Obtainium, so Obtainium suggests a downgrade.

I would like Obtainium to be able to detect that 2023.39.1 (installed version) is a higher (and therefore newer) version than 2023.37.3.

DeWarner commented 9 months ago

I have had the same thing, in my case it was that the suggested version was the previous version. I fixed it by changing the settings for that app to ignore suggested version. Ideally the suggested version would be ignored depending on if the installed version is higher

DwainZwerg commented 9 months ago

But that's not the problem for me, because I have an even newer version than the package source even knows (I've already checked). So it doesn't matter which version I retrieve from the package source, it is always a version that is too old.

ImranR98 commented 9 months ago

Some of the comments above seem to be about completely different root issues, unrelated to the original comment:

1:

In my case it was that the suggested version was the previous version. I fixed it by changing the settings for that app to ignore suggested version.

"Use suggested version" was enabled by default because I thought F-Droid's suggestion would always be the highest version, not including beta or pre-releases. It has now been set to disabled by default so this shouldn't be an issue going forward (users who enable it manually will know what they're doing).

2:

Because I have an even newer version than the package source even knows (I've already checked). So it doesn't matter which version I retrieve from the package source, it is always a version that is too old.

This is intended behaviour. Obtainium sees a difference between your currently installed version and the latest version from the source, and interprets this as an update. We don't actually compare the version numbers to see which is higher for various reasons discussed in other issues (might search and link here later). If your app is already being updated externally, it might not be useful to add it to Obtainium. Or you could switch off version detection and mark it as updated manually.

3:

Yeah i checked the latest version directly on the F-Droid site and it definitely was the older one.

This was a problem with the F-Droid API - it seems like they added new versions of these apps and then removed them for a while. Hopefully this doesn't happen very often since it has only been reported by one user for a couple of apps. Not something Obtainium could do much about.

So just to clarify, for all 3 cases quoted above, the cause has either been fixed or is due to factors outside of the app. This issue is open to track the behaviour described by @Samandamand in their original comment (where 'QR Scanner', 'Antennapod', and 'Aurora Store' reported older "latest" versions). As far as I can tell it isn't explained by any of the 3 scenarios listed above (could have been due to case 3 - F-Droid API issue - but it's hard to know unless it happens again).

pled commented 9 months ago

And OsmAnd~ case as well, if I am correct.

ImranR98 commented 9 months ago

And OsmAnd~ case as well, if I am correct.

I saw that the "wrong version" for OsmAnd is the same as F-Droid's suggested version, so I assumed that it was like case 1. Looking through the comments, you didn't confirm if the toggle was off. Let me know if not.

pled commented 9 months ago

You are right. Disabling "Use suggested version" solved the issue. Initially, I was unable to find that option (I only looked at Optainium general parameters, not the "additional options" for an installed app. Sorry ! :-(

pressRtowin commented 5 months ago

This problem is not unique to F-Droid: Whenever there is a newer version on the device (even if they have the same signature) than the one in the source given in Obtainium, Obtainium thinks there is an update, although it is in fact a downgrade. Actually, I have the problem that I have installed the AuroraStore (with my own Google account and activated beta updates) and sometimes get updates there that have not yet arrived in Apkpure and therefore not yet in Obtainium, so Obtainium suggests a downgrade.

I would like Obtainium to be able to detect that 2023.39.1 (installed version) is a higher (and therefore newer) version than 2023.37.3.

I'm running into this too, and while I understand that it's actually the intended behavior, I feel that it shouldn't be, if only because it leads to a sub-optimal experience for less attentive users.

jayb-g commented 4 months ago

Indeed its inconvenient to have downgrade notifications for whatever reasons whether its F-Droid or Aurora it does happen. Obtanium should be able to check if currently installed version is higher or lower than the proposed update version. I think that would fix the issue for all/most of above cases without causing further complications.

In case a user really wants to downgrade or has to downgrade, he has to uninstall the app anyway so it doesn't seem to be useful to have downgrade notifications, although might be ok just as a notice/warning.