-
Notifications
You must be signed in to change notification settings - Fork 24
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
Crash at PushNotifications.swift:39 #191
Comments
Hey @FilipeAVS , I guess you are unable to replicate this in your build? To help us debug this, could you create a simple app that reflects your implementation and upload it so that we can try to re-produce the issue and also to make sure nothing stands out in the implementation? 🙏 |
Hey @aonemd! Exactly, I am unable to replicate the issue, and we have a very low count of users who experienced the same issue, so this might be a very specific edge case. As for the implementation, hope you don't mind that I share here a snippet that represents how we are implementing it. So from different parts of the app, we call the initialize function on our PushNotificationsManager class.
With the above, in various contexts (like resuming the app, logging in, etc.) we call the initialize method.
This is the general implementation that we are using. Could it be that since we are calling the initialize method from different places, and some of them are very close to each other, we are hitting some race conditions? I appreciate your help @aonemd! |
Hey @FilipeAVS thanks for posting your implementation! I have been trying to reproduce this with no success so far. This might be related to #190 btw. |
We had a few crashes being reported to Crashlytics with the following stack trace:
The issue might be here:
instanceId can still be nil when serverSyncHandler is accessed, or maybe there is a race condition. On our side, we start the instance and set the user ID as expected. Any idea what could be happening and what we could do on our side to fix this? Thanks in advance.
Additional info
SDK: 4.0.0
iOS: 18.1.1
The text was updated successfully, but these errors were encountered: