Closed cjpete closed 8 years ago
403 could also mean that the access token doesn't match the credentials of the app which asked for the channel URI. Could you check that the package name in your app's manifest matches the cloud service credentials given to your app in the Dashboard?
To answer your additional questions:
@rakatyal Regarding Q1: When the plugin fires the 'registration' event on iOS devices, the user is prompted to allow Push Notifications. The same thing doesn't seem to happen on Windows.
I am not aware of any permission settings on windows platform. So that's expected behavior.
Hello,
We are also facing the same problem with same response from Amazon SNS as mentioned by @cjpete in his original question.
I am using version 2.0.x version of the plugin (because I have to use FCM for Android) Cordova Version: 6.4.0 Cordova Windows platform version: 3.9.0-dev
Since, SNS is returning 403 I have verified that the package name in my manifest is same as specified in the Windows Store's App's Dashboard.
In fact I copy-pasted the
Were you able to find a solution to this problem?
@agupta-elementum - I no longer have access to the code, but if I recall correctly it was resolved by signing the app package with a valid certificate in VS.
Thanks for the reply @cjpete but we are signing the app with a valid certificate and that's how the app is able to run on the device. By the way, I am installing the app on the phone using Visual Studio's Debug option.
@cjpete , thanks for your help. Initially I was manually copying the Package Name and Publisher ID from the Store Dashboard to app's manifest file and Push Notification was not received by the app even though Secret Key and SID were right. Now, I used Visual Studio's Associate App to Store feature. It downloaded correct certificate. When I used this to sign my app (in manifest's Packaging tab) the notification was received fine.
This thread has been automatically locked.
Actual Behaviour
Push notification never reaches the device, and is rejected by WNS. I have checked the package SID and the client secret and both of these are correctly configured in the cloud service.
Steps to Reproduce
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Windows 10.0.10586.0 - Surface Pro 4
Cordova CLI version and cordova platform version
Cordova Version: 6.1.1 Cordova Windows Platform Version: 4.3.2
Plugin version
1.5.3
Sample Push Data Payload
Sample Code that illustrates the problem
I am just passing an empty object into PushNotification.init(), and the token is being correctly retrieved and submitted to the cloud service I am using - Amazon SNS.
From what I can read, the status codes being returned indicate that the app is not authorised for receiving push notifications, however, in my config.xml file, I have the following preference:
<preference name="WindowsToastCapable" value="true" />
Logs taken while reproducing problem
Additional Questions