JusticeRage / ApkTrack

ApkTrack is an Android app which checks if updates for installed APKs are available.
GNU General Public License v3.0
123 stars 27 forks source link

ApkTrack fails to retrieve version information for some APKs from the net #112

Open Olf0 opened 7 years ago

Olf0 commented 7 years ago

ApkTrack always fails to read update information from the Öffi and Guardian Project: "No update information found" But the F-Droid client has no issues reading and parsing the repository data from the Guardian Project and Öffi. Tested with ApkTrack 2.1.1, 2.1.1b and the current test version.

JusticeRage commented 7 years ago

The web page previously used for the Guardian Project was not returning the right information. I will probably integrate support for their F-Droid repository directly into the ApkTrack Proxy as it's easier for me to update it than push an ApkTrack update every time something changes. As for Öffi, I haven't touched this one so I'll have to investigate.

Olf0 commented 7 years ago

I investigated the unreliability when querying APK sources for current APK versions a bit further with ApkTrack 2.1.1 (from f-droid):

So my impressions are:

Olf0 commented 7 years ago

And I retested this with APKtrack_test.apk (2017-09-04 22:51) to see, if commit 70531d6 is already in place: Obviously not, behaviour is unchanged, except for Öffi's version information is now successfully queryable from PlayStore (resulting in "Varies, depending on device"), but still not from Öffi or ApkTrack Proxy.

Edit: Oh, I see, commit 70531d6 was in the beta branch, the latest test version was likely built from the stable branch.

Olf0 commented 7 years ago

Retested with ApkTrack 2.1.2:

Hence, @JusticeRage, please reopen this issue, or declare these failures as "won't fix".

Olf0 commented 7 years ago

Side note: I wonder, why the release notes for ApkTrack 2.1.2 state, "Removed the Guardian Project, ...", while it is actually working well for most apps from there, which I have tested so far. Anyway, I am glad to see, that querying the Guardian Project is still supported in v2.1.2

Edit: After taking a (my first) look at main/assets/sources.json, I have a faint idea, how querying app metadata works in ApkTrack (also realising I was misled by the term "web scraping"). So it should have said, e.g. "Internally moved Guardian Project to ApkTrack Proxy.", but never mind: I don't think anybody else will stumble across this statement.

P.S.: Thank you for reopening this issue.

JusticeRage commented 7 years ago

I apologize for not following up on this earlier. Are you still facing these issues? I would like to solve this one next if it still need to be.

Regarding the Guardian Project, I reluctantly moved the scraping part to my proxy because of changes on their website that made scraping from the app (in particular, with a single query) quite difficult.

Olf0 commented 7 years ago

Hey @JusticeRage, no need to apologise, as:

I will check this issue the next couple of days (hopefully), knowing that you upgraded ApkTrack's proxy bandwidth lately.

Olf0 commented 7 years ago

Retested, still with ApkTrack 2.1.2 from F-Droid: Exactly the same results, as before.

I.E. I still cannot successfully query Orfox (installed from the Guardian Project repository, not available on F-Droid), no matter if ApkTrack proxy or Guardian Project is selected as source for its update information. All other Or* apps are fine (as before), as they are available from F-Droid, hence queryable selecting F-Droid. But also as before, a couple of other apps from the Guardian Project repository, which are not available on F-Droid (e.g. Location privacy) are queryable selecting Guardian Project and also ApkTrack Proxy!

Also the same (still negative) result for CSipSimple (via F-Droid and ApkTrack Proxy, installed from F-Droid) and VLC (F-Droid, although ApkTrack Proxy is working for it, but I attribute this to an oversight when testing the last time. Furthermore, the result from ApkTrack Proxy does not conform to my intention, as I use the VLC version built and signed by F-Droid on this device, but its original release is displayed, as available e.g. on Aptoide).

The only real difference I detected when repeating these tests, is that I2P (mentioned in "Edit 2" above) is now successfully queryable from F-Droid (only, but not ApkTrack Proxy and the I2P repository is not offered as a separate source for querying update information for it). But as I2P was a couple of times not available on F-Droid (it was a "on / off" thing for many weeks, also visible in the F-Droid client app), I attribute this (the former failure and having it working now) to that.

While carrying out these tests another time with the same results, I wondered, if you (or anybody else) can successfully query update information for Orfox and / or the other apps mentioned here?

JusticeRage commented 7 years ago

I've just push some code which takes new modifications to the F-Droid website into account. I have also tested the Guardian Project repository right this instant and was able to upgrade an outdated Orfox package successfully.

Olf0 commented 7 years ago

Thanks. Did you also create a new ApkTrack test version to try?

Side note(s):

Looking at sources.json, I wonder why sources of APKs, which provide a well defined XML format (e.g. F-Droid) are queried by webpage scraping, not by parsing their XML data? The webpage format is ever changing, resulting in regularly adapting ApkTrack to these changes (which is tedious). Only for I2P the repository data (in F-Droid's XML format) seems to be parsed directly, but is then filtered by RegExes for specific APKs (which appears to be counterintuitive on first sight, not looking for all APKs offered there). Note, while querying the I2P repository with ApkTrack was working well on multiple tests three weeks ago, it is currently not available (in general, i.e. also in the F-Droid client app) once again.

For other repositories offering well defined XML data for APKs hosted there (actually the same F-Droid format), the ApkTrack Proxy is used (e.g. Guardian Project). As the ApkTrack Proxy consumes quite some bandwidth and storage space (for which you pay), I also wonder why the XML data of these sources is not directly parsed by ApkTrack (hence moving the workload from the ApkTrack Proxy to the clients running ApkTrack)?

Olf0 commented 6 years ago

Retested with ApkTrack 2.1.3 from F-Droid: Still the same results, as before and originally with 2.1.2 (which was an enhancement over 2.1.1* used at the start of this issue description).

Please note that I did test ApkTrack's ability to retrieve update information for all APKs from specific sources (e.g. F-Droid, Guardian Project), not the download of APKs (which was noted to be enhanced in 2.1.3).

Olf0 commented 6 years ago

Rereading this, it does not make much sense to me:

@JusticeRage, any ideas how I may proceed with testing to make sure we are testing the same, behaviour and code (as usual, I installed per F-Droid client).

JusticeRage commented 6 years ago

I was thinking about this yesterday too. I was able to upgrade an app from F-Droid with no issue. I think the easiest way to go would be to mention for what app you have issues (let me know the current version, and expected version if you can).