-
Notifications
You must be signed in to change notification settings - Fork 1.9k
iOS Push register twice on first install #1438
Comments
can confirm I am seeing this same behaviour |
The issue is still current with the latest versions of cordova and the plugin. Is someone working on this? |
im having this same issue too. ;( |
I have it too. Plugin 1.8.4 |
By the way, this problem is generating another one: A code 5* com.google.iid error making the notification system fail.
|
I can't reproduce this. Does anyone have the logs from Xcode while starting their app that show this problem? |
I believe I am encountering something similar, the first registration event happens before I've even tapped "Allow" on the prompt for allowing notifications, then the 2nd event happens after I've tapped "Allow".
|
I'm seeing the same behavior as @tombell in 2.0.0. Before the "Allow" button is tapped, I get a |
Not sure to what extent this is related, but I was trying to change some UI after the user responded to the permission dialog. I'm only getting one registration event though. But it fires before the user responded to the dialog. edit: It seems like sometimes |
Also seeing |
If I put alerts in place to trace the call flow, I see the registration event being called twice. I have the same setup as @jspizziri and I'm seeing the exact same thing. The registration event is being fired long before Allow or Deny is clicked on the iOS device. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still happening in 2.2.3 as @kd8ssq describes. On first install, when the question is asked by the OS on .init the registration event fires, both times returning the same id. |
Has anyone figured a way around this? |
It seems to work fine. It does send the registration but if they don't click allow the app wont get sns so it doesnt matter as such. |
Thanks, that is a good point. A concern for those with large number of installs would be costs/exceeding quotas with your push notifications provider for dead notifications. |
In AWS SNS the endpoint becomes disabled if they decline from what I could work out. |
Expected Behaviour
On first boot of the app, after accepting to recieve push notifications for this app, you would expect the registration to trigger once.
Actual Behaviour
On first 'boot' of the app, after accepcting to recieve push notifications for this app, the push register is triggered twice, though the PushNotification.init is only done once. This results in Google errors 5: ''Operation In Progress, Another similar operation is in progress. This one was canceled."
Steps to Reproduce
Set an alert in the 'on registration' listener.
When you delete the app, install and then run the app. You will be asked if you would like to accept push notifications for this app. After accepting, you will recieve the alert twice.
Every other time here after, you will not recieve the alert twice. Unless you remove the app and do this all over again.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 9.3
iOS 9.3.1
iOS 9.3.2
iOS 9.3.3
iOS 9.3.4
iOS 9.3.5
iOS 10
iOS 10.0.2
iOS 10.0.3
iOS 10.1
iOS 10.1.1
Cordova CLI version and cordova platform version
Plugin version
Sample Code that illustrates the problem
Another way to reproduce
In the plugin directory open www and edit push.js on line 36 add
alert('emit');
On first run you will also see this one twice.
Logs taken while reproducing problem
Can't find logs: how to capture logging?
The text was updated successfully, but these errors were encountered: