OneSignal SDK Initialization Blocks Code Execution and Firebase User Save in React App #1201
Unanswered
umarfarooq3488
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on a Firebase-based chat app using React and implementing OneSignal for push notifications. However, I'm facing an issue where initializing OneSignal seems to block the execution of the code that comes afterward, including saving user data to Firestore.
Problem:
OneSignal.getUserId is not a function
.What I've Tried:
getUserId()
fetches the playerId correctly.Error Logs:
When OneSignal is initialized, no logs appear after this point, meaning the saving logic isn't executed. If OneSignal is removed, I get the error:
OneSignal.getUserId is not a function
.Code:
Other Details:
Question:
What could be causing the OneSignal SDK initialization to block the execution of the following code (saving user data)? How can I ensure that even if OneSignal is not working correctly, the rest of the logic still runs?
Any help or suggestions would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions