Closed vijayaa closed 7 years ago
@vijayaa The log you provided lacks the mod_apns parts.
these logs are related to message. 918792320908@chatserver.com user is offline and registered for apns
@vijayaa They are, but I can't tell you anything until I see the mod_apns logs.
i could see only one log @mod_apns:message:79 Offline message`
Did you register the user in the ejabberd database by sending the stanza mentioned in the README?
Yes. And below are the mnesia contents of that user {apns_users,{<<"+918792320908">>, <<"chatserver.com">>}, <<"507e597290473dac2aa280b92e41517ec38c812ad29c6fe75259f95e1449d9e6">>, 1469599543}
We have enabled archive module also. Does this give any issue
Do the users have subscription BOTH?
Yes. Subscription both
@vijayaa look if the user registered and message arrives to the module handler, then I see no reason why no further logs appear.
Check out this debug version of the module https://gist.github.com/mrDoctorWho/b3a4bff3b732b49463c3c5ec489f5d11 . It has ?DEBUG() calls everywhere, so you must see what's going on in the logs.
i think the issue is we are using shared roaster group. ejabberd doesn't store the subscription details in rosterusers. i added debugs after this line {Subscription, _Groups} = ejabberd_hooks:run_fold(roster_get_jid_info, ToServer, {none, []}, [ToUser, ToServer, From]); This is returning empty
@vijayaa What module currently provides shared roster groups? I'm not currently watching ejabberd development.
mod_shared_roster module. Our requirement is all users under one virtual host should be contacts to each other. so we have used this module
@vijayaa I will look what I can do around this
can i comment this subscription. will it give any issue
@vijayaa Of course you can
can you please help me in this. i don't know much of erlnag
Well, the fastest way for you is to change:
{Subscription, _Groups} =
ejabberd_hooks:run_fold(roster_get_jid_info, ToServer, {none, []}, [ToUser, ToServer, From]),
to this:
Subscription = both,
Make sure you have comma at the end of the line.
Thank you
it is trying to send PUSH. But notification not received on the phone. Logs are below. I am using VOIP certificate 2016-07-28 14:03:26.492 [debug] <0.10441.0>@mod_apns:message:79 Offline message 2016-07-28 14:03:26.492 [debug] <0.10441.0>@mod_apns:message:109 mod_apns: Record found, sending the PUSH 2016-07-28 14:03:26.492 [debug] <0.10441.0>@mod_apns:send_payload:30 FORMAT ERROR: "mod_apns: trying to send payload with these parameters: Address: ~s Port: ~s Cert: ~s Keyfile: ~s Password ~s" ["gateway.sandbox.push.apple.com",2195,""/home/ejabberd/config/VoIP_Cert.pem","/home/ejabberd/config/VoIP_Key.pem","teledna"]
2016-07-28 14:03:28.260 [debug] <0.10441.0>@mod_apns:send_payload:55 mod_apns: Successfully sent payload to the APNS server
@vijayaa please ensure that the problem is not on the client (phone) side. Find some kind of a service or something that will allow you to test PUSH notifications with your phone and given credentials.
Log shows 30 FORMAT ERROR: is there any issue with that
@vijayaa FORMAT ERRORs have nothing to do with it. The module reports that the payload was sent, so whether a wrong payload was sent or something went wrong on the phone.
OK i will check
normal push is working. voip push is not working. Thanks for your help
@vijayaa Wait, it works with shared roster without any changes in code?
Thank you.
@vijayaa No-no-no, please answer the question: does it work with mod_shared_roster without any changes in code? Voip push is another issue.
No. it did not work.i have commented the {Subscription, _Groups} = ejabberd_hooks:run_fold(roster_get_jid_info, ToServer, {none, []}, [ToUser, ToServer, From]), .. As you mentioned.
@mrDoctorWho Are you planning to add support for VOIP Push.
@vijayaa I don't think so.
Closing due to inactivity
Why is it checking the subscription? I think it still makes sense to send apns even if subscription is not both.
@BesatZardosht that was made to prevent spams.
Thanks for explanation!
module loaded successfully. But not receiving notification.
please find the logs below.