-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Uncaught TypeError: e is not iterable at o.processOneSignalDeferredArray #1210
Comments
Hi @Jonathan-Ha, Could you please share/paste the code snippet of where you have the SDK init code defined? Reference: https://documentation.onesignal.com/docs/web-sdk-setup#7-add-code-to-site |
I have the same issue, here is my code window.OneSignalDeferred = window.OneSignalDeferred || [];
window.OneSignalDeferred.push(async function (OneSignal) {
await OneSignal.init({
appId: import.meta.env.VITE_ONESIGNAL_APP_ID,
serviceWorkerPath: "service-worker.js",
promptOptions: {
slidedown: {
prompts: [{
type: "push",
autoPrompt: false,
text: {
actionMessage: LA.send_notification_text,
acceptButton: LA.yes,
cancelButton: LA.no
}
}]
}
}
});
}); and the script tag <script src="https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js" defer></script> I don't know why it's like this but sometimes when you reload multiple times or do (Ctrl + F5) the error despairs and when you reload it again it shows up again. |
The text was updated successfully, but these errors were encountered: