[BUG] Uncaught RangeError: Maximum call stack size exceeded
See original GitHub issueDescription/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:
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:
- Created 3 years ago
- Comments:12 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI - I’m trying to reach out to the internal SPO team to help identify the root cause for this 🙏 😰
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 😦