Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced Version Detection (continuation of #132) #136

Closed
S-Sajith opened this issue Dec 5, 2022 · 27 comments
Closed

Enhanced Version Detection (continuation of #132) #136

S-Sajith opened this issue Dec 5, 2022 · 27 comments
Labels
enhancement New feature or request high priority This issue is a high priority

Comments

@S-Sajith
Copy link

S-Sajith commented Dec 5, 2022

  • I'm encountering this bug after updating to v0.8.2 of obtainium , this bug didn't exist before
  • This bug seems to happen only when the app version number has ".ose" at the end of the version number
  • Updating the app again doesn't fix the issue , removing and re-adding the app to the list also doesn't seem to fix the issue.
  • I have attached screenshots below for reference
    Screenshot_20221205-124935
    Screenshot_20221205-124927
    Screenshot_20221205-124924
@NathanC
Copy link

NathanC commented Dec 5, 2022

Same here. For me, it seems to have changed how it parses "v" as part of version string. e.g. it tells me to update from v1.0 to 1.0, even though there's no difference.

@BabyOilJohnson
Copy link

Just got the same issue, to update app from 1.0 to v1.0.

@ImranR98 ImranR98 added bug Something isn't working high priority This issue is a high priority labels Dec 5, 2022
@S7venLights
Copy link

I also had a number of apps tell me they need updates after installing Obtaonium 0.8.2 even though they were up to date. But re-downloading them seems to rectify the issue.

@Baker0o7
Copy link

Baker0o7 commented Dec 5, 2022

Same issue too

@ImranR98
Copy link
Owner

ImranR98 commented Dec 5, 2022

This should be fixed in the new release (hopefully, only did minimal testing): https://github.com/ImranR98/Obtainium/releases/tag/v0.8.3-beta

For apps already affected, you'll need to manually mark as updated or re-install. But it shouldn't happen again after that.

@bluefly000
Copy link
Contributor

I update Obtainium to 0.8.3 and the version detection in the Obtainium repository seems to be wrong.

Screenshot_20221206-061905

@NathanC
Copy link

NathanC commented Dec 5, 2022

@ImranR98 the new version does seem to have different version parsing behavior, though it looks like only a subset of the ones I manually updated on the last version (stripping off version info) showed up as needing update after upgrading Obtainium to v0.8.3-beta.

Interestingly enough, Obtainium flagged itself as one of the ones needing update after the v0.8.3 update, adding the -beta suffix back on.

Mind giving a tl;dr; of what happened here? Seems like just parsing of version strings, but curious for the highlevel of what happened.

@ImranR98
Copy link
Owner

ImranR98 commented Dec 5, 2022

Originally this was only meant to work with Apps that followed a "standard" versioning system, like xx.yy.zz (see the first few comments). I tried to act smart and add support for other common ones like -beta, -beta05, etc. and ended up running into these edge cases and bugs. I'm changing some things and will take extra time to test it, hopefully the next release will have all these issues ironed out.

@ImranR98
Copy link
Owner

ImranR98 commented Dec 6, 2022

Everything should now work fine with the latest version 0.8.4, but I'm leaving this issue open as the current implementation of version detection only works for a minority of Apps. Will continue trying to extend this support.

@BabyOilJohnson
Copy link

In the latest update almost everything got fixed, but leaving one behind (in my case).
Screenshot_20221206-112231

@S7venLights
Copy link

Obtainium 0.8.4 still presents this issue with:
https://github.com/tw-hx/Signal-Android

@NathanC
Copy link

NathanC commented Dec 6, 2022

In 0.8.4, one of my apps is still consistently broken. It doesn't seem to update at all when I press update— the message goes away for a little while, then comes back and its the same:

Screenshot

This doesn't map to the GitHub version name: https://github.com/AnySoftKeyboard/AnySoftKeyboard/releases

Thanks for triaging this, btw! It's a fairly serious issue, but these things happen, and I appreciate your work on it. Normalizing GitHub release versions sounds like hard problem.

@S7venLights
Copy link

S7venLights commented Dec 6, 2022

Just wondering, was the change from the old way of, getting version numbers by downloading the APK, necessary?
Seemed to work well before and obviously if the change is good in the long run then good. I'm just not currently clear what the advantage of the new method is?

@NathanC
Copy link

NathanC commented Dec 6, 2022

I'd agree with S7ven. It seems like the most reliable system would be version number in APK + date of artifact release on GitHub, segmented by if it's flagged as a pre-release. It might save you a lot of headache to just use that, and have the GitHub release title be only on the UI layer. APKs would only need to be downloaded when a new release is cut.

GitHub release versions don't seem to follow a consistent pattern from what I've seen.

@ImranR98
Copy link
Owner

ImranR98 commented Dec 8, 2022

Yeah I keep finding weird edge cases, and the detection turns out to be broken in the background process (since the plugin doesn't work) which means background update checking might not work right.
So this method has turned out to be a lot less simple/reliable than I thought, and has been completely removed in the latest version: https://github.com/ImranR98/Obtainium/releases/tag/v0.8.6-beta
I'll try coming up with a different approach at some point.

The issue with using release dates instead of versions is that some sources may not provide release dates - versions are the only thing we can reasonably expect to always have access to.

@NathanC
Copy link

NathanC commented Dec 8, 2022

I meant the date of the github release itself. e.g., for Wikpedia, they use a single release channel called "latest" which they update periodically, but it was updated 12 minutes ago and shows that in the browser (and presumably in the API). The date of the last release could be cached locally, and when the release shows a newer date it could be inferred to be a newer release (which could be confirmed by downloading the APK and looking at versionCode and versionName).

I don't know much about android versioning though, so this may not be useful. Thanks for the quick turnaround on all the recent bug fixes!

@ImranR98
Copy link
Owner

ImranR98 commented Dec 8, 2022

Right now, all apps from all sources have the same schema and use the same code for update checking, etc. Customizing these things on a per-source basis could get really messy (GitHub may provide release dates/times in the API, but others may not).

It's also not clear that using dates would fix anything. The original issue is that when an App version changes externally (the user updates something manually or through an app store), these changes are not picked up by Obtainium which only knows about its own internal versions being tracked. We need a way of converting between the "real" version of a given app (seen in the OS settings) to/from the "fake" version tracked internally by Obtainium; right now that internal version is the version string from the source; I'm not sure how switching to a datetime string would help.

@S7venLights
Copy link

People just shouldn't do updates outside of Obtainium if that's what they're using. 😅

@C8opmBM
Copy link

C8opmBM commented Dec 8, 2022

I have all my apps from github, half of them (about 15) show as having updates available.
Need to mark each as having been already updated.
I do not know what broke this functionality, I haven't had this issue a week or so ago.

A fix please, it driving me nuts.
Pixel 6, android 13, latest obtainium.
Thank you!

People just shouldn't do updates outside of Obtainium if that's what they're using. 😅

I only update via obtainium. I unistalled the apps (from f-droid) and using obtainium exclusively.

@S7venLights
Copy link

S7venLights commented Dec 8, 2022

I also had that happen once more with the new version. It's because he switched back to the old method of checking app versions which is less buggy. So it shouldn't happen anymore after this time.
If it does try update (re-download) them instead of mark as updated and it will stop happening

@ImranR98 ImranR98 changed the title Getting update available prompt on certain apps even though app is updated to latest version Enhanced Version Detection (continuation of #132) Dec 8, 2022
@ImranR98 ImranR98 added enhancement New feature or request and removed bug Something isn't working labels Dec 8, 2022
@ImranR98
Copy link
Owner

ImranR98 commented Dec 9, 2022

Trying a simpler approach; seems to work fine at least with the Apps mentioned in this thread, but needs more testing. Would appreciate any testing and feedback:

app-x86_64-release.zip
app-release.zip
app-armeabi-v7a-release.zip
app-arm64-v8a-release.zip

Note: Remove Obtainium from the Apps list so it doesn't try to downgrade.

@S7venLights
Copy link

No issues with above test version so far

@ImranR98
Copy link
Owner

ImranR98 commented Dec 9, 2022

Looks like the above version has issues in the background update checking task. Will look into it later.

@S7venLights
Copy link

Oh yeah, I can confirm I'm probably getting the same behavior

@ImranR98
Copy link
Owner

@S7venLights
Copy link

Will test… For now, I have noticed the 'please wait' after download isn't showing anymore…

@ImranR98
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority This issue is a high priority
Projects
None yet
Development

No branches or pull requests

8 participants