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

fix(shorebird_code_push): downloadUpdateIfAvailable does not throw exception when download fails. #2058

Open
aga23a opened this issue May 9, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@aga23a
Copy link

aga23a commented May 9, 2024

App ID: a06c1422-5791-4487-958f-5ce9efc6e635

Description

I downloaded a valid patch package through shorebirdCodePush.downloadUpdateIfAvailable(), but it failed to download successfully, but no exception was thrown, causing the application to think that the download was successful and execute restartApp, so the application kept downloading and restarting in a loop.

Steps To Reproduce

  1. Execute shorebirdCodePush.isNewPatchAvailableForDownload() to determine whether there is a new patch package
  2. If the result returns true, execute shorebirdCodePush.downloadUpdateIfAvailable() to download the patch package.
  3. After waiting for the download to complete successfully, execute restartApp()
  4. Because downloadUpdateIfAvailable failed to download, but no exception was thrown, resulting in a loop of downloading patch packages and restarting the application.

Expected Behavior

I want shorebirdCodePush.downloadUpdateIfAvailable() to be executed. An exception will be thrown if the download fails.

Screenshots
image
image

Additional Context

The current device is a real device and the Android version is 4.4.4

@aga23a aga23a added the bug Something isn't working label May 9, 2024
@aga23a
Copy link
Author

aga23a commented May 9, 2024

The download of the patch package times out, and the application cannot capture the download error.

image

@bryanoltman
Copy link
Contributor

4.4.4 is a very old Android version that is no longer supported by Google and only supported by Flutter on a best-effort basis. I'm not sure we can address the Permission Denied error, but we can update our package to throw an exception if a download fails. Updating the title of the issue to reflect this.

@bryanoltman bryanoltman changed the title fix: Execute downloadUpdateIfAvailable, no exception is thrown fix(shorebird_code_push): downloadUpdateIfAvailable does not throw exception when download fails. May 9, 2024
@aga23a
Copy link
Author

aga23a commented May 9, 2024

Sounds good, this is a good solution

4.4.4 is a very old Android version that is no longer supported by Google and only supported by Flutter on a best-effort basis. I'm not sure we can address the Permission Denied error, but we can update our package to throw an exception if a download fails. Updating the title of the issue to reflect this.

@aga23a
Copy link
Author

aga23a commented May 9, 2024

What is the minimum Android version supported by shorebird?

@eseidel
Copy link
Contributor

eseidel commented May 9, 2024

We match Flutter/Google's support range: https://docs.flutter.dev/reference/supported-platforms

@aga23a
Copy link
Author

aga23a commented May 9, 2024

We match Flutter/Google's support range: https://docs.flutter.dev/reference/supported-platforms

Okay, I see. Thanks~

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

3 participants