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

Wasm build not working on itch in bevy 0.12.x #48

Open
PraxTube opened this issue Dec 11, 2023 · 6 comments
Open

Wasm build not working on itch in bevy 0.12.x #48

PraxTube opened this issue Dec 11, 2023 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@PraxTube
Copy link

PraxTube commented Dec 11, 2023

I am trying to put a wasm build on itch but it just doesn't work. I cloned this repo and put it on itch to see why wasm isn't building. Turns out that it is working for bevy 0.11.0, but not for 0.12.x. I can't believe that this isn't a known issue, but I also have no clue what I could be doing wrong.

I am getting the following error when trying to run the 0.12.x version in the web on itch, which I don't get in the 0.11.0 build.

WARN /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_pbr-0.12.1/src/ssao/mod.rs:87 ScreenSpaceAmbientOcclusionPlugin not loaded. GPU lacks support: TextureFormat::R16Float does not support TextureUsages::STORAGE_BINDING.

GET https://html-classic.itch.zone/html/9288970-880838/assets/ducky.png.meta 403 (Forbidden)
Failed to load resource: the server responded with a status of 403 ()

ERROR /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_asset-0.12.1/src/server/mod.rs:300 encountered an io error while loading asset: Encountered unexpected HTTP status 403
Full Console Log
bundle.min.js?1702356362:1 Already declared, using existing: Lightbox
window.R.window.R @ bundle.min.js?1702356362:1
bundle.min.js?1702356362:1 Already declared, using existing: ErrorLightbox
window.R.window.R @ bundle.min.js?1702356362:1
bundle.min.js?1702356362:1 Already declared, using existing: Lightbox
window.R.window.R @ bundle.min.js?1702356362:1
bundle.min.js?1702356362:1 Already declared, using existing: ErrorLightbox
window.R.window.R @ bundle.min.js?1702356362:1
bundle.min.js?1702356362:1 Already declared, using existing: SlideDown
window.R.window.R @ bundle.min.js?1702356362:1
bundle.min.js?1702356362:1 Already declared, using existing: CSRF
window.R.window.R @ bundle.min.js?1702356362:1
bundle.min.js?1702356362:1 Already declared, using existing: InputRow
window.R.window.R @ bundle.min.js?1702356362:1
bundle.min.js?1702356362:1 Already declared, using existing: TextInputRow
window.R.window.R @ bundle.min.js?1702356362:1
bundle.min.js?1702356362:1 Already declared, using existing: SimpleSelect
window.R.window.R @ bundle.min.js?1702356362:1
bundle.min.js?1702356362:1 Already declared, using existing: Select
window.R.window.R @ bundle.min.js?1702356362:1
bundle.min.js?1702356362:1 Already declared, using existing: RadioButtons
window.R.window.R @ bundle.min.js?1702356362:1
bundle.min.js?1702356362:1 Already declared, using existing: FormErrors
window.R.window.R @ bundle.min.js?1702356362:1
bundle.min.js?1702356362:1 Already declared, using existing: RecaptchaInput
window.R.window.R @ bundle.min.js?1702356362:1
lib.min.js?1702356362:2 Unrecognized feature: 'monetization'.
xe @ lib.min.js?1702356362:2
lib.min.js?1702356362:2 Unrecognized feature: 'xr'.
xe @ lib.min.js?1702356362:2
lib.min.js?1702356362:2 Allow attribute will take precedence over 'allowfullscreen'.
xe @ lib.min.js?1702356362:2
bevy_game.js:376 INFO /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_winit-0.12.1/src/system.rs:55 Creating new window "App" (0v0)
bevy_game.js:376 INFO /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.12.1/src/renderer/mod.rs:140 AdapterInfo { name: "ANGLE (NVIDIA Corporation, NVIDIA GeForce GTX 960/PCIe/SSE2, OpenGL 4.5.0)", vendor: 4318, device: 0, device_type: Other, driver: "", driver_info: "", backend: Gl }
bevy_game.js:376 WARN /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_pbr-0.12.1/src/ssao/mod.rs:87 ScreenSpaceAmbientOcclusionPlugin not loaded. GPU lacks support: TextureFormat::R16Float does not support TextureUsages::STORAGE_BINDING.
bevy_game.js:922 
        
        
       GET https://html-classic.itch.zone/html/9288970-880838/assets/ducky.png.meta 403 (Forbidden)
imports.wbg.__wbg_fetch_1f9eb1a6c5433fb7 @ bevy_game.js:922
$web_sys::features::gen_Window::Window::fetch_with_str::h0fe830307752bd93 @ bevy_game_bg.wasm:0x1654cd4
$bevy_asset::io::wasm::HttpWasmAssetReader::fetch_bytes::{{closure}}::ha40d39234762fcd4 @ bevy_game_bg.wasm:0xba28d1
$<bevy_asset::io::wasm::HttpWasmAssetReader as bevy_asset::io::AssetReader>::read_meta::{{closure}}::h2b75dee213d66c97 @ bevy_game_bg.wasm:0x11d5698
$bevy_asset::io::AssetReader::read_meta_bytes::{{closure}}::h656947f40c991694 @ bevy_game_bg.wasm:0xed999d
$bevy_asset::server::AssetServer::load_internal::{{closure}}::hf2e538ed883c8c87 @ bevy_game_bg.wasm:0x1284be
$bevy_tasks::single_threaded_task_pool::TaskPool::spawn::{{closure}}::h61be2353f29577b0 @ bevy_game_bg.wasm:0x556610
$wasm_bindgen_futures::queue::Queue::new::{{closure}}::h3de27792acef8a83 @ bevy_game_bg.wasm:0x1025ef6
$wasm_bindgen::convert::closures::invoke1_mut::h767562161e2892f8 @ bevy_game_bg.wasm:0x15eece5
__wbg_adapter_60 @ bevy_game.js:234
real @ bevy_game.js:203
bevy_game.js:376 ERROR /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_asset-0.12.1/src/server/mod.rs:300 encountered an io error while loading asset: Encountered unexpected HTTP status 403

EDIT: It works on my web server, so it's likely an issue with the files/assets location on itch (perhaps with the relative/absolute paths). Note that I still get the errors that meta files are missing, but the game still seems to work as expected.

@alice-i-cecile
Copy link
Member

First reported in bevyengine/bevy#10157.

The bandaid fix for this was shipped in bevyengine/bevy#10623.

Remember that you need to insert this resource before adding default plugins.

@PraxTube
Copy link
Author

Thank you so much <3

@alice-i-cecile
Copy link
Member

We should add this config to the template before closing this out :)

@alice-i-cecile alice-i-cecile added bug Something isn't working good first issue Good for newcomers labels Dec 13, 2023
PraxTube added a commit to PraxTube/bevy_github_ci_template that referenced this issue Dec 13, 2023
PraxTube added a commit to PraxTube/bevy_github_ci_template that referenced this issue Dec 13, 2023
sibevin pushed a commit to sibevin/chain-reaction that referenced this issue Jan 6, 2024
@askor
Copy link

askor commented Feb 5, 2024

Is this the reason this template is still on Bevy 0.11? Should be bumped to 0.12 if not

@alice-i-cecile
Copy link
Member

This should be bumped, yes :)

@PraxTube
Copy link
Author

PraxTube commented Feb 6, 2024

Is this the reason this template is still on Bevy 0.11? Should be bumped to 0.12 if not

It's fixed in #49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants