senthilking / apns-php

Automatically exported from code.google.com/p/apns-php
0 stars 0 forks source link

Send notification successful, but phone can't recevie it #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When I start my apns_server,During the first few hours, send and receive are 
all right,
After over eight hours, phone can't receive the notification, there is the log:
Fri, 10 Feb 2012 09:04:04 +0800 ApnsPHP[8372]: INFO: Process 2 has 1 messages, 
sending...
Fri, 10 Feb 2012 09:04:04 +0800 ApnsPHP[8372]: INFO: Sending messages queue, 
run #1: 1 message(s) left in queue.
Fri, 10 Feb 2012 09:04:04 +0800 ApnsPHP[8372]: STATUS: Sending message ID 1 
[custom identifier: unset] (1/3): 83 bytes.

when I restart the apns_server , and add new notification,  i can receive it;
Please suggest How to fix it
What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by panyong...@vip.qq.com on 10 Feb 2012 at 2:27

GoogleCodeExporter commented 8 years ago
I get the same issue if i leave the server idle over night and try to add a new 
message in the morning. The first message gets reported as delivered:
Thu, 14 Jun 2012 10:35:46 +0200 ApnsPHP[22531]: INFO: Process 2 has 1 messages, 
sending...
Thu, 14 Jun 2012 10:35:46 +0200 ApnsPHP[22530]: INFO: Process 1 has 1 messages, 
sending...
Thu, 14 Jun 2012 10:35:46 +0200 ApnsPHP[22531]: INFO: Sending messages queue, 
run #1: 1 message(s) left in queue.
Thu, 14 Jun 2012 10:35:46 +0200 ApnsPHP[22530]: INFO: Sending messages queue, 
run #1: 1 message(s) left in queue.
Thu, 14 Jun 2012 10:35:46 +0200 ApnsPHP[22530]: STATUS: Sending message ID 1 
[custom identifier: unset] (1/3): 103 bytes.
Thu, 14 Jun 2012 10:35:46 +0200 ApnsPHP[22531]: STATUS: Sending message ID 1 
[custom identifier: unset] (1/3): 103 bytes.

but it is not delivered to the phone. The next try gives an error:
Thu, 14 Jun 2012 10:36:58 +0200 ApnsPHP[22530]: INFO: Process 1 has 1 messages, 
sending...
Thu, 14 Jun 2012 10:36:58 +0200 ApnsPHP[22530]: INFO: Sending messages queue, 
run #1: 1 message(s) left in queue.
Thu, 14 Jun 2012 10:36:58 +0200 ApnsPHP[22530]: STATUS: Sending message ID 1 
[custom identifier: unset] (1/3): 93 bytes.
Thu, 14 Jun 2012 10:36:58 +0200 ApnsPHP[22531]: INFO: Process 2 has 1 messages, 
sending...
Thu, 14 Jun 2012 10:36:58 +0200 ApnsPHP[22531]: INFO: Sending messages queue, 
run #1: 1 message(s) left in queue.
Thu, 14 Jun 2012 10:36:58 +0200 ApnsPHP[22531]: STATUS: Sending message ID 1 
[custom identifier: unset] (1/3): 93 bytes.
Thu, 14 Jun 2012 10:36:58 +0200 ApnsPHP[22530]: ERROR: Unable to send message 
ID 1: Internal error (0 bytes written instead of 93 bytes) (999).
Thu, 14 Jun 2012 10:36:58 +0200 ApnsPHP[22531]: ERROR: Unable to send message 
ID 1: Internal error (0 bytes written instead of 93 bytes) (999).
Thu, 14 Jun 2012 10:36:58 +0200 ApnsPHP[22530]: INFO: Disconnected.
Thu, 14 Jun 2012 10:36:58 +0200 ApnsPHP[22531]: INFO: Disconnected.
Thu, 14 Jun 2012 10:36:58 +0200 ApnsPHP[22530]: INFO: Trying 
ssl://gateway.sandbox.push.apple.com:2195...
Thu, 14 Jun 2012 10:36:58 +0200 ApnsPHP[22531]: INFO: Trying 
ssl://gateway.sandbox.push.apple.com:2195...
Thu, 14 Jun 2012 10:36:59 +0200 ApnsPHP[22531]: INFO: Connected to 
ssl://gateway.sandbox.push.apple.com:2195.
Thu, 14 Jun 2012 10:36:59 +0200 ApnsPHP[22531]: INFO: Sending messages queue, 
run #2: 1 message(s) left in queue.
Thu, 14 Jun 2012 10:36:59 +0200 ApnsPHP[22531]: STATUS: Sending message ID 1 
[custom identifier: unset] (2/3): 93 bytes.
Thu, 14 Jun 2012 10:36:59 +0200 ApnsPHP[22530]: INFO: Connected to 
ssl://gateway.sandbox.push.apple.com:2195.
Thu, 14 Jun 2012 10:36:59 +0200 ApnsPHP[22530]: INFO: Sending messages queue, 
run #2: 1 message(s) left in queue.
Thu, 14 Jun 2012 10:36:59 +0200 ApnsPHP[22530]: STATUS: Sending message ID 1 
[custom identifier: unset] (2/3): 93 bytes.

but if i try once more the message is logged as delivered and it appears on the 
phone: 
Thu, 14 Jun 2012 10:37:38 +0200 ApnsPHP[22531]: INFO: Process 2 has 1 messages, 
sending...
Thu, 14 Jun 2012 10:37:38 +0200 ApnsPHP[22531]: INFO: Sending messages queue, 
run #1: 1 message(s) left in queue.
Thu, 14 Jun 2012 10:37:38 +0200 ApnsPHP[22531]: STATUS: Sending message ID 1 
[custom identifier: unset] (1/3): 96 bytes.
Thu, 14 Jun 2012 10:37:38 +0200 ApnsPHP[22530]: INFO: Process 1 has 1 messages, 
sending...
Thu, 14 Jun 2012 10:37:38 +0200 ApnsPHP[22530]: INFO: Sending messages queue, 
run #1: 1 message(s) left in queue.
Thu, 14 Jun 2012 10:37:38 +0200 ApnsPHP[22530]: STATUS: Sending message ID 1 
[custom identifier: unset] (1/3): 96 bytes.

Im using the sandbox server for testing, could this be the reason that the 
persistant connection is dropped some how or is this problem occuring in the 
live evn as well?

Original comment by micke.li...@gmail.com on 14 Jun 2012 at 9:05

GoogleCodeExporter commented 8 years ago
But in my server , The next not gives an error , it run normal, but the phone 
can't receive the notification,  only if i restart my apns_servier;
Now i use a temporary solution: reconnect the apns per hour;

Original comment by panyong...@vip.qq.com on 14 Jun 2012 at 9:34

GoogleCodeExporter commented 8 years ago
Dear,

The project source code has moved to github; if your issue is still valid, 
please open it on github page https://github.com/duccio/ApnsPHP/issues

Thanks.

Original comment by aldo.arm...@gmail.com on 26 Oct 2012 at 11:45