TypeError: Converting circular structure to JSON --> starting at object with constructor '_' | property '_zoneDelegate' -> object with constructor 'l' --- property '_zone' closes the circle at JSON.stringify (<anonymous>) at stringify (Utils.js:46:21) at Array.map (<anonymous>) at d.logMethodCall (OneSignalUtils.js:41:55) at g (utils.js:51:12) at Vi.enqueue (OperationCache.js:6:9) at Qi.<anonymous> (ExecutorBase.js:91:32) at Generator.next (<anonymous>) at r (tslib.es6.js:118:58) at l.invoke (polyfills.bbe44d985996c9f8.js:1:18642)
How can we help?
What's wrong with this implementation?
import { OneSignal } from 'onesignal-ngx'; constructor(private oneSignal: OneSignal) {}
ngOnInit() { if (this.oneSignal.Notifications.isPushSupported()) { await this.oneSignal.init({ appId: this.onesignalAppId }); // this.oneSignal.User.PushSubscription.addEventListener('change', this.pushSubscriptionChangeListener); } }
I get this error:
TypeError: Converting circular structure to JSON --> starting at object with constructor '_' | property '_zoneDelegate' -> object with constructor 'l' --- property '_zone' closes the circle at JSON.stringify (<anonymous>) at stringify (Utils.js:46:21) at Array.map (<anonymous>) at d.logMethodCall (OneSignalUtils.js:41:55) at g (utils.js:51:12) at Vi.enqueue (OperationCache.js:6:9) at Qi.<anonymous> (ExecutorBase.js:91:32) at Generator.next (<anonymous>) at r (tslib.es6.js:118:58) at l.invoke (polyfills.bbe44d985996c9f8.js:1:18642)