Crash when reading APNS response

706 views
Skip to first unread message

Jerome Lanquetot

unread,
May 21, 2012, 2:11:03 AM5/21/12
to easy...@googlegroups.com
Hi,

I have the push notification working, but if I change the state of the iOS app to not receive any notification anymore, easyapns is crashing at the following location

PHP Warning:  unpack() [<a href='function.unpack'>function.unpack</a>]: Type N: not enough input, need 4, have 0 in /aspns_hs/classes/class_APNS.php on line 548
PHP Warning:  implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in /aspns_hs/classes/class_APNS.php on line 548
PHP Notice:  APNS responded with command(0) status(0) pid().

1) APNS::processQueue -> File: samples.php (line 95)
2) APNS::_fetchMessages -> File: class_APNS.php (line 1087)
3) APNS::_iterateMessages -> File: class_APNS.php (line 381)
4) APNS::_pushMessage -> File: class_APNS.php (line 433)
5) APNS::_triggerError -> File: class_APNS.php (line 561)

I have the port 2195 and 2196 only open for outbound connections, I wonder if that could be the cause of the issue?

Thanks for your help
Jerome
Message has been deleted

Matthew Clark

unread,
Oct 26, 2012, 11:10:12 AM10/26/12
to easy...@googlegroups.com
Looks like you're not the only one.  And, as usual, the authors are no help at all.

Matthew Clark

unread,
Oct 26, 2012, 12:20:43 PM10/26/12
to easy...@googlegroups.com
I figured out the problem, and it's not with EasyAPNS at all.  For me, I didn't export the certificates correctly.  Once I corrected this, the error went away, and my app receives APNs in sandbox and production again.

I followed steps 6 through 10 the instructions here:
http://code.google.com/p/apns-php/wiki/CertificateCreation

Reply all
Reply to author
Forward
0 new messages