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

Error with webviewer #8377

Open
praveen-aurora opened this issue Dec 9, 2024 · 15 comments
Open

Error with webviewer #8377

praveen-aurora opened this issue Dec 9, 2024 · 15 comments
Labels
🪳 bug Something isn't working 🕸️ web regarding running the viewer in a browser

Comments

@praveen-aurora
Copy link

Describe the bug
Got error with web viewer:
LinkError: WebAssembly.instantiate(): Import #10 "wbg" "__wbg_structuredClone_046ae3829d60ba4b": function import requires a callable

To Reproduce
Built the web viewer with 0.20.3 and tried to run it on of my .rrd files.

Rerun version
0.20.3

@praveen-aurora praveen-aurora added 👀 needs triage This issue needs to be triaged by the Rerun team 🪳 bug Something isn't working labels Dec 9, 2024
@Wumpf
Copy link
Member

Wumpf commented Dec 10, 2024

@praveen-aurora how did you run & build the web viewer exactly?

@praveen-aurora
Copy link
Author

I checked out the repo at the 0.20.3 commit, and ran

pixi run rerun-build-web-release

from the web_viewer subfolder. Then I uploaded the files in that folder to our internal web server and invoked the viewer that way.

I also tried copying the web viewer assets from https://app.rerun.io/version/0.20.3/ to our internal web server and invoking the viewer, and got a similar error.

@Wumpf
Copy link
Member

Wumpf commented Dec 10, 2024

Thanks! I just tried git checkout 0.20.3 && pixi run rerun-web-release (that's intentionally without the build, so I can test it in-place) on a Windows machine and it worked fine, so not sure what's up there 🤔
Afaik this error usually means that the accompanying js (the generated one at ./web_viewer/re_viewer.js) isn't looking for the right things in the wasm blob. Did you make sure to update that on your web server as well? Otherwise (long shot) you might need to try doing a clean rebuild if you haven't already.

@praveen-aurora
Copy link
Author

I'll do some more testing on my end to try and narrow things down. As part of that, I was wondering if

https://app.rerun.io/version/0.20.3/index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd

should work? it briefly shows a rerun logo in the top left corner and then the entire page is black.

Here's what the developer console shows:

`loading wasm…
re_viewer.js:3808 using deprecated parameters for the initialization function; pass a single object instead
__wbg_init @ re_viewer.js:3808
wasm_with_progress @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:316
await in wasm_with_progress
load_wasm @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:321
(anonymous) @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:218Understand this warningAI
index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:327 Wasm loaded. Starting app…
index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:399 found 0 values for "notebook" query. Expected one or none. Defaulting to "false".
get_query_bool @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:399
on_wasm_loaded @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:352
(anonymous) @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:317
Promise.then
wasm_with_progress @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:317
await in wasm_with_progress
load_wasm @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:321
(anonymous) @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:218Understand this warningAI
index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:399 found 0 values for "persist" query. Expected one or none. Defaulting to "true".
get_query_bool @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:399
on_wasm_loaded @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:353
(anonymous) @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:317
Promise.then
wasm_with_progress @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:317
await in wasm_with_progress
load_wasm @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:321
(anonymous) @ index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:218Understand this warningAI
re_viewer.js:3326 [eframe::web::web_painter_wgpu] eframe-0.29.1/src/web/web_painter_wgpu.rs:90: Creating wgpu painter
re_viewer.js:3326 [eframe::web::web_painter_wgpu] eframe-0.29.1/src/web/web_painter_wgpu.rs:111: Creating wgpu instance with backends Backends(GL | BROWSER_WEBGPU)
re_viewer.js:3326 [eframe::web::web_painter_wgpu] eframe-0.29.1/src/web/web_painter_wgpu.rs:136: Attempting to create WebGPU adapter to check for support.
re_viewer.js:3326 [eframe::web::web_painter_wgpu] eframe-0.29.1/src/web/web_painter_wgpu.rs:147: Successfully created WebGPU adapter, WebGPU confirmed to be supported!
re_viewer.js:3326 [egui_wgpu] egui-wgpu-0.29.1/src/lib.rs:132: Picked wgpu adapter: backend: BrowserWebGpu, device_type: Other
re_viewer.js:3326 [eframe::web::web_painter_wgpu] eframe-0.29.1/src/web/web_painter_wgpu.rs:194: wgpu painter initialized.
re_viewer.js:3326 [re_renderer::context] re_renderer/src/context.rs:559: wgpu adapter backend: BrowserWebGpu, device_type: Other
re_viewer.js:3326 [re_log_encoding::stream_rrd_from_http] re_log_encoding/src/stream_rrd_from_http.rs:71: Downloading .rrd file from "https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd"…
re_viewer.js:2831 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ re_viewer.js:2831
handleError @ re_viewer.js:312
(anonymous) @ re_viewer.js:2830
$web_sys::features::gen_EventTarget::EventTarget::add_event_listener_with_callback::hab318a3eea1df7ad @ re_viewer.wasm-0696f092:0x13dc113
$wasm_bindgen_futures::future_to_promise::{{closure}}::{{closure}}::hd980bbc269019a13 @ re_viewer.wasm-0696f092:0xd4289a
$wasm_bindgen_futures::queue::QueueState::run_all::h124a52d7f841e37b @ re_viewer.wasm-0696f092:0xff6eb7
$wasm_bindgen_futures::queue::Queue::new::{{closure}}::h1d6933c1adf70c18 @ re_viewer.wasm-0696f092:0x142081e
$<dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h66964933c470d0b9 @ re_viewer.wasm-0696f092:0x1420810
__wbg_adapter_89 @ re_viewer.js:307
real @ re_viewer.js:207
re_viewer.js:2831 [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ re_viewer.js:2831
handleError @ re_viewer.js:312
(anonymous) @ re_viewer.js:2830
$web_sys::features::gen_EventTarget::EventTarget::add_event_listener_with_callback::hab318a3eea1df7ad @ re_viewer.wasm-0696f092:0x13dc113
$wasm_bindgen_futures::future_to_promise::{{closure}}::{{closure}}::hd980bbc269019a13 @ re_viewer.wasm-0696f092:0xd431de
$wasm_bindgen_futures::queue::QueueState::run_all::h124a52d7f841e37b @ re_viewer.wasm-0696f092:0xff6eb7
$wasm_bindgen_futures::queue::Queue::new::{{closure}}::h1d6933c1adf70c18 @ re_viewer.wasm-0696f092:0x142081e
$<dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h66964933c470d0b9 @ re_viewer.wasm-0696f092:0x1420810
__wbg_adapter_89 @ re_viewer.js:307
real @ re_viewer.js:207
re_viewer.js:3326 [re_viewer::web] re_viewer/src/web.rs:87: Web app started.
index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd:424 App started.
re_viewer.js:3326 [re_viewer::app] re_viewer/src/app.rs:476: Received AddReceiver
re_viewer.js:3326 [re_log_encoding::stream_rrd_from_http] re_log_encoding/src/stream_rrd_from_http.rs:85: Decoding .rrd file from "https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd"…
2re_viewer.js:3320 [eframe::web::app_runner] eframe-0.29.1/src/web/app_runner.rs:231: Unhandled egui viewport command: RequestUserAttention(Informational) - not implemented in web backend
imports.wbg.__wbg_warn_884ccee6c0f9704c @ re_viewer.js:3320
$<re_log::web_logger::WebLogger as log::Log>::log::h8c177bd692179428 @ re_viewer.wasm-0696f092:0xeacd03
$<re_log::multi_logger::MultiLogger as log::Log>::log::hf9fd8b26e4330513 @ re_viewer.wasm-0696f092:0x1148ce6
$log::__private_api::log_impl::h9e90d4d16fb50b5d @ re_viewer.wasm-0696f092:0x122a636
$eframe::web::app_runner::AppRunner::logic::hd52f36dfba46b8c0 @ re_viewer.wasm-0696f092:0x719d47
$eframe::web::events::paint_if_needed::hca474e3a2c652b99 @ re_viewer.wasm-0696f092:0xe841e8
$<T as wasm_bindgen::closure::WasmClosureFnOnce<(),R>>::into_fn_mut::{{closure}}::h7f0ca7abfd8b4a18 @ re_viewer.wasm-0696f092:0xf7fa6c
$<dyn core::ops::function::FnMut<()>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h099631e4224716cf @ re_viewer.wasm-0696f092:0x13bc0df
__wbg_adapter_55 @ re_viewer.js:246
real @ re_viewer.js:207
requestAnimationFrame
(anonymous) @ re_viewer.js:1989
handleError @ re_viewer.js:312
(anonymous) @ re_viewer.js:1988
$eframe::web::web_runner::WebRunner::request_animation_frame::he3dd2d0e47980aab @ re_viewer.wasm-0696f092:0xe3c8fa
$<T as wasm_bindgen::closure::WasmClosureFnOnce<(),R>>::into_fn_mut::{{closure}}::h7f0ca7abfd8b4a18 @ re_viewer.wasm-0696f092:0xf7fa83
$<dyn core::ops::function::FnMut<()>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h099631e4224716cf @ re_viewer.wasm-0696f092:0x13bc0df
__wbg_adapter_55 @ re_viewer.js:246
real @ re_viewer.js:207
requestAnimationFrame
(anonymous) @ re_viewer.js:1989
handleError @ re_viewer.js:312
(anonymous) @ re_viewer.js:1988
$eframe::web::web_runner::WebRunner::request_animation_frame::he3dd2d0e47980aab @ re_viewer.wasm-0696f092:0xe3c8fa
$eframe::web::events::install_resize_observer::{{closure}}::h4bc2927cd4082cd2 @ re_viewer.wasm-0696f092:0x7f91bd
$<dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h024b2263bea7f6f2 @ re_viewer.wasm-0696f092:0x141f80b
__wbg_adapter_50 @ re_viewer.js:240
real @ re_viewer.js:207Understand this warningAI
re_viewer.js:3320 ERROR: [re_renderer::error_handling::error_tracker] re_renderer/src/error_handling/error_tracker.rs:158: Wgpu validation error 2: Unable to create library object: program_source:165:46: error: called object type 'float' is not a function or function pointer
float const tint_symbol_85 = tint_symbol_85(tint_symbol_87.tint_symbol_56, tint_symbol_87.tint_symbol_57, tint_symbol_87.tint_symbol_75, tint_module_vars);
~~~~~~~~~~~~~~^
.

  • While calling [Device "re_renderer device"].CreateRenderPipeline([RenderPipelineDescriptor]).

imports.wbg.__wbg_warn_884ccee6c0f9704c @ re_viewer.js:3320
$<re_log::web_logger::WebLogger as log::Log>::log::h8c177bd692179428 @ re_viewer.wasm-0696f092:0xeaccdf
$<re_log::multi_logger::MultiLogger as log::Log>::log::hf9fd8b26e4330513 @ re_viewer.wasm-0696f092:0x1148ce6
$tracing::__macro_support::__tracing_log::h33ee6b9603301317 @ re_viewer.wasm-0696f092:0x124cc89
$re_renderer::error_handling::error_tracker::ErrorTracker::handle_error::h8709b38e1176e607 @ re_viewer.wasm-0696f092:0x6fb4ba
$re_renderer::error_handling::handle_async_error::{{closure}}::h48db00fe8d411541 @ re_viewer.wasm-0696f092:0xde4b01
$wasm_bindgen_futures::queue::QueueState::run_all::h124a52d7f841e37b @ re_viewer.wasm-0696f092:0xff6eb7
$wasm_bindgen_futures::queue::Queue::new::{{closure}}::h1d6933c1adf70c18 @ re_viewer.wasm-0696f092:0x142081e
$<dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h66964933c470d0b9 @ re_viewer.wasm-0696f092:0x1420810
__wbg_adapter_89 @ re_viewer.js:307
real @ re_viewer.js:207Understand this warningAI
re_viewer.js:3320 ERROR: [re_renderer::error_handling::error_tracker] re_renderer/src/error_handling/error_tracker.rs:158: Wgpu validation error 3: [Invalid RenderPipeline (unlabeled)] is invalid.

  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline (unlabeled)]).
  • While finishing [CommandEncoder (unlabeled)].

imports.wbg.__wbg_warn_884ccee6c0f9704c @ re_viewer.js:3320
$<re_log::web_logger::WebLogger as log::Log>::log::h8c177bd692179428 @ re_viewer.wasm-0696f092:0xeaccdf
$<re_log::multi_logger::MultiLogger as log::Log>::log::hf9fd8b26e4330513 @ re_viewer.wasm-0696f092:0x1148ce6
$tracing::__macro_support::__tracing_log::h33ee6b9603301317 @ re_viewer.wasm-0696f092:0x124cc89
$re_renderer::error_handling::error_tracker::ErrorTracker::handle_error::h8709b38e1176e607 @ re_viewer.wasm-0696f092:0x6fb4ba
$re_renderer::error_handling::handle_async_error::{{closure}}::h48db00fe8d411541 @ re_viewer.wasm-0696f092:0xde4b01
$wasm_bindgen_futures::queue::QueueState::run_all::h124a52d7f841e37b @ re_viewer.wasm-0696f092:0xff6eb7
$wasm_bindgen_futures::queue::Queue::new::{{closure}}::h1d6933c1adf70c18 @ re_viewer.wasm-0696f092:0x142081e
$<dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h66964933c470d0b9 @ re_viewer.wasm-0696f092:0x1420810
__wbg_adapter_89 @ re_viewer.js:307
real @ re_viewer.js:207Understand this warningAI
42[Violation] 'requestAnimationFrame' handler took ms
re_viewer.js:3326 [re_log_encoding::stream_rrd_from_http] re_log_encoding/src/stream_rrd_from_http.rs:96: Finished decoding .rrd file from "https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd"…
re_viewer.js:3326 [re_viewer::app] re_viewer/src/app.rs:1163: Data source https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd has finished`

@praveen-aurora
Copy link
Author

Ok, I think the nuscenes one specifically isn't working. So I'm testing with the arkit one, which is.

@praveen-aurora
Copy link
Author

Ok, I tried out launching the viewer with the pixi command you used - that works for me to load the arkit example, but the nuscenes example and my own rrd both briefly show the UI and then immediately go black. So I think the nuscenes example is one that provides a good repro of the issue.

@Wumpf
Copy link
Member

Wumpf commented Dec 10, 2024

Huh strange! http://app.rerun.io/version/0.20.3/index.html?url=https://app.rerun.io/version/0.20.3/examples/nuscenes_dataset.rrd works just fine for me. Tested it on Windows in Firefox & Chrome. Maybe it's a browser cache issue?

@praveen-aurora
Copy link
Author

praveen-aurora commented Dec 10, 2024 via email

@praveen-aurora
Copy link
Author

The good news is that my rrd also works in Safari. However, even with clearing the cache in Chrome it doesn't work in Chrome.

@sashankaryal
Copy link

sashankaryal commented Dec 10, 2024

I'm having the same issue on Mac (M1). I cannot view my .rrd files anymore on chrome. It's the same bug that you see when you browse nuscenes.

It works in Firefox 133.0b2 (aarch64) but not in the latest chrome version 131.0.6778.140. I tried it in a private window, too, but no luck. I've screenshotted and attached my browser's logs:

Image

@Wumpf
Copy link
Member

Wumpf commented Dec 11, 2024

@sashankaryal that's a different but also very concerning issue: it looks like chrome's webgpu impl no longer accepts one of our shaders. To narrow this down a bit, what does your scene display?

@Wumpf
Copy link
Member

Wumpf commented Dec 11, 2024

Ah sorry it says nuscenes right there. Hum I I'm trying on M1 Chrome n 131.0.6778.140 as well and can't repro the issue :/

@Wumpf
Copy link
Member

Wumpf commented Dec 11, 2024

@Wumpf Wumpf added 🕸️ web regarding running the viewer in a browser and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Dec 11, 2024
@sashankaryal
Copy link

sashankaryal commented Dec 11, 2024

Yes, it works if I force the webgl renderer.

For the default webgpu mode, I restarted my browser, downgraded, upgraded back again, tried in private mode, no luck. What's confusing is that it works on other recordings, like ARKit, although it does complain about some wgpu error. I've attached a screenshot. With nuscenes, it doesn't even get to that point.

Image

@Wumpf
Copy link
Member

Wumpf commented Dec 11, 2024

Thanks for going through the trouble and trying all these. Seems to be a very similar error though. In either case Chrome has trouble with one of our wgsl shaders 🤔. Very strange indeed! The error itself sounds a bit like its happening once Chrome is finished translating to MSL (metal shading language) and then wants to compile it, so maybe it's OS version dependent? My M1 is still on 14.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

No branches or pull requests

3 participants