bugsnag / bugsnag-js

JavaScript error handling tool for BugSnag. Monitor and report JavaScript bugs & errors.
https://docs.bugsnag.com/platforms/javascript
MIT License
855 stars 252 forks source link

@bugsnag/plugin-angular supports angular 16 #1959

Closed hijamoya closed 12 months ago

hijamoya commented 1 year ago

As angular 16 does not support "View Engine" library.

@bugsnag/plugin-angular should be upgraded to use Ivy distribution.

This is the warning:

Processing legacy "View Engine" libraries:
- @bugsnag/plugin-angular [es2015/esm2015] (git+ssh://git@github.com/bugsnag/bugsnag-js.git)
Encourage the library authors to publish an Ivy distribution.

Thanks!

johnkiely1 commented 1 year ago

Hi @hijamoya, we are going to investigate this and try and reproduce.

The Angular 16 docs suggest that support for "View Engine" libraries is dropped completely so could produce an error.

Can you confirm this is just a warning rather than an error?

hijamoya commented 1 year ago

Since ngcc is gone, "View Engine" can not be compiled. It will produce an error.

The warning above is in Angular 15.

JesseZomer commented 1 year ago

Any update on this? This is also preventing us from updating

mclack commented 1 year ago

Hi @hijamoya, I’ve been able to replicate the warning you are seeing for Angular v15. After upgrading to v16 I have found that BugSnag still works, and no errors or warnings regarding Ivy are being displayed when the app is compiled.

If you are seeing the error using v16 can you tell us how you created the project and/or if you changed any of the default settings?

adnan-kamili commented 1 year ago

We tried adding bugsnag to our Angular 16 app, but all the requests just timeout (session as well as notify). Any ideas why this is happening? I am able to access bugsnag website/dashboard from the same browser where I am getting this error.

image

alvarovillafane commented 1 year ago

Hi @mclack , even if it works (I didn't try it yet) would be good to make it compatible and not a View Engine library.

As in Angular document says Due to the removal of the Angular Compatibility Compiler (ngcc) in v16, projects on v16 and later no longer support View Engine libraries.

Thanks!

johnkiely1 commented 1 year ago

@adnan-kamili What you are reporting looks like it may be a different issue would you mind writing in to us at support@bugsnag.com and provide as much detail as you can around the circumstances when this occurs along with your bugsnag configuration code and any relevant project setup details.

@vmalvaro Yes I think I'd agree that it would be a good idea to move away from the View Engine library but it is a non trivial task and requires engineering effort. Our testing with a simple "out of the box" type angular 16 app suggests it does work. There may be circumstances where this is not true so if you can try it and let us know how it goes that would be extremely helpful for us. I agree that may contradict what the Angular docs say but until such time as we can create an Ivy distribution this may provide a workaround.

AgustinCocconi commented 1 year ago

Hello. I'm also trying to compile on an angular 15 app and I get this

Generating browser application bundles (phase: setup)...Processing legacy "View Engine" libraries: