web staff client not compatible with AngularJS 1.7.0

Bug #1771397 reported by Galen Charlton on 2018-05-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Undecided
Unassigned

Bug Description

As noted in bug 1771371, the web staff client stopped building successfully once Angular 1.7.0 became available. Pinning AngularJS to 1.6.x worked around the problem, but this bug is for fixing the breakage.

Evergreen 3.0+

Galen Charlton (gmc) wrote :

A cursory glance through https://docs.angularjs.org/guide/migration#migrating-from-1-6-to-1-7 didn't turn up any removed constructs that Evergreen appears to be using directly.

Error messages in the console include this:

jquery.min.js:2 Uncaught Error: [$injector:modulerr] Failed to instantiate module egHome due to:
Error: [$injector:modulerr] Failed to instantiate module egCoreMod due to:
Error: [$injector:modulerr] Failed to instantiate module ngToast due to:
Error: [$injector:modulerr] Failed to instantiate module ngSanitize due to:
TypeError: u is not a function
    at n (https://dev-galen2.equinoxinitiative.org/js/ui/default/staff/build/js/vendor.bundle.js:28:111)
    at new n (https://dev-galen2.equinoxinitiative.org/js/ui/default/staff/build/js/vendor.bundle.js:28:3187)
    at Object.s [as instantiate] (https://dev-galen2.equinoxinitiative.org/js/ui/default/staff/build/js/vendor.bundle.js:6:20272)
    at i (https://dev-galen2.equinoxinitiative.org/js/ui/default/staff/build/js/vendor.bundle.js:6:18165)

Upon inspection, the line in question in the vendor bundle is a copy of AngularJS 1.5.11, which is being brought in by ngToast. Per https://github.com/tameraydin/ngToast/issues, ngToast appears to no longer be actively maintained; an issue requesting bumping up the version flag to allow AngularJS 1.6 has not been acted upon. I'll investigate this thread further.

Galen Charlton (gmc) wrote :

I've convinced myself that updating ngToast to simply state that it's compatible with AngularJS 1.7 suffices to (1) remove the extra pulling in of AngularJS 1.5 into the bundle, (2) ensure that tests pass and the web staff client bundle works, and (3) that toasts are still toasty.

I'll make a pull request against ngToast and hope for the best.

Galen Charlton (gmc) wrote :

And here's my pull request on GitHub and the relevant GitHub issue:

https://github.com/tameraydin/ngToast/pull/98
https://github.com/tameraydin/ngToast/issues/92

An unrelated build issue is also fixed by that PR:

https://github.com/tameraydin/ngToast/issues/97

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.