Skip to content

bug: Subsequent calls to getLatest and download while a download is in progress #679

@pcsantana

Description

@pcsantana

Bug Report

Capacitor Version

Latest Dependencies:

  @capacitor/cli: 8.0.0
  @capacitor/core: 8.0.0
  @capacitor/android: 8.0.0
  @capacitor/ios: 8.0.0

Installed Dependencies:

  @capacitor/cli: 7.4.2
  @capacitor/core: 7.4.4
  @capacitor/android: 7.4.2
  @capacitor/ios: 7.4.2

Plugin Version

7.22.0

Platform(s)

iOS and Android (but especially on iOS)

Current Behavior

Every time the app goes to the background and returns to the foreground while a download is in progress, getLatest is called again and a new download is started.

This leads to subsequent failures, because when the first download finishes, it causes errors during the unzip process and throws exceptions.

Expected Behavior

Ideally, I believe it would be beneficial to check if a download process is already underway before calling getLatest within backgroundDownload.

Thank you in advance.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions