getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.94k stars 1.56k forks source link

Problem with uploading debug information to with `@sentry/wasm` #9505

Open AnDevi opened 11 months ago

AnDevi commented 11 months ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

7.79.0

Framework Version

@sentry/wasm (7.77.0)

Link to Sentry event

SDK Setup

Sentry.init({ dsn: "my-dns", integrations: [new WasmIntegration()], });

Steps to Reproduce

I'm using MacOS and sentry-cli 2.21.2 and wasm-split 23.10.1

I'm trying to use Sentry with WebAssembly and c++ native code. I did everything like you said in tutorial.

Then I force my native code to invoke runtime error. I can see event is registered in my Sentry's project.

Expected Result

I can see call stack but only with functions names. I believe that I should see also file names and line numbers etc in that call stack but I don't. I far as I know I should also see section Loaded Images in my event, with id which was embedded with wasm-split but I also don't.

Actual Result

What I noticed and I think that may be an issue wasm-split displays ID added, but during uploading debug info to sentry with sentry-cli this ID is always modified with the same pattern.

ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is transformed into: 10xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (adds prefix 10 and cuts last two signs).

I wonder if that is the problem why my event isn't connected with its debug info I uploaded? Or if it (changing id) is expected behaviour what else can be the problem?

Thanks a lot for any help!

image

mydea commented 11 months ago

Hey, thanks for writing in. Could you share the link to the issue (or any example issue, really) where you can observe this, then we can take a look at this and see what we need to adjust!

AnDevi commented 11 months ago

@mydea here it'is: https://explain-everything.sentry.io/issues/4616211355/?project=4506162193629184&query=is%3Aunresolved&referrer=issue-stream&stream_index=0

mitsuhiko commented 11 months ago

@AnDevi would it be possible for us to set up a call? I have a few questions about how you are using WebAssembly to better understand your setup. Unfortunately the current state of affairs of WASM is that there are many slightly different patterns and setups and whatever is happening here is bypassing the wasm integration. I'm very keen on getting the resolved, but I'm a bit at a loss here of what is going on.

Can you mail me at armin@sentry.io if you are up to it?

AnDevi commented 11 months ago

Yeah sure, we can make a call, I will reach you in the email ;)

AnDevi commented 11 months ago
RuntimeError: memory access out of bounds
    at MyClass::bar(int) const (http://localhost:8001/main.wasm:wasm-function[190]:0x5aeb)
    at MyClass::foo(int) const (http://localhost:8001/main.wasm:wasm-function[186]:0x5637)
    at MyClass::getAt(int) const (http://localhost:8001/main.wasm:wasm-function[182]:0x540b)
    at emscripten::internal::MethodInvoker<int (MyClass::*)(int) const, int, MyClass const*, int>::invoke(int (MyClass::* const&)(int) const, MyClass const*, int) (http://localhost:8001/main.wasm:wasm-function[152]:0x47df)
    at ClassHandle.MyClass$getAt [as getAt] (eval at newFunc (http://localhost:8001/main.js:2201:27), <anonymous>:9:10)
    at myFunctionVectorOutOfBounds (http://localhost:8001/main.html:18:22)
    at captureError (http://localhost:8001/main.html:27:11)
    at Object.onRuntimeInitialized (http://localhost:8001/main.html:39:9)
    at doRun (http://localhost:8001/main.js:7084:71)
    at run (http://localhost:8001/main.js:7101:5)
AnDevi commented 10 months ago

Hi, Is there any progress in that issue ? ;)

Lms24 commented 10 months ago

Hi, sorry, no progress at this time as we're busy with other tasks.