Skip to content

fix(install): fallback to default downloader when aria2 fails#4292

Merged
niheaven merged 3 commits intoScoopInstaller:developfrom
kiennq:fix/fallback-from-aria2
Aug 26, 2024
Merged

fix(install): fallback to default downloader when aria2 fails#4292
niheaven merged 3 commits intoScoopInstaller:developfrom
kiennq:fix/fallback-from-aria2

Conversation

@kiennq
Copy link
Copy Markdown
Contributor

@kiennq kiennq commented Mar 13, 2021

Try to fallback to default downloader when aria2 download failed.
This make the download with aria2 more stable since there's some download links that doesn't support multi-connection.

Closes #4472

@kiennq kiennq force-pushed the fix/fallback-from-aria2 branch from 44d5c60 to 599d631 Compare June 20, 2021 16:10
@rashil2000
Copy link
Copy Markdown
Member

It would be better to not make this a default, and control it with a config variable instead. @kiennq can you fix the conficts?

@niheaven
Copy link
Copy Markdown
Member

A refactoring of install.ps1 by separate downloading, extracting, and installing will be done after this release, and could you do the resolving after that?

@brian6932
Copy link
Copy Markdown

brian6932 commented Aug 31, 2022

Would it not be better to just set aria2-max-connection-per-server to 1 if the download fails on retry?

@kiennq kiennq force-pushed the fix/fallback-from-aria2 branch from 599d631 to 58feb11 Compare August 18, 2024 08:47
@kiennq
Copy link
Copy Markdown
Contributor Author

kiennq commented Aug 18, 2024

It would be better to not make this a default, and control it with a config variable instead. @kiennq can you fix the conficts?

I think it should be by default as this only fallback when the aria2 downloading fail. The warning and instruction to file a bug for aria2 is still showing though.

Would it not be better to just set aria2-max-connection-per-server to 1 if the download fails on retry?

I think once aria2 fails, it would be better to fall back into the default one instead of retrying with aria2 again, no?

A refactoring of install.ps1 by separate downloading, extracting, and installing will be done after this release, and could you do the resolving after that?

@niheaven Done

@brian6932
Copy link
Copy Markdown

brian6932 commented Aug 18, 2024

I think once aria2 fails, it would be better to fall back into the default one instead of retrying with aria2 again, no?

Yea it's prob better to fallback to the default DLer. I remember when I had some wonky NIC driver settings, aria2c would fail (not really aria2c's fault tbf), but the default DLer worked, I take my last message back.

Comment thread lib/download.ps1
Comment thread lib/download.ps1 Outdated
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
@niheaven
Copy link
Copy Markdown
Member

Now you could add a changlog entry now.

@kiennq
Copy link
Copy Markdown
Contributor Author

kiennq commented Aug 23, 2024

Now you could add a changlog entry now.

Done

@niheaven niheaven merged commit e0c682d into ScoopInstaller:develop Aug 26, 2024
@kiennq kiennq deleted the fix/fallback-from-aria2 branch August 26, 2024 17:23
HUMORCE added a commit that referenced this pull request Aug 11, 2025
* fix (decompress): `Expand-7zipArchive` only delete temp dir / `$extractDir` if it is empty (#6092)

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* refactor(download): Move download-related functions to 'download.ps1' (#6095)

* fix(download): Fallback to default downloader when aria2 fails (#4292)

* fix(commands): Handling broken aliases (#6141)

* fix(shim): properly check `wslpath`/`cygpath` command first (#6114)

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* fix(scoop-bucket): Add missing import for `no_junction` envs (#6181)

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>

* docs(chglog): Update to 0.5.3 (#6258)

* perf(shim): Update kiennq-shim to v3.1.2 (#6261)

* fix(decompress): Replace deprecated 7ZIPEXTRACT_USE_EXTERNAL config (#6327)

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* fix(scoop-uninstall): Fix uninstaller does not gain Global state (#6430)

* global arg

* changelog

* refactor(Get-Manifest): Select actual source for manifest (#6142)

* first step

* Revert "first step"

This reverts commit c5907c3.

* refactor(Get-Manifest): Select actual source for installed manifest

* rework sub-commands, `scoop-depends` is NOT working at this stage

* URI manifest

* opt

* deprecated manifest

* source of manifests

* source of manifest pt2

- Mark URI(path/URL/UNC/etc.) query as standalone manifest
- Drop `installed` and `available update` items for [query] and [installed] are different sources.

* remove variable preventing I forget it

* scoop-info: fix source of manifest on bucket

* fix `scoop-depends`

* Fix Standalone and Source detection

* fix global install

* Fix scoop-cat, scoop-home

- Query for remote manifest

* scoop-list: info +deprecated

* manifest: Fix first selected manifest

* gramma..

* Fix 61b3259

* length

* fix(scoop-depends-tests): Mocking `USE_EXTERNAL_7ZIP` as $false (#6431)

* fix(scoop-depends-tests): Mocking `USE_EXTERNAL_7ZIP` as $false to avoding error when it is $true

* CHANGELOG

* feat(autoupdate): GitHub predefined hashes support (#6416)

* feat(autoupdate): predefined hash case for GitHub

- Remove `sha256:` prefix in `format_hash()`
- Add GitHub support in `get_hash_for_app()`

Close #6381

* doc(chglog): GitHub auto hash update

* fix(autoupdate): remove prefix only

* docs(CHANGELOG): Update to 0.5.3 (#6432)

* docs(CHANGELOG): Update to 0.5.3

* 6416

---------

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Co-authored-by: Olav Rønnestad Birkeland <6450056+o-l-a-v@users.noreply.github.com>
Co-authored-by: kiennq <kien.n.quang@gmail.com>
Co-authored-by: HUMORCE <humorce@outlook.com>
Co-authored-by: Ryan <sitiom@proton.me>
Co-authored-by: Chawye Hsu <su+git@chawyehsu.com>
Co-authored-by: Bassel Rachid <101208715+basselworkforce@users.noreply.github.com>
Co-authored-by: Wordless Echo <wordless@echo.moe>
HUMORCE added a commit to HUMORCE/Scoop that referenced this pull request Aug 12, 2025
* chore(release): Bump to version 0.5.3 (ScoopInstaller#6257)

* fix (decompress): `Expand-7zipArchive` only delete temp dir / `$extractDir` if it is empty (ScoopInstaller#6092)

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* refactor(download): Move download-related functions to 'download.ps1' (ScoopInstaller#6095)

* fix(download): Fallback to default downloader when aria2 fails (ScoopInstaller#4292)

* fix(commands): Handling broken aliases (ScoopInstaller#6141)

* fix(shim): properly check `wslpath`/`cygpath` command first (ScoopInstaller#6114)

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* fix(scoop-bucket): Add missing import for `no_junction` envs (ScoopInstaller#6181)

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>

* docs(chglog): Update to 0.5.3 (ScoopInstaller#6258)

* perf(shim): Update kiennq-shim to v3.1.2 (ScoopInstaller#6261)

* fix(decompress): Replace deprecated 7ZIPEXTRACT_USE_EXTERNAL config (ScoopInstaller#6327)

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* fix(scoop-uninstall): Fix uninstaller does not gain Global state (ScoopInstaller#6430)

* global arg

* changelog

* refactor(Get-Manifest): Select actual source for manifest (ScoopInstaller#6142)

* first step

* Revert "first step"

This reverts commit c5907c3.

* refactor(Get-Manifest): Select actual source for installed manifest

* rework sub-commands, `scoop-depends` is NOT working at this stage

* URI manifest

* opt

* deprecated manifest

* source of manifests

* source of manifest pt2

- Mark URI(path/URL/UNC/etc.) query as standalone manifest
- Drop `installed` and `available update` items for [query] and [installed] are different sources.

* remove variable preventing I forget it

* scoop-info: fix source of manifest on bucket

* fix `scoop-depends`

* Fix Standalone and Source detection

* fix global install

* Fix scoop-cat, scoop-home

- Query for remote manifest

* scoop-list: info +deprecated

* manifest: Fix first selected manifest

* gramma..

* Fix 61b3259

* length

* fix(scoop-depends-tests): Mocking `USE_EXTERNAL_7ZIP` as $false (ScoopInstaller#6431)

* fix(scoop-depends-tests): Mocking `USE_EXTERNAL_7ZIP` as $false to avoding error when it is $true

* CHANGELOG

* feat(autoupdate): GitHub predefined hashes support (ScoopInstaller#6416)

* feat(autoupdate): predefined hash case for GitHub

- Remove `sha256:` prefix in `format_hash()`
- Add GitHub support in `get_hash_for_app()`

Close ScoopInstaller#6381

* doc(chglog): GitHub auto hash update

* fix(autoupdate): remove prefix only

* docs(CHANGELOG): Update to 0.5.3 (ScoopInstaller#6432)

* docs(CHANGELOG): Update to 0.5.3

* 6416

---------

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Co-authored-by: Olav Rønnestad Birkeland <6450056+o-l-a-v@users.noreply.github.com>
Co-authored-by: kiennq <kien.n.quang@gmail.com>
Co-authored-by: HUMORCE <humorce@outlook.com>
Co-authored-by: Ryan <sitiom@proton.me>
Co-authored-by: Chawye Hsu <su+git@chawyehsu.com>
Co-authored-by: Bassel Rachid <101208715+basselworkforce@users.noreply.github.com>
Co-authored-by: Wordless Echo <wordless@echo.moe>

* fix(autoupdate): Skiping github mode while hash.url already set

---------

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Olav Rønnestad Birkeland <6450056+o-l-a-v@users.noreply.github.com>
Co-authored-by: kiennq <kien.n.quang@gmail.com>
Co-authored-by: Ryan <sitiom@proton.me>
Co-authored-by: Chawye Hsu <su+git@chawyehsu.com>
Co-authored-by: Bassel Rachid <101208715+basselworkforce@users.noreply.github.com>
Co-authored-by: Wordless Echo <wordless@echo.moe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants