-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
@sentry/wasm will not work if wasm url is a blob url #8259
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
Comments
Hi @iven thanks for writing in and for identifying the problematic line of code. We'll take a look at this. We can for sure keep the SDK from throwing an error here but I'm not sure yet if errors from wasm modules loaded as blobs are symbolicated correctly. |
Would you be able to share a minimal reproduction example? I'm curious about how you load your wasm module as a blob. Thanks! |
More background on support for WASM from blobsTalked about this further offline with @mitsuhiko. With #8263 we definitely fix the error being thrown but it will lead to unsymbolicated stack traces for errors from the WASM module. To correctly symbolicate frames from WASM modules, we need the file URL. If the module is sentry-javascript/packages/wasm/src/patchWebAssembly.ts Lines 15 to 17 in bf9a265
For modules loaded via blobs or binary streams, etc. (i.e. WASM modules that are not directly fetched), we don't have such an URL (due to the missing response) but the browser internally generates a random url. We could potentially explore the following:
|
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/wasm
SDK Version
7.53.1
Framework Version
No response
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
URL.createObjectURL()
.Expected Result
The event is reported to Sentry.
Actual Result
Browser throws an error
TypeError: Failed to construct 'URL': Invalid URL
.I think it's caused by:
sentry-javascript/packages/wasm/src/registry.ts
Line 52 in 8482c0a
Passing a
blob:http://xxxx
tonew URL()
is not legal.The text was updated successfully, but these errors were encountered: