Closed harshit990 closed 1 year ago
Please anybody help me out to resolve this..
Which app are you using?
@H-Shay thanks for the reply. I am using element ios app, created custom one from element ios app. Do let me know if you need any other information
To be clear, you are using a custom app that you based on element ios? Looking at the logs, it's a little unclear whether this is an issue with Sygnal, your app, or Apple. Can you provide logs for a greater period of time, such as from the beginning of a one of the delayed requests to Sygnal to after the request has been processed? It might be helpful in tracking down what's happening.
Yes, I have compiled the element ios code with new package name, which is using custom homeserver.
I have attached log of sygnal server, which is generated from starting a call till the time second phone rings and call is disconnected by the user.
Please do let me know if you need any other information. log.txt
This issue might shed some light: https://github.com/matrix-org/sygnal/issues/302, let me know if the advice there is not helpful and I will keep digging.
@H-Shay Thanks for the reply, I don't think this is related with #302 as I have already set platform: production and also I am not able to get FCM in development build. Could you please help me out.
@H-Shay Yes, I have already went through that but nothing solve the issue. I have installed the server through matrix-docker-ansible-deploy. I can share the other details also if you need or I can share the server details for better investigation, if you need. Please do let me know what should I do.
@H-Shay Could you please help me out. I am still unable to resolve this one
Unfortunately I am not really sure what to recommend here-it doesn't look like a bug in Syngal, as the issue is that Apns is repeatedly closing the connection. I am not an IOS developer so it's hard for me to say what might be the issue here. You could try asking in #sygnal:matrix.org for more information.
On each call attempt, phone is ringing but after significant delayed.
(@manuroe does my summary here seem correct to you?)
There are many related issues: https://github.com/matrix-org/sygnal/issues?q=is%3Aissue+sort%3Aupdated-desc+ios+voip and https://github.com/vector-im/element-ios/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+voip+notification which you should read through if you haven't already. https://github.com/vector-im/element-ios/issues/4132 in particular sounds relevant; this may be a long-standing problem with Element iOS itself.
From https://github.com/matrix-org/sygnal/issues/235#issuecomment-885741255 it sounds like Element iOS uses a Notification Service Extension. You should double check this is configured properly with all the required permissions and entitlements.
Otherwise I suggest you carefully read through Apple's documentation on User Notifications and PushKit. (Note that Sygnal uses the HTTP/2 APNS API and not the legacy binary protocol.) In particular see Responding to VOIP Notifications from PushKit.
You could also try asking here or here. In general the Element-iOS team are going to be much more familiar with this problem and much better-placed to advise.
As per attached logs, connection are being closed automatically very frequently.
This is not a good sign. Per https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/handling_notification_responses_from_apns#3394526
Verify that you aren't spamming the device. If you send too many notifications to the same device within a short timespan, APNs may treat it as a denial-of-service attack and temporarily block your server from sending notifications.
Check how often your provider server connects to APNs. If your provider server opens and closes its connection to APNs repeatedly, APNs may treat it as a denial-of-service attack and temporarily block your server from connecting.
I suggest you take a look at Troubleshoot Problems with Receiving Notifications and see if any of its suggestions help you.
I don't understand why Sygnal is trying to send the same notification (at least, something with the same UUID) again and again. That doesn't sound very good.
@DMRobertson I have tried all 3-4 version of element ios only changing the homeserver url, sygnal url and package name but still faces same issues with all cases. Hence I think it's not related with element, must be some configurational error I have enclosed the configuration sygnal. Could you please let me know if I am doing anything wrong. I would be very grateful to you Syngal.txt
@harshit990
were you able to resolve it ?, i dont think its an element issue. i am using fluffychat and have the same issue
this is my logs , Android notification works but ios notifications fail to pop-up unless the App is open
`-- Logs begin at Fri 2022-05-27 06:03:00 UTC. --
Oct 06 04:51:18 fluffy matrix-sygnal[795752]: 2022-10-06 04:51:18,740 [1] INFO sygnal.access Handled request: "104.211.4.163" - - [06/Oct/2022:04:51:18 +0000] "POST /_matrix/push/v1/notify HTTP/1.0" 200 16 "-" "Synapse/1.68.0"
Oct 06 04:51:18 fluffy matrix-sygnal[795752]: 2022-10-06 04:51:18,740 [1] INFO sygnal.access Handled request: "104.211.4.163" - - [06/Oct/2022:04:51:18 +0000] "POST /_matrix/push/v1/notify HTTP/1.0" 200 16 "-" "Synapse/1.68.0"
Oct 06 04:51:18 fluffy matrix-sygnal[795752]: 2022-10-06 04:51:18,740 [1] INFO sygnal.access Handled request: "104.211.4.163" - - [06/Oct/2022:04:51:18 +0000] "POST /_matrix/push/v1/notify HTTP/1.0" 200 16 "-" "Synapse/1.68.0"
Oct 06 04:55:18 fluffy matrix-sygnal[795752]: 2022-10-06 04:55:18,745 [1] INFO twisted Stopping factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.
`
were you able to resolve it ?, i dont think its an element issue. i am using fluffychat and have the same issue this is my logs
This is likely due to #325, which is an incompatibility between FluffyChat and Sygnal.
@DMRobertson I have tried all 3-4 version of element ios only changing the homeserver url, sygnal url and package name but still faces same issues with all cases. Hence I think it's not related with element, must be some configurational error I have enclosed the configuration sygnal. Could you please let me know if I am doing anything wrong. I would be very grateful to you Syngal.txt
This is a complete stab in the dark, but does specifying the push_type
in the config improve things?
com.innobins.sandsai.ios:
certfile: /data/sandsai_apn.pem
topic: com.innobins.sandsai
type: apns
+ push_type: alert
com.innobins.sandsai.ios.voip:
certfile: /data/sands_voip_final.pem
topic: com.innobins.sandsai
type: apns
+ push_type: voip
@harshit990 did you manage to test the proposed config fix in the previous comment ? I am going to close this issue for now since it looks like a config problem on your side as you suggested, but feel free to re-open with more info if you think it's not the case.
I have tried with proposed config also..but nothing is working..I am still facing the same issue
iOS VOIP sometimes notifications getting delayed significantly if app is not open/in background
To Reproduce Steps to reproduce the behavior:
Expected behavior VOIP notifications should get triggered and the phone should ring immediately
Smartphone (please complete the following information):
Additional context On each call attempt, phone is ringing but after significant delayed. As per attached logs, connection are being closed automatically very frequently.