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

Testing background Notifications. #47

Closed
S7venLights opened this issue Oct 7, 2022 · 17 comments
Closed

Testing background Notifications. #47

S7venLights opened this issue Oct 7, 2022 · 17 comments
Labels
bug Something isn't working

Comments

@S7venLights
Copy link

App variables:

  • I set my update interval to 6 hours and used a personal access token.
  • I have 25 Github apps in my collection, only github.

What happened:
I did not launch obtanium after reboots to test whether background update notifications would work.
After 3 days I never got notifications. Whilst I knew there were updates because of Octodroid.

Outside variables:

  • I shutdown my phone at night
  • I turn off wifi and data from time to time.
  • Tested with and without android battery optimization on.

After launching and changing app update interval to 1 hour I did get update notifications. But not for all my apps it seemed.

@ImranR98 ImranR98 added the bug Something isn't working label Oct 8, 2022
@S7venLights
Copy link
Author

I will test this again in the week

@ImranR98
Copy link
Owner

ImranR98 commented Oct 8, 2022

Same, I haven't looked into this yet but will try to see if I can reproduce the issue at some point.

@S7venLights
Copy link
Author

S7venLights commented Oct 10, 2022

Today I did launch the app, and left it in the background. Set to 3h update interval. I got one notification late in the day saying: Error checking for updates could not find suitable release. I opened that now and it just launched the app. Then I filtered apps and saw, two updates available for simple clock and file manager.
The simple apps were released two hours ago from the time of this post.
So maybe obtanium checked for updates before they were available and as such the notification read wrong?
Not sure, just sharing.
Tomorrow I'll test not launching the app again.

@S7venLights
Copy link
Author

S7venLights commented Oct 11, 2022

Today I haven't launched the app and got the same notification about 30 min ago. From Github I can tell the same two app updates are available as well as NeoStore.
Outside Variables: I was in airplane mode but connected to Wi-fi all day.

@S7venLights
Copy link
Author

Just got the same notification 3 hours later, which makes sense since my update interval is 3 hours.

Not sure what the notification means but at least I know that so long as I'm always connected, obtanium is working in the background.

Opened the app with the notification but noticed it still only showed updates available for simple file manager and clock, when there is in fact an update available for NeoStore. So I opened Neostore on Obtanium and then only did it register the update.
Will now update these apps and keep testing in the week without launching Obtaium after reboots.

@ImranR98
Copy link
Owner

Could not find suitable release means that Obtainium couldn't find an APK for one or more of your Apps. This could be due to the dev not attaching an APK to the latest release, or it could be that your filter settings (prerelease, regular expression, etc.) are the problem.

When this happened, update checking used to stop, so all subsequent Apps would not be checked. I'm hoping this is what you faced; one App errored out (hence the notification you got) and the rest were never checked (hence no notification for them). This should be improved in the latest release (see issue #58) but still not fixed as I just realized that the fix for that issue would still result in no notification on error. Will make a change in the next release and that will hopefully resolve this issue.

@ImranR98
Copy link
Owner

Okay, everything should be fine with the latest release: https://github.com/ImranR98/Obtainium/releases/tag/v0.5.10-beta
But please test it out and let me know.

@ImranR98
Copy link
Owner

Also note that background checking only notifies you of newly discovered updates; if an App already says "Update Available" in Obtainium, you won't get a notification for it again (this avoids repetitive reminder notifications for the same App every X hours).

@S7venLights
Copy link
Author

S7venLights commented Oct 12, 2022

Okay, all good to know. It is probably the brave repo messing with my phone, as I know all the repos I've added to Obtanium have apks. Brave just has that weird release tagging.
But I think it did still check updates for the other apps.
By the way I left my phone on last night but with no data connection in airplane mode. Got this error over night: Error checking for updates, Failed host lookup: 'api.github.com' (Correction, I may have got that error when I connected to wifi this morning but the VPN was still connecting)

Anyway I will keep testing, don't close this issue yet.

@S7venLights
Copy link
Author

S7venLights commented Oct 12, 2022

😗ooo I just got a successful notification to install updates for simple file manager.

Variables: 3 hour update interval on latest Obtanium version.

Outside variables: I didn't have internet connection for much of the morning but I have had connection for around 5 hours before this notification.

The release was for simple file manager which is a 2day old release.

Once opening the notification and filtering updates, I saw that there was also an update for brave browser.

@S7venLights
Copy link
Author

S7venLights commented Oct 14, 2022

Yesterday I was in and out of internet connection (mostly out) and got no notifications, whilst I know there are updates.
Which makes me think Obtanium is resetting it's 3 hour update interval to start over every time it fails to check updates? But I'm not sure…

This morning I turned on the phone and connected, got a notification I've not seen before: 'Checking for updates'
But that notification has been there for 13min now with no change.

Okay the notification just changed to 'Updates available xxx app and 2 more apps have updates'
🙌 (Took 30min to check for updates)
So this was my 2nd successful update check without launching Obtanium at boot.
But yesterday was unsuccessful so not sure there…

@S7venLights
Copy link
Author

Just got another successful update notification for an update that released 2 hours ago. 🙌 Hour by hour updates here 😋

@S7venLights
Copy link
Author

S7venLights commented Oct 14, 2022

And another successful notification for a new update 3 hours later.

@ImranR98
Copy link
Owner

Yesterday I was in and out of internet connection (mostly out) and got no notifications, whilst I know there are updates. Which makes me think Obtanium is resetting it's 3 hour update interval to start over every time it fails to check updates? But I'm not sure…

This morning I turned on the phone and connected, got a notification I've not seen before: 'Checking for updates' But that notification has been there for 13min now with no change.

Okay the notification just changed to 'Updates available xxx app and 2 more apps have updates' raised_hands (Took 30min to check for updates) So this was my 2nd successful update check without launching Obtanium at boot. But yesterday was unsuccessful so not sure there…

That "checking" notification is only supposed to show for a few seconds 💀
The fact that it was up for 30 minutes makes me think you got a rate limit so the checking paused then resumed 30 minutes later. But the notification should not be showing in the interim, so it's weird.
My guess is that your bad connection caused update checking to take longer than usual, so you noticed the notification. Then it disappeared at some point and came back 30 minutes later, and was not actually there the whole time.

And yeah, if you don't have a connection, Obtainium will wait for it. But if you do have a connection and lose it in the middle of an update check, Obtainium won't try again until the next interval (as far as the scheduler is concerned, once update checking has started, the job is done, regardless of whether it passes/fails). This could be fixed but it seems uncommon enough that I'm not sure it's worth it (most of the time, you just need a few seconds of internet access for an update check to complete successfully).

Anyways, I'm glad things seem to be working, hopefully they will continue to work as you keep testing.

@S7venLights
Copy link
Author

Cool cool.
So bad connection is not the issue in this case, I had good Wi-fi.
I didn't interact with the 'checking for updates' notification (Didn't click or clear it), but whatever the case 30min later it notified for updates properly, which is good. 👍
I also shouldn't have rate limited with the PAT and that being my first connection in the morning.

@S7venLights S7venLights changed the title No Update notification in background if app not launched at boot. Testing background Notifications. Oct 19, 2022
@S7venLights
Copy link
Author

See some new feedback in Issue #60

@S7venLights
Copy link
Author

Seems to be fixed on Alpha version

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

No branches or pull requests

2 participants