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

[Bug] installing multiple apps fails #634

Closed
S7venLights opened this issue Jun 28, 2023 · 17 comments
Closed

[Bug] installing multiple apps fails #634

S7venLights opened this issue Jun 28, 2023 · 17 comments
Labels
bug Something isn't working HTTP This bug/feature is related to downloads or other HTTP requests

Comments

@S7venLights
Copy link

Hi again, been using the app stably for a while but experience this in the past few versions (not sure which exactly)
If I select a number of apps to download updates, Obtanium will download as usual and show the install prompt the moment the first apk is ready. Even if others are still downloading.
Then if I click install, the app installs successfully but the other downloads fail with a non specific error.
I have to then download one at a time and they start downloading from 0% again.

1day of Logs from attempts this morning:

2023-06-27 07:43:59.474: info: Started BG update check task

2023-06-27 07:43:59.498: info: Bg update ignoreAfter is null

2023-06-27 07:43:59.930: info: Started actual BG update checking

2023-06-27 07:46:05.460: info: BG update checking found 0 updates - will notify user if needed

2023-06-27 07:46:05.460: info: Finished BG update check task

2023-06-27 10:43:17.519: info: Started BG update check task

2023-06-27 10:43:17.523: info: Bg update ignoreAfter is null

2023-06-27 10:43:17.650: info: Cleared 35 logs (before = 2023-06-20 10:43:17.518221, after = null)

2023-06-27 10:43:18.186: info: Started actual BG update checking

2023-06-27 13:18:07.948: info: Started BG update check task

2023-06-27 13:18:07.951: info: Bg update ignoreAfter is null

2023-06-27 13:18:08.047: info: Cleared 8 logs (before = 2023-06-20 13:18:07.948083, after = null)

2023-06-27 13:18:08.365: info: Started actual BG update checking

2023-06-27 13:40:25.993: info: BG update checking found 1 update - will notify user if needed

2023-06-27 13:40:25.995: info: Finished BG update check task

2023-06-27 16:18:30.171: info: Started BG update check task

2023-06-27 16:18:30.189: info: Bg update ignoreAfter is null

2023-06-27 16:18:30.203: info: Cleared 4 logs (before = 2023-06-20 16:18:30.164460, after = null)

2023-06-27 16:18:30.528: info: Started actual BG update checking

2023-06-27 16:35:48.934: info: BG update checking found 0 updates - will notify user if needed

2023-06-27 16:35:48.934: info: Finished BG update check task

2023-06-27 17:50:11.860: info: Cleared 2 logs (before = 2023-06-20 17:50:11.793037, after = null)

2023-06-27 20:56:36.128: info: Started BG update check task

2023-06-27 20:56:36.131: info: Bg update ignoreAfter is null

2023-06-27 20:56:36.188: info: Cleared 6 logs (before = 2023-06-20 20:56:36.127171, after = null)

2023-06-27 20:56:36.554: info: Started actual BG update checking

2023-06-27 21:04:24.560: info: BG update checking found 1 update - will notify user if needed

2023-06-27 21:04:24.561: info: Finished BG update check task

2023-06-28 07:28:48.199: info: Started BG update check task

2023-06-28 07:28:48.202: info: Bg update ignoreAfter is null

2023-06-28 07:28:48.339: info: Cleared 21 logs (before = 2023-06-21 07:28:48.198373, after = null)

2023-06-28 07:28:48.882: info: Started actual BG update checking

2023-06-28 07:29:11.666: info: Started BG update check task

2023-06-28 07:29:11.674: info: Bg update ignoreAfter is null

2023-06-28 07:29:12.157: info: Started actual BG update checking

2023-06-28 07:30:49.440: info: BG update checking found 1 update - will notify user if needed

2023-06-28 07:30:49.440: info: Finished BG update check task

2023-06-28 07:31:00.329: info: BG update checking found 0 updates - will notify user if needed

2023-06-28 07:31:00.329: info: Finished BG update check task

2023-06-28 07:32:27.130: error: Cannot install an older version of an App: [com.brave.browser]

Connection refused: [chat.delta.lite, dev.imranr.obtainium]

