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

webp asset_server load error #12353

Closed
v-kat opened this issue Mar 6, 2024 · 2 comments · Fixed by #12355
Closed

webp asset_server load error #12353

v-kat opened this issue Mar 6, 2024 · 2 comments · Fixed by #12355
Labels
A-Assets Load files from disk to use for things like images, models, and sounds A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior P-Compile-Failure A failure to compile Bevy apps

Comments

@v-kat
Copy link

v-kat commented Mar 6, 2024

Bevy version

0.13.0

[Optional] Relevant system information

WASM Linux Chromium web build with trunk

What you did

Tried to use a webp image with asset_server.load and .insert_resource(AssetMetaCheck::Never) had the webp feature enabled in cargo along with bevy_asset

What went wrong

The image doesn't load and there's a stacktrace

Additional information

ERROR /home/name/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_asset-0.13.0/src/server/mod.rs:302 Could not find an asset loader matching: Loader Name: None; Asset Type: None; Extension: None; Path: Some("char.webp");
@v-kat v-kat added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Mar 6, 2024
@rparrett
Copy link
Contributor

rparrett commented Mar 7, 2024

Thanks for the report. I think I spotted the issue. See #12355.

As a workaround, you can enable the bmp or png features as well.

@rparrett rparrett added A-Rendering Drawing game state to the screen A-Assets Load files from disk to use for things like images, models, and sounds and removed S-Needs-Triage This issue needs to be labelled labels Mar 7, 2024
@james7132 james7132 added the P-Compile-Failure A failure to compile Bevy apps label Mar 7, 2024
@v-kat
Copy link
Author

v-kat commented Mar 7, 2024

Thanks. Confirmed that using the png feature also fixes the problem.

github-merge-queue bot pushed a commit that referenced this issue Mar 7, 2024
…#12355)

# Objective

Fixes #12353

When only `webp` was selected, `ImageLoader` would not be initialized.

That is, users using `default-features = false` would need to add `png`
or `bmp` or something in addition to `webp` in order to use `webp`.

This was also the case for `pnm`. 

## Solution

Add `webp` and `pnm` to the list of features that trigger the
initialization of `ImageLoader`.
mockersf pushed a commit that referenced this issue Mar 8, 2024
…#12355)

# Objective

Fixes #12353

When only `webp` was selected, `ImageLoader` would not be initialized.

That is, users using `default-features = false` would need to add `png`
or `bmp` or something in addition to `webp` in order to use `webp`.

This was also the case for `pnm`. 

## Solution

Add `webp` and `pnm` to the list of features that trigger the
initialization of `ImageLoader`.
spectria-limina pushed a commit to spectria-limina/bevy that referenced this issue Mar 9, 2024
…bevyengine#12355)

# Objective

Fixes bevyengine#12353

When only `webp` was selected, `ImageLoader` would not be initialized.

That is, users using `default-features = false` would need to add `png`
or `bmp` or something in addition to `webp` in order to use `webp`.

This was also the case for `pnm`. 

## Solution

Add `webp` and `pnm` to the list of features that trigger the
initialization of `ImageLoader`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior P-Compile-Failure A failure to compile Bevy apps
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants