Skip to content
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

'Object has been destroyed' in plugin-electron-app-breadcrumbs/app-breadcrumbs.js #1716

Closed
jeremyspiegel opened this issue Apr 5, 2022 · 3 comments
Labels
bug Confirmed bug released This feature/bug fix has been released

Comments

@jeremyspiegel
Copy link

Describe the bug

The Electron plugin app-breadcrumbs.js uses debounce for tracking the BrowserWindow.move event: https://github.com/bugsnag/bugsnag-js/blob/next/packages/plugin-electron-app-breadcrumbs/app-breadcrumbs.js#L120

I'm seeing lots of bugsnag errors Object has been destroyed pointing to the use of the BrowserWindow in that event handler after the BrowserWindow has been destroyed:

TypeError Object has been destroyed 
    node_modules/@bugsnag/plugin-electron-app-breadcrumbs/app-breadcrumbs.js:121:39 BrowserWindow.<anonymous>
    node_modules/lodash.debounce/index.js:160:19 invokeFunc
    node_modules/lodash.debounce/index.js:207:14 trailingEdge
    node_modules/lodash.debounce/index.js:195:14 Timeout.timerExpired [as _onTimeout]
    node:internal/timers:557:17 listOnTimeout
    node:internal/timers:500:7 processTimers

We might want to clear the browserWindow in the closed event and not try to use it later in the moved event.

Environment

  • Bugsnag version: "@bugsnag/electron": "^7.16.2",
  • Browser framework version (if any):
    • Vue:
    • React:
    • Angular:
  • Server framework version (if any):
    • Koa:
    • Express:
    • Restify:
  • Browser version (e.g. chrome, safari): Electron
  • Device (e.g. iphonex): macOS
@luke-belton
Copy link
Member

Hi @jeremyspiegel - thanks for raising this, our engineering team are going to investigate a fix for this issue. We'll keep you updated on this thread 👍

@luke-belton luke-belton added bug Confirmed bug backlog We hope to fix this feature/bug in the future scheduled Work is starting on this feature/bug and removed backlog We hope to fix this feature/bug in the future labels Apr 13, 2022
@luke-belton
Copy link
Member

Hi @jeremyspiegel - a fix for this was released in v7.16.4 of bugsnag-js 🎉 thanks again for reporting this!

@luke-belton luke-belton added released This feature/bug fix has been released and removed scheduled Work is starting on this feature/bug labels May 4, 2022
@jeremyspiegel
Copy link
Author

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug released This feature/bug fix has been released
Projects
None yet
Development

No branches or pull requests

2 participants