question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Uncaught RangeError: Maximum call stack size exceeded

See original GitHub issue

Description/Screenshot

I enabled App Insights in our Sharepoint Online environment using an SPFx extension. It was working fine for the first few days. I’m getting below error (randomly) since Friday and this is breaking functionality:

image

Steps to Reproduce

  • Windows 10/Chrome 81.0.4044/Edge 83.0.478.45
  • SDK Version [e.g. 22]:2.5.5
  • How you initialized the SDK: Refer code below

Additional context Below is my init code:

public async onInit(): Promise<void> {
    
    let key: string = 'my instrumentation key';
    let message: string;

    if (!key) {
      message = '(No instrumentation key was provided.)';
      console.log(`${message}`);
      return Promise.resolve();
    } else {
        await super.onInit();
        sp.setup(this.context);

        const profile = await sp.profiles.myProperties.get();
  
        console.log(profile);
        console.log(profile.Email.replace(/[,;=| ]+/g, "_"));

        const appInsights = new ApplicationInsights({
          config: {
            instrumentationKey: key,
            enableAutoRouteTracking: true,
            autoTrackPageVisitTime: true,
            disableAjaxTracking: true,
            accountId: profile.Email.replace(/[,;=| ]+/g, "_")
          }
        });
        appInsights.loadAppInsights();
        appInsights.trackPageView();
    }

    return Promise.resolve();
  }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
MSNevcommented, Jun 17, 2020

FYI - I’m trying to reach out to the internal SPO team to help identify the root cause for this 🙏 😰

1reaction
MSNevcommented, Jun 25, 2020

I’m checking with the team that I passed this onto, it may be a few days before I get a response due to schedule issues 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Maximum call stack size exceeded error
It means that somewhere in your code, you are calling a function which in turn calls another function and so forth, until you...
Read more >
Uncaught RangeError: Maximum call stack size exceeded
This error is almost always means you have a problem with recursion in JavaScript code, as there isn't any other way in JavaScript...
Read more >
JavaScript Error: Maximum Call Stack Size Exceeded
If you see the “Maximum Call Stack Size Exceeded” error, there's likely a problem with a recursive function within your JavaScript code. More ......
Read more >
RangeError: Maximum call stack size exceeded
The most common source for this error is infinite recursion. You must have a recursive function in your code whose base case is...
Read more >
RangeError: Maximum call stack size exceeded in JavaScript
The "RangeError: Maximum call stack size exceeded" error occurs when a function is called so many times that the invocations exceed the call...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found