OneSignal/react-onesignal

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?

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?

@tcetin We will need more information to investigate. I recommend trying the new 3.0.0 version as this may have been fixed there. If not, please open a new issue with more details on your error.