Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Commit

Permalink
Fix #532, improve lazy Sentry setup
Browse files Browse the repository at this point in the history
Sentry was being included directly in the popup, but not properly configured. This adds catcherAsyncSetup, and makes corrections where that script expected Raven
  • Loading branch information
ianb committed Nov 4, 2019
1 parent 34b627c commit dc0f8a8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion extension/catcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ this.catcher = (function() {
},
};
if (typeof Sentry === "undefined") {
window.SENTRY_DSK = sentryOptions;
window.SENTRY_SDK = sentryOptions;
catcherAsyncSetup();
} else {
Sentry.init(sentryOptions);
Expand Down
2 changes: 1 addition & 1 deletion extension/catcherAsyncSetup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion extension/popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script src="../js/vendor/react-dom.production.min.js"></script>
<script src="../buildSettings.js"></script>
<script src="../log.js"></script>
<script src="../js/vendor/sentry.js"></script>
<script src="../catcherAsyncSetup.js"></script>
<script src="../catcher.js"></script>
<script src="../util.js"></script>
<script src="../settings.js"></script>
Expand Down
1 change: 1 addition & 0 deletions extension/recorder/recorder.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ <h1>Error</h1>
<script src="../buildSettings.js"></script>
<script src="../log.js"></script>
<script src="../js/vendor/sentry.js"></script>
<script src="../catcherAsyncSetup.js"></script>
<script src="../catcher.js"></script>
<script src="../util.js"></script>
<script src="../popup/vad.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"start-extension": "mkdir -p ${PROFILE:-Profile} && web-ext run --firefox-profile ${PROFILE:-Profile}/ --keep-profile-changes --firefox \"${FIREFOX:-nightly}\" --source-dir extension/ --browser-console",
"test": "npm-run-all build:manifest lint",
"build:markdown": "mkdir -p extension/views && node bin/substitute-changelog.js",
"build:deps": "mkdir -p extension/js/vendor/ extension/css/vendor/ ; for file in lottie-web/build/player/lottie.min.js webextension-polyfill/dist/browser-polyfill.min.js moment/min/moment.min.js fuse.js/dist/fuse.js raven-js/dist/raven.js react/umd/react.production.min.js react-dom/umd/react-dom.production.min.js; do cp node_modules/$file extension/js/vendor/ ; done ; for file in tailwindcss/dist/tailwind.min.css ; do cp node_modules/$file extension/css/vendor/ ; done ; cp \"node_modules/@sentry/browser/build/bundle.es6.min.js\" extension/js/vendor/sentry.js",
"build:deps": "mkdir -p extension/js/vendor/ extension/css/vendor/ ; for file in lottie-web/build/player/lottie.min.js webextension-polyfill/dist/browser-polyfill.min.js moment/min/moment.min.js fuse.js/dist/fuse.js react/umd/react.production.min.js react-dom/umd/react-dom.production.min.js; do cp node_modules/$file extension/js/vendor/ ; done ; for file in tailwindcss/dist/tailwind.min.css ; do cp node_modules/$file extension/css/vendor/ ; done ; cp \"node_modules/@sentry/browser/build/bundle.es6.min.js\" extension/js/vendor/sentry.js",
"build:manifest": "node bin/substitute-manifest.js",
"build:jsx": "babel --plugins @babel/plugin-transform-react-jsx,@babel/plugin-proposal-class-properties extension/popup/*.jsx --out-dir extension/popup",
"watch": "babel --plugins @babel/plugin-transform-react-jsx,@babel/plugin-proposal-class-properties extension/popup/*.jsx --watch --out-dir extension/popup",
Expand Down

0 comments on commit dc0f8a8

Please sign in to comment.