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

Background Task is Unreliable #608

Closed
BabyOilJohnson opened this issue Jun 4, 2023 · 30 comments
Closed

Background Task is Unreliable #608

BabyOilJohnson opened this issue Jun 4, 2023 · 30 comments
Labels
bug Something isn't working high priority This issue is a high priority

Comments

@BabyOilJohnson
Copy link

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

@ImranR98
Copy link
Owner

ImranR98 commented Jun 4, 2023

Could you be more specific or post a screen rec.

@ImranR98 ImranR98 added the needs follow up Further information is requested label Jun 4, 2023
@BabyOilJohnson
Copy link
Author

Sorry, it's working now.

@Armaldio
Copy link

Armaldio commented Jul 6, 2023

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

Screenshot_20230706-113821

@BabyOilJohnson BabyOilJohnson reopened this Jul 6, 2023
@ImranR98
Copy link
Owner

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
Copy link

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

@Armaldio
Copy link

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

@ImranR98
Copy link
Owner

ImranR98 commented Aug 5, 2023

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

@ImranR98
Copy link
Owner

ImranR98 commented Aug 5, 2023

Could you post app logs for when this happens

@ImranR98 ImranR98 added bug Something isn't working and removed needs follow up Further information is requested labels Aug 5, 2023
@Armaldio
Copy link

Armaldio commented Aug 7, 2023

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
Copy link
Author

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
Copy link

bbrockie commented Oct 18, 2023

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
Copy link
Owner

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

@bbrockie
Copy link

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
Copy link
Owner

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

How frequent is it for you?

@bbrockie
Copy link

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
Copy link
Owner

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
Copy link

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
Copy link
Owner

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

@bbrockie
Copy link

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
Copy link

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 ImranR98 changed the title Update notification not clearing Background Task is Unreliable Oct 26, 2023
@ImranR98 ImranR98 pinned this issue Oct 26, 2023
@ImranR98
Copy link
Owner

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: fluttercommunity/plus_plugins#2314

@mercertom
Copy link

+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
Copy link
Contributor

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
Copy link

foxjaw commented Dec 8, 2023

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.

@BabyOilJohnson
Copy link
Author

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
Copy link

foxjaw commented Dec 8, 2023

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

@ImranR98
Copy link
Owner

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
Copy link

mercertom commented Dec 28, 2023 via email

ImranR98 added a commit that referenced this issue Dec 28, 2023
…or HTML Links (#1182), Add Support for Multiple Intermediate Links to HTML Source (#1204)

- Switch to a New Background Task Plugin (#608)
- Add Link Text Filter for HTML Links (#1182)
- Add Support for Multiple Intermediate Links to HTML Source
@ImranR98
Copy link
Owner

ImranR98 commented Jan 1, 2024

Closing - seems fixed.

@ImranR98 ImranR98 closed this as completed Jan 1, 2024
@ImranR98 ImranR98 unpinned this issue Jan 1, 2024
@ImranR98
Copy link
Owner

ImranR98 commented Jan 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority This issue is a high priority
Projects
None yet
Development

No branches or pull requests

7 participants