Facing looping issue with multiple errors on loading route by transitionTo method with queryParams

Hi,

I am facing looping issue with multiple errors on loading route by transitionTo method with queryParams. This looping issue occurred after resolution of model hook , API calls and setupController hook of the route.

I am working on upgrading the ember version from 1.13.15 to 3.20.2 in my application.

Does anyone have any idea about these errors or have any idea of areas for further debugging. Please help.

Multiple errors:

> "Error: Assertion Failed: Attempted to access the computed <ui-latest@component:link-to::ember1397>.href on a destroyed object, which is not allowed
>     at assert (http://localhost:4200/assets/vendor.js:43478:15)
>     at ComputedProperty.get (http://localhost:4200/assets/vendor.js:22430:111)
>     at Class.CPGETTER_FUNCTION [as href] (http://localhost:4200/assets/vendor.js:21544:25)
>     at getPossibleMandatoryProxyValue (http://localhost:4200/assets/vendor.js:21837:19)
>     at _getProp (http://localhost:4200/assets/vendor.js:21902:17)
>     at get (http://localhost:4200/assets/vendor.js:21888:55)
>     at http://localhost:4200/assets/vendor.js:54096:34
>     at runInAutotrackingTransaction (http://localhost:4200/assets/vendor.js:61935:9)
>     at track (http://localhost:4200/assets/vendor.js:62588:9)
>     at PropertyReference.value (http://localhost:4200/assets/vendor.js:54095:47)"

Final Error after these multiple errors:

> Uncaught (in promise) RangeError: Maximum call stack size exceeded
>     at Duration.bubble [as _bubble] (moment.js:4708)
>     at new Duration (moment.js:2873)
>     at createDuration (moment.js:3187)
>     at Moment.getSetOffset (moment.js:3021)
>     at Moment.eval [as utcOffset] (moment-timezone.js:679)
>     at Function.moment.updateOffset (moment-timezone.js:629)
>     at Moment.fn.tz (moment-timezone.js:646)
>     at Class.getFormattedCurrentDateTime (application.js:124)
>     at Class.generateReferenceId (application.js:113)
>     at Ember.onerror (application.js:32)

Hi @Shubham_Kaushal, are you trying to go straight from 1.13.15 to 3.20? I really wouldn’t recommend that. That version range covers something like 5 years of framework development and 2 major versions so you’re probably going to run into a lot of issues like this where the architecture that made sense in 1.13 looks very different from modern 3.20 code. Ember probably has one of the best migration stories and tools out there but there’s only so much you can do all at once. I’d recommend going in steps, especially LTS versions.

Anyway this error specifically appears to be caused by a link-to component. You could try stepping through the stack trace or commenting code out until it no longer breaks, and then debugging from there. Or you could post some of the relevant code and maybe we can help you track down the cause.