Comments (15)
Hey, we will be releasing an updated version of the angular plugin shortly -- but I'm not sure that it will address this issue.
Internally, we don't call Object.deepExtend(), so it it possible for you to help by attempting to use the unminified version and debug (somehow) to identify which object that the deepExtend is recusing on.
Searching online, it doesn't appear to be specific to App Insights
https://stackoverflow.com/questions/25028597/how-can-i-fix-maximum-call-stack-size-exceeded-angularjs
angular/angular-cli#17106
from applicationinsights-angularplugin-js.
It must be because of the plugin, I've never had this error before integrating it.
I tried to put in comment the code in the constructor() and the error is gone.
from applicationinsights-angularplugin-js.
@xiao-lix Can you see if you can repro when you get a chance, with the old and refactored version.
from applicationinsights-angularplugin-js.
Hi, @danouche93 sorry for the confusion but the angularPluginService was not properly implemented and we removed it from the next released version (will release soon). Can you try removing it from constructor and see if it fixes the issue? I can't reproduce the error locally even with it though. Also, I updated the doc that you may not notice, can you call loadAppInsights right after instantiate it inside the constructor? Thanks.
from applicationinsights-angularplugin-js.
Thank you for the fast response. Unfortunately your solution didn't help the problem :(
But I think where the problem is from. In my project I use an authService from auth0-js plugin. When I first login to the project, I don't have the error but when I'm already logged in and refresh the page, the error is shown. Somehow the refresh token of auth0 causes the problem to your plugin.
from applicationinsights-angularplugin-js.
@danouche93 we just released a new version of angular plugin, can you try to upgrade and see if that solves your problem though I'm not sure yet how auth0 causes the issue as you described. https://github.com/microsoft/applicationinsights-angularplugin-js
from applicationinsights-angularplugin-js.
I did the update and try to rebuild again with the changes. Unfortunately, the problem still remains and I have also warnings now.
from applicationinsights-angularplugin-js.
@danouche93 sorry to hear that. Do you have a test app / demo that reproduces this issue?
from applicationinsights-angularplugin-js.
I don't have a demo that I can show you the issue but if you do a project with Angular 6 with an authentication system with auth0 you can see the issue.
from applicationinsights-angularplugin-js.
I've just noticed that I don't receive at all the errors in app insight. I just have the real error "Uncaught RangeError" displaying.
I put a throw new Error()
in one of my component but it is not displayed in app insight azure.
from applicationinsights-angularplugin-js.
@danouche93 I'm not familiar with auth0 but I did some searching. Looks like this package is what you should use for angular app? And it says the SDK is compatible with Angular SPAs version 9+ and above. I tested this sample with Angular 11 and AI angular plugin 2.5.11 with no issue.
For the other issue you don't see exception items, thanks for pointing it out. Since Angular is warping all exceptions in their own way and provide a global error handler that intercepts all the errors, looks like the AI window.onerror hooks is never called. That would be some nice feature we could add in the future release. Thanks.
from applicationinsights-angularplugin-js.
Hello @danouche93 , I just released a new version of the angular plugin that adding the uncaught exception tracking feature: https://github.com/microsoft/applicationinsights-angularplugin-js/releases/tag/2.6.2 thanks.
from applicationinsights-angularplugin-js.
@xiao-lix I did the 2.6.2 update and now I got this error
ERROR in node_modules/@microsoft/applicationinsights-angularplugin-js/lib/applicationinsights-angularplugin-error.service.d.ts(6,9): error TS1086: An accessor cannot be declared in an ambient context.
And it failed to compile.
from applicationinsights-angularplugin-js.
hi @danouche93, can you please try this option:
"compilerOptions": {
"skipLibCheck": true,
},
Please note, Angular plugin is using newer version of typescript and is NOT es3 compatible. The issue is the version of TypeScript you are using (v2.9.2 -- based on the provided package.json) and the version of tslib that you are using.
If this doesn't solve your issue, can you please provide a simplified repro as we are unable to repro your exact issue. And it would be also helpful if you could provide a copy of your tsconfig.json file. This error will occur if you are targetting es3. Thanks.
from applicationinsights-angularplugin-js.
This Issue will be closed in 30 days. Please remove the "Stale" label or comment to avoid closure with no action.
from applicationinsights-angularplugin-js.
Related Issues (20)
- Docs Warning "Angular plugin is NOT ECMAScript 3 (ES3) compatible." HOT 4
- Add @microsoft/applicationinsights-web to peer dependencies HOT 3
- [BUG] Incompatible with Angular Hydration HOT 10
- Disable logging in local environment HOT 2
- Doesn't support angular v16 HOT 6
- v3.0.2 (next: ITelemetryPluginChain | ITelemetryPlugin) => void' is not assignable to type '(next: ITelemetryPlugin | ITelemetryPluginChain) => void'. HOT 5
- Compatibility with Angular 7 HOT 4
- pageView always the same time HOT 2
- Missing type declarations in 15.1.1 HOT 5
- [Discussion] Re-Numbering the plugin release so the major number matches the Angular release HOT 5
- [IE8] Support for IE8 and ES3 support was broken a while ago HOT 3
- InstrumentationKey should not be needed if connectionString is already present HOT 6
- Missing Dependency either in package.json or documentation HOT 2
- Angular 14 support HOT 3
- [Testing] Re-enable test validation during PR validation on github HOT 1
- [BUG] - Events are not tracked using Angular Material - Autocomplete & mat-option
- Types incompatibility with `@microsoft/applicationinsights-web` HOT 2
- Angular unit testing by mocking ApplicationInsights with AI connection string. HOT 2
- Type 'AngularPlugin' is not assignable to type 'ITelemetryPlugin', Angular 15 ( "@angular/common": "15.1.0") error when trying to build the project HOT 10
- Repository URL pointing to stale page in another repo HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from applicationinsights-angularplugin-js.