2023-06-28 07:32:58.622: error: Cannot install an older version of an App: [com.brave.browser]

Connection refused: [dev.imranr.obtainium]

2023-06-28 07:36:39.347: error: Cannot install an older version of an App: [com.brave.browser]

2023-06-28 07:36:59.333: error: Cannot install an older version of an App: [com.brave.browser]

2023-06-28 07:37:07.670: error: Cannot install an older version of an App: [com.brave.browser]

2023-06-28 07:37:24.070: info: Cleared 3 logs (before = 2023-06-21 07:37:24.021659, after = null)

2023-06-28 07:38:40.120: error: Cannot install an older version of an App: [com.brave.browser]

2023-06-28 07:41:35.692: error: Cannot install an older version of an App: [com.brav22nd e.browser]

2023-06-28 07:43:01.507: info: Cleared 3 logs (before = 2023-06-21 07:43:01.456443, after = null)

2023-06-28 07:43:11.153: error: Cannot install an older version of an App: [com.brave.browser]

@ImranR98
Copy link
Owner

What non specific error do you get?

@ImranR98 ImranR98 added the bug Something isn't working label Jun 30, 2023
@S7venLights
Copy link
Author

I don't remember but I'll look out for it again. But I think it's those connection refused ones in the logs above (starting from the 28th)

@deepu2
Copy link

deepu2 commented Jul 3, 2023

Screenshot_2023-07-03-14-23-54-506_dev.imranr.obtainium.jpg

I get this error too, I'm facing this since maybe 2 days. I've reinstalled and checked too.

Logs from fresh install:

2023-07-03 14:28:54.613: info: firstRun

2023-07-03 14:29:23.297: error: ClientException: Connection closed while receiving data, uri=https://objects.githubusercontent.com/github-production-release-asset-2e65be/655339559/585f6639-474a-4251-88d5-0bf7c5745a63?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230703%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230703T085921Z&X-Amz-Expires=300&X-Amz-Signature=030e928f3d5a9c5e083797aee60dd9b4cfac95ceb20a53d624059577742b4e4d&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=655339559&response-content-disposition=attachment%3B%20filename%3Dliftoff-v0.10.4-arm64-v8a-android.apk&response-content-type=application%2Fvnd.android.package-archive: [com.liftoffapp.liftoff]

@S7venLights
Copy link
Author

S7venLights commented Jul 3, 2023

Mine is a different error, tested again and it is a "Connection Refused" error
Reproduce steps:

2023-07-02 14:50:32.126: info: Finished BG update check task
then I open app and select by long press, 3 apps I want to update.
First app downloads and prompts for install (I install) then:
2023-07-02 15:28:25.805: error: Connection refused: [com.androidapp.it]
I now have to re-download the other two apps.
This time i minimize obtainium while it downloads.
get notification for opening obtainium to install.
install 1 app fine, then:
2023-07-02 15:32:03.699: error: Connection refused: [dev.imranr.obtainium]

Basically I can't bulk download and install.
On Pixel3 with graphene OS

@1xFF
Copy link
Contributor

1xFF commented Jul 9, 2023

I was unable to replicate this with 3 apps from simplemobiletools on a pixel 7 with GrapheneOS.
Could you give me the name of the app that was installed first, the second app that failed, and their sources? Obtainium itself cannot be included as I can't update a debug build.
Also does this happen every single time you bulk update?

@S7venLights
Copy link
Author

It happens every time with every >2 app updates.
Other factors: I'm using a VPN (Invizible Pro) but Obtainium is excluded from going through the VPN.
I'm using a Github Personal Access Token

