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
Support for Chrome Extension #2189
Comments
Hi,
We do have or own debug Chrome extension that is used to intercept outbound request and display them events in a more friendly / searchable away, this also "communicates" with any running Application Insights SDK instance in the Host page back to our popup to display some of the internal debugging messages that are not always sent as events. This "may" be helpful to identify any issues where the SDK is not getting initialized (or is) and whether it has been initialized successfully. |
Try adding everything back except the click analytics plugin as that plugin was specifically designed for the main web page. From your description, it sounds like what might be happening is a stack overflow, where something is recursively looping on itself until the entire thing crashes. The click analytics plugin will "walk" up the DOM tree looking for parent elements of the clicked component, it does this by attaching itself to the main |
Hmm, the only other recursive code is around the validation / serialization of the "event", which would mean that there is something assigned to the "event" that loops back on itself that is referenced... When you call Or something in the header values that are assigned for the Ajax requests, because you have the header tracking enabled it will collect the "value" (not the string, but it will grab any object), so if you have an object assigned as the value for one or more of the headers the XHR / fetch will stringy it, but will grab the object and this (may) cause some recursion (but I've not hear of this before). Actually, because your using ^3.0.4 the config is now shared across all components (extensions), and the "passed" in configuration is used as a "template" and it will be recursively called to create a "working" copy of the configuration, so if somehow this ends up with a recursive reference this would also cause the issue. The |
Yes, the chrome extension listens to "allow" instances that are on the any and all open tabs / pages. And yes, we do support having multiple initialized SDK instances on a page. We technically, also support having an extension "shared" (used by) between different instances, but this really depends quite a bit on the implementation of the extension and what / how it operates as it has to "ignore" (mostly) the |
Alright actually closing the loop on this. We started diabling the config and enabling one by one, it seems like I'm unsure of what Flush does, but will this impact the performance of the chrome extension? |
I have no idea on why this would resolve the issue either... @siyuniu-ms when you get a chance can you attempt to repo, to see if there is anything we can do to catch / stop this from crashing. |
Is your feature request related to a problem? Please describe.
I'm currently running into an issue where I have a react app with an app insights implementation running inside of a chrome extension sidepanel. The problem is it seems to be working on the first run but when I start opening and closing the extension and switching between different tabs, the app(extension) completely crashes. When I comment out "appinsights.loadappinsights()", the app doesn't crash anymore but obviously, I can't use app insights.
Describe the solution you'd like
I would like to be able to use app insights inside of a chrome extension environment or diagnose the current issue I'm having to get to the root cause.
Describe alternatives you've considered
I don't think there would be an alternative for this.
Additional context
N/A
The text was updated successfully, but these errors were encountered: