Skip to content

Electron - For the module field, exclude anything before .asar/ #686

@armenzg

Description

@armenzg

I'm noticing Electron stacktraces including a full path for the module value rather than just the module.
For instance, this: C:\Users\User\AppData\Local\Programs\<company_name_here>\resources\app.asar\main instead of just main by replacing everything that comes before .asar\.

The data I'm looking at may have no source maps or lack of context lines.

This causes grouping issues downstream. You can validate this in an Electron project with Discover by querying for stack.module:"C:\Users*" and using the following columns (see screenshot).
image

I see the following values:

  • module: `C:\Users\User\AppData\Local\Programs\<company_name_here>\resources\app.asar\main
  • filename: app:///main.js
  • abs_path: app:///main.js

I would expect the values to be:

  • module: main
  • filename: app:///main.js
  • abs_path: C:\\Users\\User\\AppData\\Local\\Programs\\<company_name_here>\\resources\\app.asar\\main.js

Q: Would this be a reasonable fix?

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions