Code Monkey home page Code Monkey logo

Comments (15)

MSNev avatar MSNev commented on May 22, 2024

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.

danouche93 avatar danouche93 commented on May 22, 2024

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.

MSNev avatar MSNev commented on May 22, 2024

@xiao-lix Can you see if you can repro when you get a chance, with the old and refactored version.

from applicationinsights-angularplugin-js.

xiao-lix avatar xiao-lix commented on May 22, 2024

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.

danouche93 avatar danouche93 commented on May 22, 2024

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.

xiao-lix avatar xiao-lix commented on May 22, 2024

@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.

danouche93 avatar danouche93 commented on May 22, 2024

I did the update and try to rebuild again with the changes. Unfortunately, the problem still remains and I have also warnings now.

image

from applicationinsights-angularplugin-js.

xiao-lix avatar xiao-lix commented on May 22, 2024

@danouche93 sorry to hear that. Do you have a test app / demo that reproduces this issue?

from applicationinsights-angularplugin-js.

danouche93 avatar danouche93 commented on May 22, 2024

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.

danouche93 avatar danouche93 commented on May 22, 2024

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.

xiao-lix avatar xiao-lix commented on May 22, 2024

@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.

xiao-lix avatar xiao-lix commented on May 22, 2024

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.

danouche93 avatar danouche93 commented on May 22, 2024

@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.

xiao-lix avatar xiao-lix commented on May 22, 2024

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.

github-actions avatar github-actions commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.