-
Notifications
You must be signed in to change notification settings - Fork 14
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
[BUG] Consuming trackEvent from useAppInsights results in DynamicProto error #121
Comments
When you see this error this is caused by either of the following
Personally, I've only seen the first case where a combination of The latest version of the code (v3.x) is aware of this situation and the default "initialization" code added to the top of each bundle trys to avoid "overwriting" the class / object definitions. By
So what does all this mean? Please check whether your runtime is
|
Description/Screenshot
I have below React component
`
import React from "react";
import { useAppInsightsContext } from "@microsoft/applicationinsights-react-js";
const TestComponent = () => {
const { trackEvent } = useAppInsightsContext();
};
export default TestComponent;
`
When I click the Add Number button, I am getting bellow error message:

My Application Insights instance is set up as below
Steps to Reproduce
Expected behavior
Error should not be displayed and event should be sent to Application Insights.
Additional context
Add any other context about the problem here.
When using reactPlugin instance directly and calling
reactPlugin.trackEvent
works.The text was updated successfully, but these errors were encountered: