You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DebugImage has no sourcemap variant, so events carrying JS debug IDs fail to deserialize #1267
Once debug IDs are injected, @sentry/browser attaches debug_meta.images[{ "type": "sourcemap", ... }] to every event.
Expected result
The event deserializes and is sent, as it does when the bundler plugin is absent
or sourcemaps: { disable: true } is set.
Actual result
symbolic / proguard / wasm, with no sourcemap variant and no catch-all. Envelope::from_slice eagerly parses the event item, hits the unknown variant,
and returns InvalidItemPayload.
Downstream, tauri-plugin-sentry's if let Ok(...) has no error arm, so 100%
of frontend events are dropped with no diagnostic. Rust-side panics keep
arriving, so the project looks healthy while all JS telemetry is gone.
Both threads are on the bundler plugin's tracker, but the change has to happen
in this crate and I couldn't find an issue here, so I'm filing one.
Verified against master today: still no variant. Same at 0.42.0 and 0.46.2, so
a version bump doesn't help.
Suggested fix, either or ideally both:
Add the variant. The wire name is sourcemap, not snake_case source_map,
so it needs an explicit #[serde(rename = "sourcemap")].
Add a catch-all so an unknown image type can't fail the whole event. This is
the more valuable half: this enum deserializes data produced by other Sentry
SDKs on independent release cycles, so a future variant will do this again.
Attribution note: both suggested fixes above are @ottosson's, from the linked
comment on bundler-plugins#916, including the Other(Map<String, Value>) catch-all
and the observation that the Context enum in this same file already has one. I'm
filing here because the change belongs in this crate and I couldn't find an issue
for it on this tracker.
Unfortunately, the specific fixes proposed here (adding a SourceMap variant and a catch-all variant) would require breaking changes to the SDK’s public API because they would add variants to the DebugImage enum, which is public and exhaustive.
The sentry-tauri plugin does not appear to be widely used, and it is not an official Sentry product. While this is a valid issue, I do not believe it would justify issuing a breaking SDK release solely for this fix. I will therefore label the issue as a breaking change, and we will aim to include typed support in the next breaking release. We do not currently have a timeline for that release, but it is likely at least a few months away.
In the meantime, the problem can be mitigated in the sentry-tauri plugin. The plugin silently ignores envelopes that the Rust SDK fails to deserialize by handling only the Ok variant of the Result. It should likely log the parse error and fall back to Envelope::from_bytes_raw, preserving the original envelope bytes for forwarding without parsing them.
This is not an ideal solution because the Rust-side typed event preprocessing will not run for the fallback path. In particular, the plugin will not be able to modify the event or move attachments into the Rust scope. That preprocessing is a central purpose of sentry-tauri. However, preserving and forwarding the original envelope is likely preferable to losing the event entirely. It is also more robust than adding support only for the sourcemap debug-image type, since it would preserve events containing other valid protocol fields that this SDK version does not understand.
Activity
linear-code commentedon Jul 25, 2026
RUST-270
sidsri14 commentedon Jul 25, 2026
szokeasaurusrex commentedon Jul 27, 2026
Hi @haithemobeidi, thank you for reporting, and for the detailed investigation! I am adding this to our backlog, looks like a valid bug.
szokeasaurusrex commentedon Aug 2, 2026
Hi @haithemobeidi, I investigated this a bit more.
Unfortunately, the specific fixes proposed here (adding a
SourceMapvariant and a catch-all variant) would require breaking changes to the SDK’s public API because they would add variants to theDebugImageenum, which is public and exhaustive.The
sentry-tauriplugin does not appear to be widely used, and it is not an official Sentry product. While this is a valid issue, I do not believe it would justify issuing a breaking SDK release solely for this fix. I will therefore label the issue as a breaking change, and we will aim to include typed support in the next breaking release. We do not currently have a timeline for that release, but it is likely at least a few months away.In the meantime, the problem can be mitigated in the
sentry-tauriplugin. The plugin silently ignores envelopes that the Rust SDK fails to deserialize by handling only theOkvariant of theResult. It should likely log the parse error and fall back toEnvelope::from_bytes_raw, preserving the original envelope bytes for forwarding without parsing them.This is not an ideal solution because the Rust-side typed event preprocessing will not run for the fallback path. In particular, the plugin will not be able to modify the event or move attachments into the Rust scope. That preprocessing is a central purpose of
sentry-tauri. However, preserving and forwarding the original envelope is likely preferable to losing the event entirely. It is also more robust than adding support only for thesourcemapdebug-image type, since it would preserve events containing other valid protocol fields that this SDK version does not understand.ottosson commentedon Aug 10, 2026
I'm using a fixed fork until the fix lands upstream. I've tested it and verified that it's working. I'll just add it here If it's of any value at all to you: master...ottosson:sentry-rust:sourcemap-debug-image-0.49