-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Electron - For the module field, exclude anything before .asar/ #686
Electron - For the module field, exclude anything before .asar/ #686
Comments
From the original issue:
This is snippet is from project 5599205 and group 4019798020 (redacted name of user):
If you use Discover and filter for |
Hi, the project you shared uses quite an old version of the electron SDK ( |
I've looked through my production apps and can't find anything so I would definitely try updating to the SDK to the latest first.
It should but this might be something we're missing in some cases with @armenzg, if you're still getting issues with the latest SDK, can you supply the full, raw, minified stack string (with username redacted) and I should be able to get a better idea of what's going on. You can get that by ticking these two boxes: |
@timfish I'm reporting on behalf of the customer, thus, I can't upgrade their SDK. I've got the analytics showing how many groups got created on June 1st by SDK version and project ID. Query:
|
@armenzg are you able to supply an example of the full, raw, minified stack string with username redacted? |
@timfish Does this help? Thanks for looking into this!
{
"culprit": "s(C:\\Users\\<redacted>\\AppData\\Local\\Programs\\<redacted>\\resources\\app.asar\\main)",
"exception": {
"values": [
{
"stacktrace": {
"frames": [
{
"function": "IncomingMessage.<anonymous>",
"module": "C:\\Users\\<redacted>\\AppData\\Local\\Programs\\<redacted>\\resources\\app.asar\\main",
"filename": "app:///main.js",
"abs_path": "app:///main.js",
"lineno": 432,
"colno": 544,
"pre_context": [
"{snip} efineProperty(w,\"__esModule\",{value:!0}),w.CancellationError=w.CancellationToken=void 0;const e=t(82 361);class c extends e.EventEmitter{cons {snip}",
"`+JSON.stringify(T,null,\" \"))+`",
"{snip} tusCode=T,this.description=N,this.name=\"HttpError\",this.code=`HTTP_ERROR_${T}`}isServerError(){return this.statusCode>=500&&this.statusCode< {snip}",
"",
"Please double check that your authentication token is correct. Due to security reasons, actual status maybe not reported, but 404."
],
"context_line": "{snip} .find(Ne=>Ne.includes(\"json\"))!=null:J.includes(\"json\"));I(s(T,`method: ${O.method||\"GET\"} url: ${O.protocol||\"https:\"}//${O.hostname}${O.po {snip}",
"post_context": [
"",
" Data:",
" ${_e?JSON.stringify(JSON.parse(G)):G}",
"{snip} owed size is 500 MB\"));return}F=Buffer.alloc(G),K=0}}V.on(\"data\",G=>{if(K!==-1)G.copy(F,K),K+=G.length;else if(F==null)F=G;else{if(F.length> {snip}",
"`).join(`"
],
"in_app": true
}, |
I've run some tests with the |
I still have no idea what's causing this but you can disable the module parsing for stack frames in the main process by overriding the import { createStackParser, nodeStackLineParser } from '@sentry/utils';
import { init } from '@sentry/electron/main';
init({
dsn: '__DSN__',
stackParser: createStackParser(nodeStackLineParser())
}); If I'm supplied a minimal reproduction of this issue that I can debug locally I might have a better chance of tracking down how this is happening. |
Hi @timfish is there a demo app for Mac I can tweak? Also, taking note that I believe this is lacking source maps, this is why the context line is full of snip values: |
This issue may improve the cases where context-line is too long. If that fix makes the context-line not to be excluded we will not use the Nevertheless, we still have the issue where the module includes the user path. |
I'm looking to fix [this Electron issue](getsentry/sentry-electron#686) and need access to the `getModule` function but it's not currently exported. Since we're now exporting this, I've renamed it to `getModuleFromFilename` since that better describes what it does.
re-opened this as electron sdk change still needs to be made after we release JS SDK. |
This should be fixed in v4.8.0 which will be released shortly! |
@timfish thank you for fixing this! |
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 justmain
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).I see the following values:
app:///main.js
app:///main.js
I would expect the values to be:
main
app:///main.js
C:\\Users\\User\\AppData\\Local\\Programs\\<company_name_here>\\resources\\app.asar\\main.js
Q: Would this be a reasonable fix?
The text was updated successfully, but these errors were encountered: