getsentry / getsentry/sentry-javascript

@sentry/wasm: `wasm://wasm/` frames miss `debug_meta` on non-streaming `instantiate(buffer)`

Abierto
#23,781 2 comentarios 0 reacciones 1 asignado Reclamado por @andreiborza Ver en GitHub
Bug
Lenguaje dominante
TypeScript
Estrellas
8.7k
Forks
1.8k
Merge medio
1 d 17 h
PR fusionados (30 d)
515

Descripción

### Description

### Problem
`fetch` → `arrayBuffer()` → `WebAssembly.instantiate(buffer)` can produce frames like:
`wasm://wasm/0bee4c4e:wasm-function[1]:0x8c` (no file URL).

Module is registered, but `patchFrames` fails: streaming regex matches first, `getImage('wasm://wasm/…')` misses, `debug_meta.images` never attached.

### Works / breaks
- ✅ `instantiateStreaming`
- ✅ `instantiate(buffer)` when stack has `http://…/file.wasm:wasm-function[…]` (Emscripten, dev Rust)
- ❌ `instantiate(buffer)` + `wasm://wasm/…` (minimal wasm, e2e `simple.wasm`)
- ❌ 2+ registered wasm modules (`wasm://wasm/` not mappable)
- ❌ module not registered (no `build_id` / untagged buffer)

### Proposed fix
1. Handle `wasm://wasm/…` before streaming regex
2. Map to sole registered module when count === 1
3. `postprocessEvent` hook
4. Browser e2e: `suites/wasm/nonStreaming/`

### Limitation
Single registered wasm module only until multi-module mapping exists.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.