Open Bug 1452798 Opened 6 years ago Updated 2 years ago

JS error reports are missing stacks

Categories

(Firefox :: General, defect, P3)

defect

Tracking

()

Tracking Status
firefox61 --- affected
firefox62 --- affected

People

(Reporter: osmose, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

When I try to access these links I get "The project you were looking for was not found.". Any idea why?
Flags: needinfo?(mkelly)
(In reply to Panos Astithas [:past] (please ni?) from comment #1)
> When I try to access these links I get "The project you were looking for was
> not found.". Any idea why?

You have an account now but it hasn't been granted access to the proper team in Sentry yet (Sentry has an issue where we cannot add someone to a team until after they've accepted an invite and created an account). Once you're granted access to the team they should be visible.
Flags: needinfo?(mkelly)
See Also: → 1457330
It's confusing that these pages don't at least display the single stack frame, but I've gone through the raw JSON and copied them below:

> https://sentry.prod.mozaws.net/operations/nightly-js-errors/issues/2045985/
"resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/highlighters/auto-refresh.js"

> https://sentry.prod.mozaws.net/operations/nightly-js-errors/issues/2046040/
"resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/tab.js"

> https://sentry.prod.mozaws.net/operations/nightly-js-errors/issues/2046767/
"resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/highlighters/auto-refresh.js"

> https://sentry.prod.mozaws.net/operations/nightly-js-errors/issues/2066010/
"jar:file:///C:/Program%20Files/Firefox%20Nightly/browser/omni.ja!/components/nsBrowserGlue.js"

> https://sentry.prod.mozaws.net/operations/nightly-js-errors/issues/2070966/
"resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/tab.js"

> https://sentry.prod.mozaws.net/operations/nightly-js-errors/issues/2045118/
"resource://gre/modules/ExtensionParent.jsm"

Let's see if the JS team has any ideas.
Component: General → JavaScript Engine
Product: Firefox → Core
Depends on: 1461401
Jason O., any idea what this might be? Could this be related to promises?

Jason L., many of these issues seems to be coming from the devtools, so maybe there is something which is more frequently done in devtools than elsewhere?
Flags: needinfo?(jorendorff)
Flags: needinfo?(jlaster)
Priority: -- → P2
Sorry, I'm not sure. Alex and jryans, would have a better idea of some of the server loader complexities
Flags: needinfo?(poirot.alex)
Flags: needinfo?(jryans)
Flags: needinfo?(jlaster)
It looks like the issue is that we only keep stacks for errors that occur in windows[1] because the console service apparently relies on the window ID clear out console messages[2].

With DevTools code loaded through our loader, the scripts are running in a sandbox, so there is no associated window ID, which leads to the stack info being dropped.

In order to resolve this, I guess we would need to find some way to identify sandboxes and track them when they go away so that the console service can clean up any related logs similar to what is done for windows.  With that in place, we should be able to relax the window ID check so that stacks can be kept for sandboxes as well.

As far as DevTools impact, it seems that both the client and server are affected if the loader is used.

[1]: https://searchfox.org/mozilla-central/rev/eb51d734a8c06ac5973291be9bcc74ed4e999bca/js/xpconnect/src/nsXPConnect.cpp#337
[2]: https://searchfox.org/mozilla-central/rev/eb51d734a8c06ac5973291be9bcc74ed4e999bca/xpcom/base/nsConsoleService.cpp#494
Component: JavaScript Engine → XPConnect
Flags: needinfo?(jryans)
How are your collecting stack traces? Via console service?

You may be hitting bug 1237904 (it has been closed because of FirefoxOS triage, but this bug isn't specific to fxos).
The stacks may be empty, but you should still be able to access to error file/line.
It will be empty for anything that isn't from a document/window, so: JSMs, XPCOMs, frame scripts, sandboxes, ...
Flags: needinfo?(poirot.alex)
(In reply to Alexandre Poirot [:ochameau] from comment #7)
> You may be hitting bug 1237904 (it has been closed because of FirefoxOS
> triage, but this bug isn't specific to fxos).

Thanks Alex, it does seem related.  I reopened that bug.
(In reply to Alexandre Poirot [:ochameau] from comment #7)
> How are your collecting stack traces? Via console service?

Yup: https://searchfox.org/mozilla-central/source/browser/modules/BrowserErrorReporter.jsm#91
(Moving this bug to track the issue for the JS error reports project, which seems to sometimes use Socorro :: General.  Bug 1237904 covers the platform issue that's dropping the stacks.)
Component: XPConnect → General
Flags: needinfo?(jorendorff)
Product: Core → Socorro
Moving to Firefox since it's the more appropriate product, and marking as P3 for the backlog.
Priority: P2 → P3
Product: Socorro → Firefox

The Sentry project linked in comments above is going away soon, but the issue of dropping stacks for certain errors is still relevant IMO, so I'm leaving this open.

Blocks: dbg-stacks
Whiteboard: [debugger-mvp]
Whiteboard: [debugger-mvp]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.