Closed aman-u-7span closed 2 months ago
Try immediately after init to bind the context of the current user via the login(
@aleksi-magner Tried it, still same issue. The thing is that this console error occurs even before init.
@aman-u-7span Isn't there a call somewhere to OneSignalDeferred.push()
before this getAccessToken
method is called? It looks like the window.OneSignalDeferred = window.OneSignalDeferred || []
initialization should be earlier
@aleksi-magner I tried calling .push()
in index.html as well. Issue still persists.
@aman-u-7span For me, this error is reproduced only if window.OneSignalDeferred
is not yet defined before the first call to window.OneSignalDeferred.push()
. Therefore, I clarified - is window.OneSignalDeferred
initialized before the first call to window.OneSignalDeferred.push()
?
Ahh okay I got it. I was able to resolve the issue by initialising script manually and then defining the window.OneSignalDeferred
. Thanks a lot mate @aleksi-magner
What happened?
I'm using Vue3
index.html
oneSignal.js (File i'm using to initialize one signal in the app)
I'm not sure what i'm doing wrong, Onesignal-vue3 plugin didn't workout for me so had to use web-sdk for this one. Any guidance would be really helpful.
What browsers are you seeing the problem on?
Chrome (Chromium), Safari, Brave
What operating system are you running?
macOS monterey 12.7.1
Steps to reproduce?
What did you expect to happen?
I expected it to work normally and also found that push notifications are bit inconsistence.
Relevant log output
No response