Uncaught (in promise) TypeError: Type error
tcetin opened this issue · 2 comments
tcetin commented
How can we help?
I am getting Uncaught (in promise) TypeError: Type error;
when try to initialize the OneSignalSDK.
Here is my implementation
OneSignal.init({
appId,
serviceWorkerPath: "OneSignalSDKWorker.js",
allowLocalhostAsSecureOrigin: true,
safari_web_id: process.env.NEXT_PUBLIC_SAFARI_WEB_ID
}).then(() => {
OneSignal.registerForPushNotifications()
})
How can I solve this problem?
DavidQuartz commented
Do you still have this problem? Can you provide more context as to what environment you are working in and perhaps a more descriptive error log from a catch block?