Skip to content

Firefox stack traces confuse the parse regex #13

@wycats

Description

@wycats

This is a variant of the bug in #6.

Consider this stack frame, created by Firefox:

create@http://localhost:3001/@fs/home/wycats/Code/Starbeam/starbeam/packages/debug/src/stack.ts:88:28

This ends up resulting in a parsed stack frame with file === "fs/home/wycats/Code/Starbeam/starbeam/packages/debug/src/stack.ts".

TL;DR I believe that the regex in rawParse needs to match the portion before @ with a non-greedy regex:

-        (line.slice(0, 3) !== "at " && (planA = line.match(/(.*)@(.*)/)))
+        (line.slice(0, 3) !== "at " && (planA = line.match(/(.*?)@(.*)/)))

Does this make sense to you or are there other places that need this fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions