mrDoctorWho / ejabberd_mod_apns

An ejabberd module to send PUSH messages to iOS devices through APNS
MIT License
33 stars 19 forks source link

Messages not getting Pushed - Error: Something is wrong with the body #18

Closed CreativeWolf closed 7 years ago

CreativeWolf commented 7 years ago

Hi,

Thanks for sharing the Module with Secret recipe.

Here's the log output:

2017-02-03 21:10:13.239 [debug] <0.601.0>@ejabberd_receiver:process_data:284 Received XML on stream = <<"<message id=\"duvBK-21\" to=\"9578353705@chat.kaching.me\" type=\"chat\">Good night :)">> 2017-02-03 21:10:13.239 [debug] <0.601.0>@shaper:update:120 State: {maxrate,1000,38.852096138409074,1486156205614100}, Size=139 M=70.87685723565396, I=7625.141 2017-02-03 21:10:13.239 [debug] <0.602.0>@ejabberd_router:do_route:351 route from {jid,<<"cw">>,<<"chat.kaching.me">>,<<"chat.kaching.me">>,<<"cw">>,<<"chat.kaching.me">>,<<"chat.kaching.me">>} to {jid,<<"9578353705">>,<<"chat.kaching.me">>,<<>>,<<"9578353705">>,<<"chat.kaching.me">>,<<>>} packet {xmlel,<"message">>,[{<<"id">>,<<"duvBK-21">>},{<<"to">>,<<"9578353705@chat.kaching.me">},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"Good night :)">>}]},{xmlel,<<"request">>,[{<<"xmlns">>,<<"urn:xmpp:receipts">>}],[]}]} 2017-02-03 21:10:13.239 [debug] <0.602.0>@ejabberd_local:do_route:265 local route from {jid,<<"cw">>,<<"chat.kaching.me">>,<<"chat.kaching.me">>,<<"cw">>,<<"chat.kaching.me">>,<<"chat.kaching.me">>} to {jid,<<"9578353705">>,<<"chat.kaching.me">>,<<>>,<<"9578353705">>,<<"chat.kaching.me">>,<<>>} packet {xmlel,<<"message">>,[{<<"id">>,<<"duvB"...>>},{<<"to">>,<<...>>},{<<...>>,...}],[{xmlel,<<...>>,...},{xmlel,...}]} 2017-02-03 21:10:13.240 [debug] <0.602.0>@ejabberd_sm:do_route:463 session manager from {jid,<<"cw">>,<<"chat.kaching.me">>,<<"chat.kaching.me">>,<<"cw">>,<<"chat.kaching.me">>,<<"chat.kaching.me">>} to {jid,<<"9578353705">>,<<"chat.kaching.me">>,<<>>,<<"9578353705">>,<<"chat.kaching.me">>,<<>>} packet {xmlel,<<"message">>,[{<<"id">>,<<"duvB"...>>},{<<"to">>,<<...>>},{<<...>>,...}],[{xmlel,<<...>>,...},{xmlel,...}]} 2017-02-03 21:10:13.240 [debug] <0.602.0>@mod_apns:message:79 Offline message 2017-02-03 21:10:13.240 [debug] <0.602.0>@mod_apns:message:119 Something is wrong with the body 2017-02-03 21:10:25.470 [debug] <0.405.0>@ejabberd_router:do_route:351 route

Please let me know what needs tinkering.

mrDoctorWho commented 7 years ago

Hi again,

Apparently, when I was writing the debugging version of the module I wasn't really there.

There is nothing wrong with the body, but with subscription. Your users don't have subscription both.

CreativeWolf commented 7 years ago

Just tried to use ChatSecure on two iOS devices and push notification works fine. Thanks much! =)