You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This exception should not be raised when autocapture options are enabled (seen with pageViews, formInteractions, and fileDownloads, but shouldn't happen with any configuration), or when offline mode is enabled (which is the default).
Current Behavior
One of four different exceptions are raised:
TypeError: _a.addEventListener is not a function
at eval (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/plugins/file-download-tracking.js:39:145)
at step (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:183:21)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:164:51)
at eval (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:157:69)
at new Promise (<anonymous>)
at __awaiter (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:153:10)
at Object.setup (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/plugins/file-download-tracking.js:32:103)
at Timeline.eval (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/timeline.js:37:107)
at step (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:183:21)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:164:51)
at eval (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:157:69)
at new Promise (<anonymous>)
at __awaiter (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:153:10)
at Timeline.register (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/timeline.js:23:64)
at AmplitudeCore._addPlugin (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/core-client.js:124:99)
at AmplitudeCore.add (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/core-client.js:121:21)
at AmplitudeBrowser.eval (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/browser-client.js:136:51)
at step (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:183:21)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:164:51)
at fulfilled (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:154:56)
⨯ unhandledRejection: TypeError: _a.addEventListener is not a function
at eval (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/plugins/file-download-tracking.js:39:145)
at step (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:183:21)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:164:51)
at eval (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:157:69)
at new Promise (<anonymous>)
at __awaiter (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:153:10)
at Object.setup (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/plugins/file-download-tracking.js:32:103)
at Timeline.eval (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/timeline.js:37:107)
at step (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:183:21)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:164:51)
at eval (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:157:69)
at new Promise (<anonymous>)
at __awaiter (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:153:10)
at Timeline.register (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/timeline.js:23:64)
at AmplitudeCore._addPlugin (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/core-client.js:124:99)
at AmplitudeCore.add (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/core-client.js:121:21)
at AmplitudeBrowser.eval (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/browser-client.js:136:51)
at step (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:183:21)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:164:51)
at fulfilled (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:154:56)
unhandledRejection: TypeError: _a.addEventListener is not a function
at eval (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/plugins/file-download-tracking.js:39:145)
at step (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:183:21)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:164:51)
at eval (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:157:69)
at new Promise (<anonymous>)
at __awaiter (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:153:10)
at Object.setup (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/plugins/file-download-tracking.js:32:103)
at Timeline.eval (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/timeline.js:37:107)
at step (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:183:21)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:164:51)
at eval (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:157:69)
at new Promise (<anonymous>)
at __awaiter (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:153:10)
at Timeline.register (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/timeline.js:23:64)
at AmplitudeCore._addPlugin (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/core-client.js:124:99)
at AmplitudeCore.add (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/core-client.js:121:21)
at AmplitudeBrowser.eval (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/browser-client.js:136:51)
at step (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:183:21)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:164:51)
at fulfilled (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:154:56)
TypeError: globalScope.addEventListener is not a function
at addNetworkListener (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/plugins/network-connectivity-checker.js:16:25)
at eval (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/plugins/network-connectivity-checker.js:40:13)
at step (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:183:21)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:164:51)
at eval (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:157:69)
at new Promise (<anonymous>)
at __awaiter (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:153:10)
at Object.setup (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/plugins/network-connectivity-checker.js:32:103)
at Timeline.eval (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/timeline.js:37:107)
at step (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:183:21)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:164:51)
at eval (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:157:69)
at new Promise (<anonymous>)
at __awaiter (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:153:10)
at Timeline.register (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/timeline.js:23:64)
at AmplitudeCore._addPlugin (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/core-client.js:124:99)
at AmplitudeCore.add (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/node_modules/@amplitude/analytics-core/lib/esm/core-client.js:121:21)
at AmplitudeBrowser.eval (webpack-internal:///(rsc)/./node_modules/@amplitude/analytics-browser/lib/esm/browser-client.js:119:51)
at step (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:183:21)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:164:51)
at fulfilled (webpack-internal:///(rsc)/./node_modules/tslib/tslib.es6.mjs:154:56)
Possible Solution
Disabling these autocapture features circumvents these errors, but is not ideal:
Expected Behavior
This exception should not be raised when
autocapture
options are enabled (seen withpageViews
,formInteractions
, andfileDownloads
, but shouldn't happen with any configuration), or whenoffline
mode is enabled (which is the default).Current Behavior
One of four different exceptions are raised:
Possible Solution
Disabling these autocapture features circumvents these errors, but is not ideal:
Steps to Reproduce
amplitude.init(
with autocapture enabled on a standard NextJSpage.tsx
Environment
"@amplitude/analytics-browser": "^2.11.10",
The text was updated successfully, but these errors were encountered: