Maximum call stack size exceeded with @bugsnag/plugin-angular in SSR
See original GitHub issueFollowing #441, Iβm now getting RangeError: Maximum call stack size exceeded
during server-side rendering in Angular.
{
"@bugsnag/js": "^5.1.0",
"@bugsnag/plugin-angular": "^5.1.0"
}
// core.module.ts
import bugsnag from '@bugsnag/js';
import { BugsnagErrorHandler } from '@bugsnag/plugin-angular';
const bugsnagClient = bugsnag({ ... });
export function errorHandlerFactory() {
return new BugsnagErrorHandler(bugsnagClient);
}
@NgModule({
...
providers: [
{ provide: ErrorHandler, useFactory: errorHandlerFactory },
...
]
})
export class CoreModule {}
// core.server.module.ts
import { CoreModule } from '@core/core.module';
@NgModule({
imports: [
CoreModule,
...
]
})
export class CoreServerModule {}
If Iβm not mistaken, since @bugsnag/js
is universal, it doesnβt need to be initialised differently for server-side rendering, does it?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Maximum Call Stack Size Exceeded (Typescript Error) - Medium
In your code, the possibility is, You are calling a function that is calling another function and that function is calling another function....
Read more >Angular 7 error RangeError: Maximum call stack size exceeded
1.This error occur when there is an infinite loop. As you have mentioned that the page loads when app-heroes is commented, this might...
Read more >Bugsnag docs βΊ Platforms βΊ JavaScript βΊ Angular
Session tracking. Bugsnag tracks the number of βsessionsβ that happen within your application. This allows you to compare stability scores between releases andΒ ......
Read more >strongdata.ca/wp-content/plugins/leadin/js/dist/gu...
src/api/hubspotPluginApi.js","webpack://wp. ... \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge:Β ...
Read more >Overview - Joe Sandbox
Report size exceeded maximum capacity and may have missing behavior information. Report size getting too big, too many NtCreateFile calls found. Report size...
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
Thanks @oleksmir, I did manage to update to
@bugsnag/js
on Node 10 without getting the error by initialising Bugsnag only in the browser. Not ideal since I have errors in SSR that are still not reported, but at least Iβm up to date.Iβve been investigating this issue and cannot reproduce it. I used the project on this page: https://angular.io/guide/universal
Using node v10.15.1, here are the versions of the top-level dependencies that got installed:
Error reporting works on the server and in the browser, and the node process not crash (unless I throw an error and make it).
Closing this off as it looks like this is no longer an issue. Please feel free to post steps to reproduce if you are still seeing an issue like this and believe Bugsnag to be the cause.