Tobi823 / ffupdater

FFUpdater: Updater for privacy friendly browser
https://f-droid.org/en/packages/de.marmaro.krt.ffupdater
GNU General Public License v3.0
656 stars 32 forks source link

Glitch for FF Focus v93.0 vs v93.0.đť’™ #75

Closed TPS closed 2 years ago

TPS commented 3 years ago

@Tobi823 The recent version for Firefox Focus is 93.0 (per app info), which I actually installed via FFUpdater. However, over 2 different devices (Android 8 32-bit & Android 11 64-bit), FFUpdater continually finds & redownloads the same version (which it designates 93.0‍.0) until I force-quit it. Could you take a look?

Tobi823 commented 3 years ago

I can reproduce this issue. Version "93.0.0" is available but the installed app has the version "93.0". Firefox Focus and Firefox Klar are effected.

The real bug is that the downloaded APK files from https://firefox-ci-tc.services.mozilla.com/tasks/index/project.mobile.focus.release/latest have the wrong version (93.0 instead of 93.0.0).

But I can implement a workaround in FFUpdater.

TPS commented 3 years ago

Thanks very much. It occurs to me, in similar situations in future for any Firefox, this might happen, but this fix looks very specific, so would be obsolete by next Ff Focus/Klar update. Is that intentional?

Tobi823 commented 3 years ago

but this fix looks very specific, so would be obsolete by next Ff Focus/Klar update. Is that intentional?

Yes, this is intentional.

It's very difficult to write an version comparator (which compares the installed version + the available version and returns if they are different [different == not the latest version is installed == update is available]):

(In my opinion, false-positives [app thinks that an update is available but it isn't] are better than false-negatives [app thinks that no updates are available, but in reality they are]. I don't want that a user misses an important security update.)

I hope that next Firefox Focus/Klar version will have the correct version name.

TPS commented 3 years ago

v91.4.0 just dropped, which both Android & FFUpdater consider a later version, so everything updated correctly. Thanks again! 🙇🏾‍♂️

Tobi823 commented 3 years ago

Thanks :)

Tobi823 commented 3 years ago

and it happen again

Tobi823 commented 3 years ago

I am unsure how to solve the problem.

The problem is that when Firefox Focus and Firefox Clear are installed, the apps return a different version than the one stored on the https://firefox-ci-tc.services.mozilla.com/tasks/index/project.mobile.focus.release/latest website.

For example:

The real bug is, that these APK files have the wrong version name. There is nothing (beside creating a bug report) I can do to really fix this issue - I can only mitigate the problem.

My current solution is that, when in doubt, I'd rather show one too many update notifications than too few. What do you think? Would you do anything differently?

TPS commented 3 years ago

I filed a proper bug report @ https://github.com/mozilla-mobile/focus-android/issues/5337. Maybe they'll fix (consistent to upstream full versions) or propagate (perhaps they're testing some privacy feature to put into full versions eventually)? Based on any result from there, maybe you can tell whether to do something specific.

TPS commented 3 years ago

Ff Focus/Klar v92.1.1 just dropped, which stops the glitch again. Will it be back w/ the next v93.0.đť’™, I wonder?

Tobi823 commented 3 years ago

probably. I'll think about it over the next few weeks and see if I can come up with another solution to the problem.

TPS commented 3 years ago

Per https://github.com/mozilla-mobile/focus-android/issues/5337#issuecomment-916960506, the versioning is intentional & that FFU should handle it:

Users of the app FFUpdater https://f-droid.org/en/packages/de.marmaro.krt.ffupdater/ still receive an "update is available" notification although the latest APK file is downloaded and installed.

These releases were marked as "pre-release" on GitHub as well to hint that they shouldn't go out to end users. It might be something for the developers of that all to fix, i.e. don't notify users of updates if they are labelled pre-release.

Meanwhile the just-released FF Focus/Klar v93.0.2 exhibits this in FFU.

TPS commented 3 years ago

Just got FFU v74.4.0 via F-Droid, which doesn't show this.… Confirmation?

TPS commented 3 years ago

Nm. The glitch is still there, but masked by https://github.com/AdguardTeam/AdguardForAndroid/issues/3904 on this FFU version.

TPS commented 3 years ago

I just received notice:

>Focus / Klar v91.4.1
``` Repository: mozilla-mobile/focus-android · Tag: v91.4.1 · Commit: 109cf6a · Released by: jonalmeida A release for performance testing. Not intended for public use. — This release has 2 assets: Source code (zip) Source code (tar.gz) Visit the release page to download them ```

&

https://firefox-ci-tc.services.mozilla.com/tasks/index/project.mobile.focus.release/latest shows them:
``` Namespace project.mobile.focus.release.latest Rank 0 Created 9 hours ago View task Data {} Latest Artifacts public/app-focus-aarch64-release-unsigned.apk public/app-focus-arm-release-unsigned.apk public/app-klar-aarch64-release-unsigned.apk public/app-klar-arm-release-unsigned.apk public/chain-of-trust.json public/chain-of-trust.json.sig public/logs/chain_of_trust.log public/logs/live_backing.log ```

But FFU seems not to handle it.… Same bug or different?

TPS commented 2 years ago

Same w/ v8.16.1

I just received notice:

>Focus / Klar v91.4.1
``` Repository: mozilla-mobile/focus-android · Tag: v91.4.1 · Commit: 109cf6a · Released by: jonalmeida A release for performance testing. Not intended for public use. — This release has 2 assets: Source code (zip) Source code (tar.gz) Visit the release page to download them ```

&

https://firefox-ci-tc.services.mozilla.com/tasks/index/project.mobile.focus.release/latest shows them:
``` Namespace project.mobile.focus.release.latest Rank 0 Created 9 hours ago View task Data {} Latest Artifacts public/app-focus-aarch64-release-unsigned.apk public/app-focus-arm-release-unsigned.apk public/app-klar-aarch64-release-unsigned.apk public/app-klar-arm-release-unsigned.apk public/chain-of-trust.json public/chain-of-trust.json.sig public/logs/chain_of_trust.log public/logs/live_backing.log ```

But FFU seems not to handle it.… Same bug or different?

Tobi823 commented 2 years ago

It's now fixed in 74.4.3. FFUpdater will use the GitHub repository for update checking/downloading.

You can either wait for the offical F-Droid release, install the APK file from GitHub/GitLab or try my personal F-Droid repository (see https://github.com/Tobi823/ffupdater#f-droid-repository).

TPS commented 2 years ago

Is v74.4.3 released? I only see v74.4.1 here & now on F-droid. That version gives this error :

``` java.lang.RuntimeException - Unable to resume activity {de.marmaro.krt.ffupdater/de.marmaro.krt.ffupdater.MainActivity}: android.os.NetworkOnMainThreadException - java.lang.RuntimeException: Unable to resume activity {de.marmaro.krt.ffupdater/de.marmaro.krt.ffupdater.MainActivity}: android.os.NetworkOnMainThreadException at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4509) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4541) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:224) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:236) at android.app.ActivityThread.main(ActivityThread.java:7817) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952) Caused by: android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1605) at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:115) at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103) at java.net.InetAddress.getByName(InetAddress.java:1106) at de.marmaro.krt.ffupdater.download.NetworkUtil.isDnsResolvable(NetworkUtil.kt:54) at de.marmaro.krt.ffupdater.download.NetworkUtil.isInternetAvailable(NetworkUtil.kt:32) at de.marmaro.krt.ffupdater.download.NetworkUtil.isInternetAvailable(NetworkUtil.kt:18) at de.marmaro.krt.ffupdater.download.NetworkUtil.isInternetUnavailable(NetworkUtil.kt:22) at de.marmaro.krt.ffupdater.MainActivity.checkForUpdates(MainActivity.kt:186) at de.marmaro.krt.ffupdater.MainActivity.onResume(MainActivity.kt:94) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1466) at android.app.Activity.performResume(Activity.java:8147) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4499) ... 12 more ```
TPS commented 2 years ago

I see https://github.com/Tobi823/ffupdater/commit/c2292227aab15630e2034d947e20f962b1b762be but it's not tagged properly, so it doesn't show in https://github.com/Tobi823/ffupdater/releases/, so I don't know whether F-Droid will pick it up.

Tobi823 commented 2 years ago

Is v74.4.3 released? I only see v74.4.1 here & now on F-droid.

Yes, it is released. But unfortunately I didn't create a real release on GitHub, only a draft. Screenshot_20210930_004234

Now you should see the release.

On F-Droid the update is already been build and only needs signing. https://f-droid.org/wiki/index.php?title=Special:RecentChanges&days=7&from=&hidebots=0&hideanons=1&hideliu=1&limit=500 https://f-droid.org/wiki/page/de.marmaro.krt.ffupdater/lastbuild_80

TPS commented 2 years ago

I tried v74.4.3 by adding your own repo to my F-Droid client. That version's working well so far, so thanks very much! 🙇🏾‍♂️