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

Bugsnag.lastRunInfo for Electron #1486

Merged
merged 4 commits into from
Aug 9, 2021

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented Jul 29, 2021

Goal

Expose the last exit status of the application as Bugsnag.lastRunInfo. This property covers whether the previous application run exited as a crash and whether the crash occurred during launch (and how many consecutive launch-crashes have occurred).

Testing

New unit tests and end2end testing included, along with manual testing. The end2end test fixture now includes an option to log the lastRunInfo as a Breadcrumb - allowing easy access within the existing testing structures.

@github-actions
Copy link

github-actions bot commented Jul 29, 2021

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 41.24 kB 12.71 kB
After 41.24 kB 12.71 kB
± No change No change

code coverage diff

Ok File Lines Branches Functions Statements
🔴 /home/runner/work/bugsnag-js/bugsnag-js/packages/electron-filestore/filestore.js 81.08%
(-12.57%)
57.89%
(-26.73%)
84%
(-7.3%)
81.08%
(-12.57%)
🔴 /home/runner/work/bugsnag-js/bugsnag-js/packages/electron/src/notifier.js 46.88%
(-6.69%)
31.25%
(-4.46%)
20%
(-13.33%)
44.44%
(-5.56%)
🔴 /home/runner/work/bugsnag-js/bugsnag-js/packages/plugin-electron-app/app.js 98.41%
(-1.59%)
86.67%
(-1.79%)
100%
(+0%)
98.51%
(-1.49%)

Total:

Lines Branches Functions Statements
82.05%(-0.24%) 71.44%(-0.26%) 83.52%(-0.26%) 81.05%(-0.21%)

Generated by 🚫 dangerJS against c97af64

@lemnik lemnik force-pushed the PLAT-6151/electron-last-run-info branch from 8609794 to 0404fe5 Compare July 29, 2021 09:14
@lemnik lemnik requested review from kattrali and imjoehaines July 29, 2021 09:26
@lemnik lemnik marked this pull request as ready for review July 29, 2021 09:26
@lemnik lemnik force-pushed the PLAT-6151/electron-last-run-info branch from 6d2d498 to 7696349 Compare July 29, 2021 09:59
@lemnik lemnik force-pushed the PLAT-6151/electron-last-run-info branch from 7696349 to 336bd53 Compare July 29, 2021 10:41
CHANGELOG.md Outdated Show resolved Hide resolved
packages/electron-filestore/filestore.js Show resolved Hide resolved
packages/electron/src/notifier.js Outdated Show resolved Hide resolved
packages/plugin-electron-app/app.js Outdated Show resolved Hide resolved
test/electron/features/native-crash.feature Outdated Show resolved Hide resolved
packages/electron/types/notifier.d.ts Outdated Show resolved Hide resolved
packages/electron-filestore/filestore.js Outdated Show resolved Hide resolved
packages/plugin-electron-app/app.js Show resolved Hide resolved
@lemnik lemnik force-pushed the PLAT-6151/electron-last-run-info branch 10 times, most recently from 92a8252 to bf478f8 Compare August 3, 2021 07:40
@lemnik lemnik force-pushed the PLAT-6151/electron-last-run-info branch from bf478f8 to c97af64 Compare August 3, 2021 08:24
@lemnik lemnik merged commit 587fc71 into integration/minidumps Aug 9, 2021
@lemnik lemnik deleted the PLAT-6151/electron-last-run-info branch August 9, 2021 12:45
imjoehaines pushed a commit that referenced this pull request Oct 19, 2021
* feat(electron): lastRunInfo exposes the exit state of the last application run

* test(electron): end2end testing for lastRunInfo

* fix(electron): free lastRunInfo memory on NativeClient.uninstall

* fix(electron): lastRunInfo is now `null` if not available instead of having a default value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants