ImranR98 / Obtainium

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

Background Task is Unreliable #608

Closed BabyOilJohnson closed 8 months ago

BabyOilJohnson commented 1 year ago

The update notification is not clearing after the app is updated. In early versions, it worked fine but now it's not.

ImranR98 commented 1 year ago

Could you be more specific or post a screen rec.

BabyOilJohnson commented 1 year ago

Sorry, it's working now.

Armaldio commented 1 year ago

Can you re-open It seems I'm facing a similar issue The notification persist after checking is done

Screenshot_20230706-113821

ImranR98 commented 1 year ago

How many github apps do you have, and have you added a hithub access token? I'm guessing your github update checks are being rate limited so obtainium has to wait a while before continuing. This would probably result in the notification sticking around during the wait, but I need to double check that.

Armaldio commented 1 year ago

You're right, I haven't a token (didn't knew I could) I've added one, I'll see how it goes

Armaldio commented 1 year ago

Added a token, same behavior Is the token validated in some way ? I may not have added it correctly ?!

ImranR98 commented 1 year ago

If the token was not valid, you'd get an "unauthorized" error.

ImranR98 commented 1 year ago

Could you post app logs for when this happens

Armaldio commented 1 year ago
Log ``` 2023-08-04 18:31:10.844: info: Démarrage de la tâche de vérification de mise à jour en arrière-plan 2023-08-04 18:31:10.853: info: Mise à jour en arrière-plan est ignoré après null 2023-08-04 18:31:10.873: info: 24 journaux effacés (avant = 2023-07-28 18:31:10.842317, après = null) 2023-08-04 18:31:10.959: info: Démarrage de la vérification de la mise à jour en arrière-plan 2023-08-05 12:26:49.572: info: 1 journal effacé (avant = 2023-07-29 12:26:49.503543, après = null) 2023-08-06 12:37:10.441: info: Démarrage de la tâche de vérification de mise à jour en arrière-plan 2023-08-06 12:37:10.455: info: Mise à jour en arrière-plan est ignoré après null 2023-08-06 12:37:10.627: info: 6 journaux effacés (avant = 2023-07-30 12:37:10.439232, après = null) 2023-08-06 12:37:10.744: info: Démarrage de la vérification de la mise à jour en arrière-plan 2023-08-07 17:41:31.035: info: 5 journaux effacés (avant = 2023-07-31 17:41:30.972083, après = null) ```
BabyOilJohnson commented 1 year ago

The update notification is not clearing after the app is updated. In early versions, it worked fine but now it's not.

The issue is back again. @ImranR98 can u check it.

bbrockie commented 11 months ago

I can also confirm this issue. This notification does not clear again. Running latest version (v0.14.30-beta) Current time as of posting this is 00:43 just for clarification Screenshot_20231019-003920_Kiwi Browser_edited

ImranR98 commented 11 months ago

Yeah, seems to have gotten a lot worse for me on Android 14. Is this the case for you?

bbrockie commented 11 months ago

Yeah, seems to have gotten a lot worse for me on Android 14. Is this the case for you?

I'm stuck on Android 12, UI 4.1. Samsung Galaxy Note10

ImranR98 commented 11 months ago

I'm stuck on Android 12, UI 4.1. Samsung Galaxy Note10

How frequent is it for you?

bbrockie commented 11 months ago

Maybe once or twice a day. I usually kill the app to clear it. I can be more aware of how often for the future. Thank you for such a amazing app.

ImranR98 commented 11 months ago

Could you also try opening the app (without killing it first) to see if that does anything. I've been seeing weird behaviour where the background task "pauses" for hours but resumes once I open the app. New to Android 14 so it may be a different issue to this one.

bbrockie commented 11 months ago

Done. It still shows same notification. I have not cleared it manually nor killed the app. But I did a applist pulldown, refreshing the update list. It shows the same beta version, but with todays release date. Do you want me to install it or stay with my current version and test some more?

ImranR98 commented 11 months ago

You can update. Today's changes shouldn't have any effect on this.

bbrockie commented 11 months ago

Thank you for your time and help. I had to ask, as updating would of course restart the app and remove the "stuck notification". I will keep an eye on this issue thread and update as soon as possible if it happens again. Wish you all a beautiful day.

bbrockie commented 11 months ago

I updated to 0.14.31 and it seemed to work, but I have again gotten the "Checking for Updates" notification, like the one I posted a screenshot of earlier, which has now been stuck since 18:16. Local time is now 18:38.

ImranR98 commented 10 months ago

Been banging my head on this for hours. Most other plugins seem out of date, poorly supported, or are missing features (like being able to pass data into the background task). Someone suggested using a foreground task - that's an option but seems unnecessarily complicated for something so simple. Really wish I hadn't used Flutter (not like native Android was an option). I've opened this issue for the plugin currently being used, hopefully it turns out to be a small bug: https://github.com/fluttercommunity/plus_plugins/issues/2314

mercertom commented 10 months ago

+1 checking for updates notifications and also "attempted to update" notifications, but those are rarer and so far only for telegram and signal, which pull from their own websites instead of repositories like github or fdroid.

bluefly000 commented 10 months ago

SCHEDULE_EXACT_ALARM permission seems to be disabled by default in Android 14, does this have anything to do with background tasks? I reinstalled Obtainium on Android 14 and confirmed that the "Alarm & reminder" setting has disappeared from the Settings app.

foxjaw commented 9 months ago

I once tried to create PAT & ended up getting shadow banned by GitHub declaring my GitHub account as "spam user". All of my comments, created issues/discussions were shadow banned completely. Llike this one: https://github.com/TeamNewPipe/NewPipe/issues/10462

I ended up creating another account & started everything from scratch. I never recommend use GitHub PATs for obtainium. Better track F-Droid repos if those app provides updates.

BabyOilJohnson commented 9 months ago

I never recommend use GitHub PATs for obtainium. Better track F-Droid repos if those app provides updates.

Then what is the purpose of this app. This app was developed to avoid using fdroid and it's signed apps.

foxjaw commented 9 months ago

@BabyOilJohnson You can limit the amount of GitHub apps you track, to 30. You'll never face rate limits.

ImranR98 commented 8 months ago

I've switched to a different background task implementation which doesn't seem to have the same issues on Android 14. Works fine in my basic testing but I'd like to be more thorough before release. APKs attached below, please help test if you can (even testing on older versions of Android would be helpful):

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

mercertom commented 8 months ago

So far working. I set to update every hour.

-------- Original Message -------- On Dec 28, 2023, 01:42, Imran wrote:

I've switched to a different background task implementation which doesn't seem to have the same issues on Android 14. Works fine in my basic testing but I'd like to be more thorough before release. APKs attached below, please help test if you can (even testing on older versions of Android would be helpful):

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

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ImranR98 commented 8 months ago

Closing - seems fixed.

ImranR98 commented 8 months ago

I once tried to create PAT & ended up getting shadow banned by GitHub declaring my GitHub account as "spam user". All of my comments, created issues/discussions were shadow banned completely. Llike this one: TeamNewPipe/NewPipe#10462

I ended up creating another account & started everything from scratch. I never recommend use GitHub PATs for obtainium. Better track F-Droid repos if those app provides updates.

Just saw this comment. Obtainium just makes authenticated HTTP requests to GitHub's public API - which is the exact use case PATs were meant for, so I doubt it is responsible. Either way, not related to this issue.