Hi,
I am getting this invalid token error though I am pretty sure that I
am using the correct device token generated by APNS. The stack trace
is below. Any help is greatly appreciated..
Wed, 10 Aug 2011 22:56:30 -0400 ApnsPHP[19236]: INFO: Trying
ssl://gateway.sandbox.push.apple.com:2195... Wed, 10 Aug 2011 22:56:30
-0400 ApnsPHP[19236]: INFO: Connected to ssl://
gateway.sandbox.push.apple.com:2195.
object(ApnsPHP_Message)#2 (8)
{ ["_bAutoAdjustLongPayload":protected]=> bool(true)
["_aDeviceTokens":protected]=> array(1) { [0]=> string(64)
"aaea54fa09e4c6b20f9f4bf1b8692211cc253b437b830d70af08c1221b397d93" }
["_sText":protected]=> string(10) "News items" ["_nBadge":protected]=>
int(1) ["_sSound":protected]=> string(7)
"default" ["_aCustomProperties":protected]=> NULL
["_nExpiryValue":protected]=> int(30)
["_mCustomIdentifier":protected]=> string(2) "BV" } Wed, 10 Aug 2011
22:56:30 -0400 ApnsPHP[19236]: INFO: Sending messages queue, run #1: 1
message(s) left in queue. Wed, 10 Aug 2011 22:56:30 -0400
ApnsPHP[19236]: STATUS: Sending message ID 1 [custom identifier: BV]
(1/3): 103 bytes. Wed, 10 Aug 2011 22:56:31 -0400 ApnsPHP[19236]:
ERROR: Unable to send message ID 1: Invalid token (8). Wed, 10 Aug
2011 22:56:31 -0400 ApnsPHP[19236]: INFO: Disconnected. Wed, 10 Aug
2011 22:56:31 -0400 ApnsPHP[19236]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...
Wed, 10 Aug 2011 22:56:31 -0400 ApnsPHP[19236]: INFO: Connected to
ssl://
gateway.sandbox.push.apple.com:2195. Wed, 10 Aug 2011 22:56:31
-0400 ApnsPHP[19236]: INFO: Sending messages queue, run #2: 1
message(s) left in queue. Wed, 10 Aug 2011 22:56:31 -0400
ApnsPHP[19236]: WARNING: Message ID 1 [custom identifier: BV] has an
unrecoverable error (8), removing from queue without retrying... Wed,
10 Aug 2011 22:56:32 -0400 ApnsPHP[19236]: INFO: Disconnected.
array(1) { [1]=> array(3) { ["MESSAGE"]=> object(ApnsPHP_Message)#2
(8) { ["_bAutoAdjustLongPayload":protected]=> bool(true)
["_aDeviceTokens":protected]=> array(1) { [0]=> string(64)
"aaea54fa09e4c6b20f9f4bf1b8692211cc253b437b830d70af08c1221b397d93" }
["_sText":protected]=> string(10) "News items" ["_nBadge":protected]=>
int(1) ["_sSound":protected]=> string(7)
"default" ["_aCustomProperties":protected]=> NULL
["_nExpiryValue":protected]=> int(30)
["_mCustomIdentifier":protected]=> string(2) "BV" }
["BINARY_NOTIFICATION"]=> string(103) " NCD� ��T� �Ʋ �K�i" �%;C{�
p� �" 9}�:{"aps":{"alert":"News items","badge":
1,"sound":"default"}}" ["ERRORS"]=> array(1) { [0]=> array(5)
{ ["command"]=> int(8) ["statusCode"]=> int(8) ["identifier"]=> int(1)
["time"]=> int(1313031391) ["statusMessage"]=> string(13) "Invalid
token" } } } }