ImranR98 added a commit that referenced this issue Jul 23, 2023
Auto retry failed download (3 times) (#634)
@ImranR98
Copy link
Owner

Still no idea what causes this error, but the latest version now automatically retries failed downloads 3 times: https://github.com/ImranR98/Obtainium/releases/tag/v0.13.21-beta
Hopefully whatever issue you're facing is transient, and retrying will help.

@deepu2
Copy link

deepu2 commented Jul 24, 2023

I just checked the latest update and it doesn't help, every time it will just retry from the beginning and never completes the download. Continuing from the failed byte would mitigate this issue.

Screenrecorder-2023-07-24-07-02-19-143.mp4

@S7venLights
Copy link
Author

"never completes the download"?
@deepu2 sounds like your issue is different to mine. Your error popup is also different to mine.

My downloads complete I just can't queue multiple downloads.

My error is more like:
error: Connection refused: [dev.imranr.obtainium]

and I think it also says: socket errror

@1xFF
Copy link
Contributor

1xFF commented Jul 25, 2023

I tried using a github access token and older versions of android as iirc the pixel 3 is EOL, still no luck.
Does this happen with non-github sources?
@deepu2 Are you also using a github access token?

@deepu2
Copy link

deepu2 commented Jul 25, 2023

I tried using a github access token and older versions of android as iirc the pixel 3 is EOL, still no luck.
Does this happen with non-github sources?
@deepu2 Are you also using a github access token?

Yes, I am.

@S7venLights
Copy link
Author

S7venLights commented Jul 27, 2023

This is the error I get every time with every source

ClientException with SocketExceptiorn:

Connection refused (OS Error: Connection refused, errno = 111), address = github.com, port = 37066, uri=https://github.com/tw-hx/Signal- Android/releases/download/v6.26.4.0- FOSS/Signal-Android-play-foss-prod- universal-release-signed-6.26.4.apk: [org.thoughtcrime,securesms]

ClientException with SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = github.com, port = 37074, uri=https://github.com/Gedsh/ InviZible/releases/download/v1.9.2- beta/Invizible_Pro__beta_ver.1.9.2_ar m64.apk: [pan.alexander.tordnscrypt]

@S7venLights
Copy link
Author

Issue seems to be resolved, will report back here if it happens again

@ImranR98
Copy link
Owner

ImranR98 commented Aug 4, 2023

I added a 5 second wait between retries, that might be the "fix" (more of a workaround). Good enough i guess since it looks like not everyone was having this issue. Leaving the issue open for a while in case you see it again.

@deepu2
Copy link

deepu2 commented Aug 5, 2023

I added a 5 second wait between retries, that might be the "fix" (more of a workaround). Good enough i guess since it looks like not everyone was having this issue. Leaving the issue open for a while in case you see it again.

This still doesn't solve the issue for me, should I open a new issue? My issue is not related to this one.

The issue is every 3 or 4 seconds the connection drops while downloading and when it retries it is done from 0% and the connection would drop again and this will loop for 5 times.

Eg (current implementation):

  • Starts download
  • downloads till 35%
  • connection drops (same thing happens for me in chrome and firefox as well, it shows waiting for network ans resumes download)
  • 1st retry from 0%
  • downloads till 20%
  • network drop occurs
  • 2nd retry starts from 0% again and so on

So instead of retrying from 0% I want to retry from the last downloaded size, that way in 5 retries my download will be completed.

Sometimes the first retry might happen at around 58% and during the second retry if it starts from 58% the download would be finished in 1 retries.

@ImranR98
Copy link
Owner

ImranR98 commented Aug 5, 2023

We can keep using this issue

@ImranR98 ImranR98 added UI This bug/feature is skin deep HTTP This bug/feature is related to downloads or other HTTP requests and removed UI This bug/feature is skin deep labels Feb 15, 2024
@ImranR98 ImranR98 added the TODO Issue to focus on for the next release label Mar 17, 2024
ImranR98 added a commit that referenced this issue Mar 17, 2024
Resume failed downloads when possible instead of starting again (#634), Typo: 'Installed' not 'Updated' (#1469) + Bugfix: Don't incorrectly show message when user cancel, Add changelog button to app page (#1474)
@ImranR98
Copy link
Owner

Failed downloads will now automatically resume if the source supports the range header: https://github.com/ImranR98/Obtainium/releases/tag/v1.0.6

@ImranR98 ImranR98 removed the TODO Issue to focus on for the next release label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HTTP This bug/feature is related to downloads or other HTTP requests
Projects
None yet
Development

No branches or pull requests

4 participants