Skip to content

Support more lenient error stack symbolication and don't fail for "empty url" and "address at" frames #188

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

Merged
merged 1 commit into from
Jul 7, 2025

Conversation

vzaidman
Copy link

@vzaidman vzaidman commented Jul 2, 2025

Summary

(Notice, followup PR #187 adds tracking to these cases in 4494278)

Supporting stack traces with "empty URL" and "address at" URLs such as:

at onUnhandled (address at InternalBytecode.js:1:3386)

and

at global (:1:29)

in the following stack trace:

Error: Uncaught (in promise, id: 2): "Error: test error"
    at onUnhandled (promiseRejectionTrackingOptions.js:40:16)
    at onUnhandled (address at InternalBytecode.js:1:3386) // <---
Caused by: Error: test error
    at anonymous (&platform=android&lazy=true&app=com.oculus.twilight&modulesOnly=true&sourcePaths=url-server&unstable_transformProfile=hermes-stable&dev=true&minify=false&runModule=false&shallow=true:47:30)
    at global (:1:29)  // <---
Caused by: Error: cause
    at anonymous (&platform=android&lazy=true&app=com.oculus.twilight&modulesOnly=true&sourcePaths=url-server&unstable_transformProfile=hermes-stable&dev=true&minify=false&runModule=false&shallow=true:48:32)
    at global (:1:29)

This only allows having the following frames parsed as strings to unblock the symbolication of stack traces that contain them. However, the plans (T230100719) for them are:

  • For (native) frames- these might be enhanced to include the C++ loc for the frame so that a debugger could stitch together a hybrid cross-language call stack.
  • For empty urls- this seems to be like a bug that needs to be investigated and produce an actual script URL instead.
  • For address at frames- these could be symbolicated and link to source files with the help of a bytecode source maps once they are available.

more info:
https://docs.google.com/document/d/1Gq67flOcb37KbzmJ05G43TWAYxoxp391daAkmuEx8FQ/edit?usp=sharing

Test plan

The following stack trace gets symbolicated:
Screenshot 2025-07-02 at 14 19 10

  • This change maintains backwards compatibility with previous Local Storage data (if modifying settings, experiments, or other persisted client state).

Upstreaming plan

  • This commit should be sent as a patch to the upstream devtools-frontend repo. I've reviewed the contribution guide.
  • This commit is React Native-specific and cannot be upstreamed.

@vzaidman vzaidman force-pushed the stack-traces-empty-urls-and-address-at branch from 9521296 to 8ca201f Compare July 3, 2025 13:23
@vzaidman vzaidman changed the title Support empty urls and "address at" in stack traces Support more lenient error stack symbolication and don't fail for "empty url" and "address at" frames Jul 4, 2025
@vzaidman vzaidman force-pushed the stack-traces-empty-urls-and-address-at branch 2 times, most recently from 3fa3ed8 to 217c7e8 Compare July 4, 2025 16:10
@vzaidman vzaidman requested a review from motiz88 July 4, 2025 16:17
@vzaidman vzaidman force-pushed the stack-traces-empty-urls-and-address-at branch 2 times, most recently from 75b6d08 to 1a8dbf9 Compare July 7, 2025 12:06
@vzaidman vzaidman force-pushed the stack-traces-empty-urls-and-address-at branch from 1a8dbf9 to 5a83988 Compare July 7, 2025 14:32
@vzaidman vzaidman merged commit ffa6bb6 into main Jul 7, 2025
5 checks passed
@vzaidman vzaidman deleted the stack-traces-empty-urls-and-address-at branch July 7, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants