Open
Description
Description
When enabling the Ajax feature of the newrelic-browser-agent package, I’m encountering the following error:
Uncaught (in promise) TypeError: Unhandled Promise Rejection: Cannot read properties of undefined (reading 'add')
Steps to Reproduce
Instantiate the BrowserAgent
new BrowserAgent(options)
Or instantiate the Agent
with Ajax
feature.
new Agent({
...options,
features: [
Ajax,
],
});
The issue didn't occur if Ajax
is excluded.
Expected Behavior
It shouldn't be throwing an error
Relevant Logs / Console output
index.js:106 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'add')
at Aggregate.storeXhr (index.js:106:19)
at EventContext.<anonymous> (index.js:37:17)
at drain.js:137:15
at Array.forEach (<anonymous>)
at emitEvent (drain.js:130:44)
at drainGroup (drain.js:104:9)
at drain.js:81:7
at Array.forEach (<anonymous>)
at checkCanDrainAll (drain.js:79:11)
at drain (drain.js:69:3)
Your Environment
The error is occurring on Chrome and Firefox, potentially other browsers too.