Skip to content

bug: File assets that are downloaded making use of HTTP Range requests fail to download (sometimes) #2978

@llorenspujol

Description

@llorenspujol

Bug Report

File assets that are downloaded making use of HTTP Range requests fail to download (sometimes).

Capacitor Version

npx cap doctor output:

Installed Dependencies:

@capacitor/ios not installed

@capacitor/electron not installed

@capacitor/cli 2.1.0

@capacitor/android 2.1.0

@capacitor/core 2.1.0

Affected Platform(s)

  • Android
  • iOS
  • Electron
  • Web

Current Behavior

File assets that are downloaded making use of HTTP Range requests fail to download (sometimes).

In my case this assets are sound assets in .wav format. The issue is that this audios, are sometimes just partially loaded, or even not loaded at all... This bug is only reproducible when running the app with capacitor.

Here are some captures of the errors:

First request:
image

Second request (fails:
image

Expected Behavior

I expect that files that are downloaded using HTTP Range Request are fully and correctly downloded.

Reproduction Steps

Just put some .wav files on the assets folder, and try to reproduce that audio in a capacitor android app. You will see that the downloading sometimes fails.

Last words

I can't dig any more on the issue for now since I am a new capacitor user:), but if necessary and with some hints or guidance I could dig more into it and help solve this issue.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproductionneeds reproducible example to illustrate the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions