From bceb7c77d1ab9a80a276c0967f00d838b6aa774e Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 27 Mar 2019 19:45:42 +0100 Subject: [PATCH 1/2] Better reporting of unhandled rejections to sentry Changelog-entry: Better reporting of unhandled rejections to sentry Change-type: patch --- lib/gui/app/app.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/gui/app/app.js b/lib/gui/app/app.js index 8b19e4af..303fbe0e 100644 --- a/lib/gui/app/app.js +++ b/lib/gui/app/app.js @@ -52,7 +52,7 @@ const osDialog = require('./os/dialog') const exceptionReporter = require('./modules/exception-reporter') const updateLock = require('./modules/update-lock') -/* eslint-disable lodash/prefer-lodash-method */ +/* eslint-disable lodash/prefer-lodash-method,lodash/prefer-get */ // Enable debug information from all modules that use `debug` // See https://github.com/visionmedia/debug#browser-support @@ -62,6 +62,15 @@ const updateLock = require('./modules/update-lock') process.env.DRIVELIST_DEBUG = /drivelist|^\*$/i.test(process.env.DEBUG) ? '1' : '' window.localStorage.debug = process.env.DEBUG +window.addEventListener('unhandledrejection', (event) => { + // Promise: event.reason + // Bluebird: event.detail.reason + // Anything else: event + const error = event.reason || (event.detail && event.detail.reason) || event + analytics.logException(error) + event.preventDefault() +}) + // Set application session UUID store.dispatch({ type: store.Actions.SET_APPLICATION_SESSION_UUID, From 39573ada545bbf7798e691249f6f7ea498c29dd4 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 27 Mar 2019 19:50:02 +0100 Subject: [PATCH 2/2] Update resin-corvus to ^2.0.2 Changelog-entry: Update resin-corvus to ^2.0.2 Change-type: patch --- npm-shrinkwrap.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index b77e4745..6cd14cbe 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -8260,17 +8260,17 @@ } }, "mixpanel": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/mixpanel/-/mixpanel-0.10.1.tgz", - "integrity": "sha512-jP2z5mxsewcHHtx5ZPrDf7U/ERPKyNTbpjGN5fdUPxDQk8C7+XoDO5SYZgBUtQ8SqEjZ+Yvw9lot3ec++EaYGA==", + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/mixpanel/-/mixpanel-0.10.2.tgz", + "integrity": "sha512-+zbBQGd/Q5LLRooqJ2iyEDzKz2/ly4TipH5tE9te0BDMJpROxUMGffPulyHbh4FtMcbJuPmIUSIfy//JhhnlnA==", "requires": { "https-proxy-agent": "2.2.1" } }, "mixpanel-browser": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/mixpanel-browser/-/mixpanel-browser-2.26.0.tgz", - "integrity": "sha512-aIRtoMvv6B+syslAvYyk+seuYObm0TeOxQz2JZqquZTEa+Kw9cNTVRA+H1s7QY1QFOKrk94gkmLdKJbwcOcG5w==" + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/mixpanel-browser/-/mixpanel-browser-2.27.1.tgz", + "integrity": "sha512-M3D2emnY5zKX9ZzokNp07JEc/1e4JBeViedxyPDLDaaYWhMEyBmeY8dJctUPksCpJ4rqSCg2PHIoiPt9Z4oxzg==" }, "mkdirp": { "version": "0.5.1", @@ -10621,9 +10621,9 @@ } }, "resin-corvus": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/resin-corvus/-/resin-corvus-2.0.1.tgz", - "integrity": "sha512-/bRPSAJplO3pj+YIcqkbziJ0YYeArcakEUpEdHRjLZB7VUKbse0hCxfXbGsL26yRz9Iajou8WV7Q4+Y+j+eqQw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resin-corvus/-/resin-corvus-2.0.2.tgz", + "integrity": "sha512-3X88eWi2YBuLjU5NCMkxyyTUIE86euz0GHZT6WicGSnQjJHBB5HxMQG00sSGZ4NH75wO+VsQ/VIhXkmOIjYWww==", "requires": { "arch": "^2.1.0", "deep-map-keys": "^1.2.0", diff --git a/package.json b/package.json index e2753da2..15766827 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "redux": "^3.5.2", "rendition": "4.41.1", "request": "^2.81.0", - "resin-corvus": "^2.0.1", + "resin-corvus": "^2.0.2", "roboto-fontface": "^0.9.0", "semver": "^5.1.1", "styled-components": "^3.2.3",