Closed GoogleCodeExporter closed 8 years ago
From the log you provided, it seems that the payload is successfully
transmitted to Apple servers and that no error-response packet is returned.
The notification therefore does appear to have made it to Apple. Now, why is
Apple not delivering your notification, it's hard to say.
Have you tried using the development server? Was it successful? If so, could
you copy-paste the log output for a test with the development server?
Original comment by sype...@gmail.com
on 7 Nov 2011 at 8:19
No I haven't yet. I'm working on the server side of the app so I need to ask my
companion iPhone developers to have the dev code on one of their iPhones ready
for me to test. I've only limited prod distribution on my phone. Will update
once done.
Original comment by maszc...@gmail.com
on 7 Nov 2011 at 11:01
Additional note: I just noticed that you are missing two required libraries
(commons io and lang)... I'm not sure how that could affect your
notifications, but to be on the safe side, I'd add them..
Original comment by sype...@gmail.com
on 7 Nov 2011 at 11:11
Yes, I skipped them since it compiles and works without them. I added them now
and no change- notifications are not delivered but code reports no errors.
Which JVM are you testing against? I tried both 1.5 and 1.6 and the same
results. Code thinks it's all OK but the phone never gets notified.
For sanity I just tried PHP test and bingo- notification delivered within 2 sec.
Original comment by maszc...@gmail.com
on 8 Nov 2011 at 12:14
Would you mind e-mailing me your keystore file so I can try it myself in debug
mode?
I'm testing with Java 5 locally.
Out of curiosity.. the PHP test you did, is it using the enhanced notification
format, or the simple one? (just trying to find differences...)
Thanks!
Original comment by sype...@gmail.com
on 8 Nov 2011 at 2:07
HI tried the sandbox- same result. The library thinks it's all OK but the phone
never gets the update.
I'm attaching p12 file for your test.
Original comment by maszc...@gmail.com
on 8 Nov 2011 at 11:05
Attachments:
the PHP script attach. This is the one that manages to get through to the
phone. I think it's using simple format.
Original comment by maszc...@gmail.com
on 8 Nov 2011 at 11:12
Attachments:
CORRECTION!!!
The notification WORKED for sandbox! So the lib works if I use sandbox but does
not when I use Apple production server. In both cases no errors are reported.
For sandbox the notification ARE delivered to phone but for production they are
NOT.
Another thing to note is that the PHP code does not use p12 file (you can see
it if you open the code). So could it be the p12 keystore? But why doesn't the
lib report any problems with connectivity?
Original comment by maszc...@gmail.com
on 8 Nov 2011 at 1:04
Could you provide the complete log output for your sandbox test (including the
java command and parameters used to launch the test), so they can be compared?
Thanks!
Original comment by sype...@gmail.com
on 8 Nov 2011 at 3:17
Just to confirm... your tests with the PHP script are using "ckadhoc.pem",
while your tests with JavaPNS are using "IEMTransponder.p12". Do they contain
the exact same certificate and private key? Or are they different
certificates? Which server were they generated for (sandbox or production)?
If they are different certificates, which one is the iApp built with? Your
iApp would only receive notifications for one of them, not both. The library
might not get any error if both certificates are valid and tokens appear to be
valid, but that doesn't mean that your iApp would receive your notifications if
they are not sent with the same certificate your iApp is built with.
Original comment by sype...@gmail.com
on 8 Nov 2011 at 4:31
Problem solved! :-)
The issue was that the original certificat file I was using IEMTransponder.p12
had keys/certificats for both production and sandbox servers. For some reason
the API always picked up the sandbox keys. For some reason they worked while
connecting to Apple productionbut ultimately the notifications were not
delivered.
We produced new certificaes just for production servers and it solved the
problem- messages are now delivered.
Thanks for support- I was impressed by the speed of response. Well done guys!
Original comment by maszc...@gmail.com
on 8 Nov 2011 at 10:43
Good news! I will add this little detail to the documentation :)
Thanks!
Original comment by sype...@gmail.com
on 8 Nov 2011 at 10:48
Original issue reported on code.google.com by
maszc...@gmail.com
on 7 Nov 2011 at 8:06Attachments: