-
Notifications
You must be signed in to change notification settings - Fork 26
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
Push activation fails if already registered #661
Comments
Yes, I'll look at it. |
The app reaches the
|
OK, so what's the issue with that - is it application code that's attempting a UI update in a context that can't do that? Or is it something we're doing on our side? |
@paddybyers I think this has been fixed. Can you ask if the client is using a custom register? I mean, If the client has the delegate |
Another thing I noticed is this 400 ("device with ID 0001D2XER600GW0X476W5TVBFE already registered") from
So, I think it should do a |
Yes - we've discussed this and we're going to be making changes to the API so both |
@paddybyers Sorry, I'm confused. Should I change the code to use |
That commit was 3 months ago but I understand he's using the latest on the |
I'll raise a separate issue here with the changes we need, once we have them implemented in realtime. |
That backtrace is emitted by Xcode 9(.2), for any I am using the HEAD of the push branch. |
I have not implemented the method |
@avi-kik Thanks for your information. I can't reproduce this issue. Could you give me some hint on how to reproduce it? Or any sample project that I can use please? |
@ricardopereira, I sent you an invite to gain read access to my app's repository. You'll want the |
FWIW, I'm also getting |
@mezis At what point do you call the |
Can't reproduce none of those issues 😕 (400 issue and UI thread checker). |
@ricardopereira: looks like this. Happy to send you the full "demo" app if that's useful as I barely know what I'm doing here. func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
print("** hello!")
self.realtime = self.getAblyRealtime()
self.realtime.connection.on { (stateChange) in
print("** Connection state change: \(String(describing: stateChange))")
}
UNUserNotificationCenter.current().requestAuthorization() { (ok, err) in
DispatchQueue.main.async() {
UIApplication.shared.registerForRemoteNotifications()
print("** after registerForRemoteNotifications")
}
}
print("** Activating Ably push")
self.realtime.push.activate()
return true
} |
Sorry for the late reply. @mezis Thanks, I used your snippet and and works fine: First time I run the app:
Second time I run the app:
Could you send me a full demo app, please? |
@mezis Ignore my last comment 😅 I was using Xcode 8. Now, it's happening:
Thanks again! |
I'll close this because I can't reproduce it. Please open this issue again if it still happens. |
See the attached logs. This is a device that is already activated and registered, but then fails activation.
verbose.txt
The state machine should detect that the device is already registered, and should no attempt to re-register.
@ricardopereira are you able to take a look please?
The text was updated successfully, but these errors were encountered: