You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What do you DI tokens look like? If rc.4 introduced this it sounds like it's the object comparison on the instance settings (I just did typeof a === 'object' && JSON.stringify(a) === JSON.stringify(b) as a dirty object comparison assuming things would be serializable. This check ensures that DI tokens haven't changed out from underneath you... that said all it does it add a warning, saying if you changed the DI tokens between lazy-loads or with HMR enabled you have to refresh, so I can just add a try/catch on it.
@jamesdaniels nothing was changed so far on the consumer side. DI tokens are imported as they used to.
Understood, but are any of the DI tokens your providing to AngularFire objects that aren't serializable with JSON.stringify? These guard-rails are new on our side and would explain this error.
Nothing changed on my side. I'm using a configuration as provided by Firebase. Not using any DI.
After all Karma tests completed, the following error is thrown in afterAll:
Chrome 87.0.4280.66 (Windows 10) ERROR
An error was thrown in afterAll
Error: Uncaught (in promise): TypeError: Converting circular structure to JSON
--> starting at object with constructor 'FirebaseAppImpl'
| property 'firebase_' -> object with constructor 'Object'
| property 'apps' -> object with constructor 'Array'
--- index 0 closes the circle
TypeError: Converting circular structure to JSON
--> starting at object with constructor 'FirebaseAppImpl'
| property 'firebase_' -> object with constructor 'Object'
| property 'apps' -> object with constructor 'Array'
--- index 0 closes the circle
at JSON.stringify (<anonymous>)
at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/fire/__ivy_ngcc__/fesm2015/angular-fire.js:440:1
at Array.some (<anonymous>)
at ɵfetchInstance (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/fire/__ivy_ngcc__/fesm2015/angular-fire.js:431:1)
at MapSubscriber.project (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/fire/__ivy_ngcc__/fesm2015/angular-fire-analytics.js:213:34)
at MapSubscriber._next (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm2015/internal/operators/map.js:29:1)
at MapSubscriber.next (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm2015/internal/Subscriber.js:49:1)
at SwitchMapSubscriber.notifyNext (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm2015/internal/operators/switchMap.js:66:1)
at SimpleInnerSubscriber._next (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm2015/internal/innerSubscribe.js:10:1)
at SimpleInnerSubscriber.next (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm2015/internal/Subscriber.js:49:1)
error properties: Object({ rejection: TypeError: Converting circular structure to JSON
--> starting at object with constructor 'FirebaseAppImpl'
| property 'firebase_' -> object with constructor 'Object'
| property 'apps' -> object with constructor 'Array'
--- index 0 closes the circle, promise: [object Promise], zone: Zone({ _parent: Zone({ _parent: Zone({ _parent: Zone({ _parent: null, _name: '<root>', _properties: Object({ }), _zoneDelegate: ZoneDelegate({ _taskCounts: Object({ microTask: 0, macroTask: 0, e
ventTask: 0 }), zone: <circular reference: Object>, _parentDelegate: null, _forkZS: null, _forkDlgt: null, _forkCurrZone: null, _interceptZS: null, _interceptDlgt: null, _interceptCurrZone: null, _invokeZS: null, _invokeDlgt: null, _invokeCurrZone: null, _handleErr
orZS: null, _handleErrorDlgt: null, _handleErrorCurrZone: null, _scheduleTaskZS: null, _scheduleTaskDlgt: null, _scheduleTaskCurrZone: null, _invokeTaskZS: null, _invokeTaskDlgt: null, _invokeTaskCurrZone: null, ...
Error: Uncaught (in promise): TypeError: Converting circular structure to JSON
--> starting at object with constructor 'FirebaseAppImpl'
| property 'firebase_' -> object with constructor 'Object'
| property 'apps' -> object with constructor 'Array'
--- index 0 closes the circle
TypeError: Converting circular structure to JSON
--> starting at object with constructor 'FirebaseAppImpl'
| property 'firebase_' -> object with constructor 'Object'
| property 'apps' -> object with constructor 'Array'
--- index 0 closes the circle
at JSON.stringify (<anonymous>)
at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/fire/__ivy_ngcc__/fesm2015/angular-fire.js:440:1
at Array.some (<anonymous>)
at ɵfetchInstance (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/fire/__ivy_ngcc__/fesm2015/angular-fire.js:431:1)
at MapSubscriber.project (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/fire/__ivy_ngcc__/fesm2015/angular-fire-analytics.js:213:34)
at MapSubscriber._next (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm2015/internal/operators/map.js:29:1)
at MapSubscriber.next (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm2015/internal/Subscriber.js:49:1)
at SwitchMapSubscriber.notifyNext (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm2015/internal/operators/switchMap.js:66:1)
at SimpleInnerSubscriber._next (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm2015/internal/innerSubscribe.js:10:1)
at SimpleInnerSubscriber.next (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm2015/internal/Subscriber.js:49:1)
at resolvePromise (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:798:1)
at resolvePromise (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:750:1)
at http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:860:1
at ZoneDelegate.invokeTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:399:1)
at ProxyZoneSpec.push.QpwO.ProxyZoneSpec.onInvokeTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-testing.js:323:1)
at ZoneDelegate.invokeTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:398:1)
at Object.onInvokeTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:273:1)
at ZoneDelegate.invokeTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:398:1)
at Object.onInvokeTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:28225:1)
at ZoneDelegate.invokeTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:398:1)
at <Jasmine>
at Object.onScheduleTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-testing.js:117:1)
at ZoneDelegate.scheduleTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:378:1)
at Object.onScheduleTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:272:1)
at ZoneDelegate.scheduleTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:378:1)
at Zone.scheduleTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:210:1)
at Zone.scheduleMicroTask (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:230:1)
at scheduleResolveOrReject (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:847:1)
at resolvePromise (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:785:1)
Activity
jimmykane commentedon Nov 20, 2020
Same here but for me it was not AG 11 but angular fire > 6.0
jimmykane commentedon Nov 20, 2020
6.1.0-rc.4 and above causes this
jamesdaniels commentedon Nov 21, 2020
What do you DI tokens look like? If rc.4 introduced this it sounds like it's the object comparison on the instance settings (I just did
typeof a === 'object' && JSON.stringify(a) === JSON.stringify(b)as a dirty object comparison assuming things would be serializable. This check ensures that DI tokens haven't changed out from underneath you... that said all it does it add a warning, saying if you changed the DI tokens between lazy-loads or with HMR enabled you have to refresh, so I can just add a try/catch on it.acadianaapps commentedon Nov 21, 2020
Getting the same error also.
jimmykane commentedon Nov 21, 2020
@jamesdaniels nothing was changed so far on the consumer side. DI tokens are imported as they used to.
jamesdaniels commentedon Nov 21, 2020
Understood, but are any of the DI tokens your providing to AngularFire objects that aren't serializable with
JSON.stringify? These guard-rails are new on our side and would explain this error.UnlikeMars commentedon Nov 22, 2020
I'm having the same issue.
Nothing changed on my side. I'm using a configuration as provided by Firebase. Not using any DI.
After all Karma tests completed, the following error is thrown in afterAll:
joelmeaders commentedon Nov 23, 2020
I have this same issue in the latest angularfire and none of my analytics events are being logged anymore. I am not using any custom DI for analytics
afriedma commentedon Nov 23, 2020
I have the same issue on Angular 10 and "@angular/fire@6.1.0, during lazy loading of my module.
Does anyone a have workaround?
jamesdaniels commentedon Nov 24, 2020
Cutting
6.1.2this afternoon with what I'm hoping is a fix.