sshcheung / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

No Notification Received on Phone - No Errors Display #89

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
D:\Projects\IPhone\PushNotification\Javapns\javapns>java -cp "JavaPNS_2.1.jar;li
b/bcprov-jdk15-146.jar;lib/log4j-1.2.15.jar" javapns.test.NotificationTest Certi
ficatesKey.p12 XXXXX b411c9e9353a871ecb8a45ca3ecbc16dfc77a8873abb2645926f28c37
97a786a production
Validating keystore reference: VALID  (keystore was found)
Verifying keystore content: VERIFIED  (no common mistakes detected)
0 [main] DEBUG javapns.communication.ConnectionToAppleServer  - Creating SSLSock
etFactory
109 [main] DEBUG javapns.communication.ConnectionToAppleServer  - Creating SSLSo
cket to gateway.push.apple.com:2195
1890 [main] DEBUG javapns.notification.PushNotificationManager  - Initialized Co
nnection to Host: [gateway.push.apple.com] Port: [2195]: 1503a3[SSL_NULL_WITH_NU
LL_NULL: Socket[addr=gateway.push.apple.com/17.149.35.170,port=2195,localport=27
96]]
1890 [main] DEBUG javapns.notification.PushNotificationManager  - Building Raw m
essage from deviceToken and payload
1906 [main] DEBUG javapns.notification.Payload  - Adding alert [JAVAPNS DEBUG AL
ERT 1
2011/12/01 16:10:51
gateway.push.apple.com
B411à786A [Id:1] Exp:T+86400
Enhanced format / UTF-8]
1921 [main] DEBUG javapns.notification.PushNotificationManager  - Built raw mess
age ID 1 of total length 191
1921 [main] DEBUG javapns.notification.PushNotificationManager  - Attempting to
send notification: {"aps":{"alert":"JAVAPNS DEBUG ALERT 1\n2011/12/01 16:10:51\n
gateway.push.apple.com\nB411\u2026786A [Id:1] Exp:T+86400\nEnhanced format / UTF
-8"}}
1937 [main] DEBUG javapns.notification.PushNotificationManager  -   to device: b
411c9e9353a871ecb8a45ca3ecbc16dfc77a8873abb2645926f28c3797a786a
4656 [main] DEBUG javapns.notification.PushNotificationManager  - Flushing
4656 [main] DEBUG javapns.notification.PushNotificationManager  - At this point,
 the entire 191-bytes message has been streamed out successfully through the SSL
 connection
4656 [main] DEBUG javapns.notification.PushNotificationManager  - Notification s
ent on first attempt
4656 [main] DEBUG javapns.notification.PushNotificationManager  - Reading respon
ses
4671 [main] DEBUG javapns.notification.PushNotificationManager  - Closing connec
tion
All notifications pushed successfully (1):
  [1] transmitted {"aps":{"alert":"JAVAPNS DEBUG ALERT 1\n2011/12/01 16:10:51\ng
ateway.push.apple.com\nB411\u2026786A [Id:1] Exp:T+86400\nEnhanced format / UTF-
8"}} on first attempt to token b411c..a786a

What is the expected output? What do you see instead?
Expected is to received alert on phone but we don't received.logs does not show 
any error. still adding logs for your ref.

What version of the product are you using? On what operating system?
JavaPNS_2.1.jar,Windows XP 2002

Please provide any additional information below.

Original issue reported on code.google.com by pcbapps...@gmail.com on 1 Dec 2011 at 8:14

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Even when i uninstall my apps from phone,i get same old logs when test using 
javapns.test.NotificationTest

following is a log from feedback service for your ref after i uninstall 
service. any comments you would like to make.
D:\Projects\IPhone\PushNotification\Javapns\javapns>java -cp "JavaPNS_2.1.jar;li
b/bcprov-jdk15-146.jar;lib/log4j-1.2.15.jar" javapns.test.FeedbackTest Certifica
tesKey.p12 xxxx production
0 [main] DEBUG javapns.communication.ConnectionToAppleServer  - Creating SSLSock
etFactory
109 [main] DEBUG javapns.communication.ConnectionToAppleServer  - Creating SSLSo
cket to feedback.push.apple.com:2196
4500 [main] DEBUG javapns.feedback.FeedbackServiceManager  - Found: [0]

Original comment by pcbapps...@gmail.com on 1 Dec 2011 at 8:22

GoogleCodeExporter commented 8 years ago
The log does show that the message was successfully pushed to Apple servers, 
hence no errors.  Now, why is your app apparently not receiving (or reacting 
to) the notification is another matter.  Did you go through the entire 
Troubleshooting wiki page here?

Did your app receive notifications through the sandbox?  If so, could you 
provide the same log output but for your attempts using the sandbox?

Original comment by sype...@gmail.com on 1 Dec 2011 at 12:35

GoogleCodeExporter commented 8 years ago
Thanks guys for your prompt reply. My problem is resolved.
Another behavior i want to know, why even after i uninstall my apps, still your 
API return me Push notification sent successfully to: 
b411c9e9353a871ecb8a45ca3ecbc16dfc77a8873abb2645926f28c3797a786a
I tried this 3-4 times still get the same successful reply. 
But if i check using feedback service i get Inactive device: 
b411c9e9353a871ecb8a45ca3ecbc16dfc77a8873abb2645926f28c3797a786
a

Original comment by pcbapps...@gmail.com on 2 Dec 2011 at 9:01

GoogleCodeExporter commented 8 years ago
As explained in the documentation 
(http://code.google.com/p/javapns/wiki/ManagingPushErrors), you cannot rely on 
either of these systems alone (error-responses and feedback service) to detect 
errors.  The two systems report DIFFERENT problems, so one system might not 
report an error while the other might.  This is the way Apple designed APNS.

In your case, no error-response packets were generated by Apple probably 
because you token is valid and is known to have worked before.  But then Apple 
detected that your app is uninstalled so the token was listed by the Feedback 
Service.

Original comment by sype...@gmail.com on 2 Dec 2011 at 3:27