-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Compiled function token has no original name mapping in produced source map #52483
Comments
cc @Swatinem @loewenheim @marandaneto for visibility. |
@kamilogorek we can look at their own symbolicator source code: source_map_stack_trace But let's wait for the Dart team to follow up since we already have a workaround. |
Thanks for reaching out! I'm curious to learn more about what does your symbolication service provides and whether it matches how we produce source-maps. Our encoding of source-map was tailored for two use cases: local debugging and deobfuscation of production stack traces. Years ago we had a lot of symbol information that was never in use and we started noticing the tax (e.g. memory utilization on deobfuscation servers). As a result, today we use a frugal approach and only include symbol information if it supports known scenarios.
We hope that one day source-maps will consider incorporating some of these extensions in the future into the standard, but that will take time. This is being tracked in tc39/ecma426#40 In terms of code - note that the links shared by @marandaneto are packages that make use of regular source-maps without our custom extensions. I'd recommend also looking at the dart2js deobfuscator. You'll see the use of the minified data where we translate error messages, and the use of the inline data in the logic mapping stack traces. To address the specific question about the |
At Sentry we try to resolve the scope a token is in and use that as the function name because the name is often something like |
It appears that produced source map mappings are generated in a quite odd name. The produced function token doesn't have a valid reference to its original name, however, brackets that are part of that scope do, eg:
Or a more concrete example:
The
A.Tt.prototype.$0
scope can’t be resolved, but columns 3 (open paren), 6 (throw), 16 (the second A), and 39 (closing brace) in the second line refer to the correct name.We worked around this in our processing pipeline here getsentry/symbolic#786 but would be great to understand how is this exactly produced, how should we interpret this, and potentially fix (if one applies) this in future releases.
I was asked to do so, thus cc: @sigmundch
The text was updated successfully, but these errors were encountered: