Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calls always income as missed ones without ringing #7314

Closed
2 tasks done
szotsaki opened this issue Jan 3, 2018 · 34 comments
Closed
2 tasks done

Calls always income as missed ones without ringing #7314

szotsaki opened this issue Jan 3, 2018 · 34 comments

Comments

@szotsaki
Copy link

szotsaki commented Jan 3, 2018

I have:


Bug description

When Signal is opened in front of me on my phone and via Hangouts PC I hear the other party while his Signal is actually ringing me. My Signal shows no sign that I'm being called. At the end of ringing, when the network automatically disconnects, I immediately receive a "You have a missed call" notification in the chat.

Reproduced on three different WiFi networks with the same person.

The time difference between the two phones is approximately 5 seconds. Both phones are set to synch to carrier time.

Steps to reproduce

  • Make phone A call phone B in Signal
  • Observe that phone B gets no notification about the incoming call just the missed one.

Device info

Device: Sony F5121
Android version: 7.1.1
Signal version: 4.14.10

Link to debug log

Callee debug log: https://gist.github.com/anonymous/9984ab543d85a181b06b02954564c060
Caller debug log: https://gist.github.com/anonymous/5eae662fee114e5e07a72dbd02c0e92d

@michaelschefczyk
Copy link

This does match my experience also. The issue does seem to be around for about a year: #6244
Unfortunately, similar problems seem to be commonplace with other messengers like Riot as well.

@szotsaki
Copy link
Author

szotsaki commented Jan 8, 2018

As I see, that report is specifically about two clients with time difference bigger than 1 minute. Here, the time difference is not bigger than 5 seconds.

To help the developers, can you please attach logs both from phone A and phone B if you are in a similar situation?

@maedoredyti
Copy link

I can confirm missing calls.
Clocks in all phones of my family are synchronized because we have another app which requires clock difference not higher than +/- 15 seconds.

I discovered there is a problem with the signal's background task. When I kill Signal and the Signal is killed in memory, after running it again all messages I have not received come to me immediately and I can receive calls. Everything is back to normal.

Signal is excluded from the battery optimization, I am android developer, clocks are synchronized +/- 1 second in all phones. There is a problem with the background task itself.
It happens on phones with or without play services. I have many users of Signal and it happens to them.
I used to kill Signal every time I wake up my phone, maybe 5 sometimes, 10 times a day and I can receive calls. This behavior is not time dependent of how long the phone was unused with black screen in a deep sleep. Sometimes after reboot I can't receive calls and can't receive messages and I need to kill the app and run it again.

This hang of the process is somehow related to switching between WiFi/LTE/H+/3G when I walk/drive and my phone needs to change from H+ to LTE, LTE+ and when I come in range of my WiFi.
After I leave my WiFi and I drive nobody can call me on Signal 50% of the time. I get missing calls so on the next traffic lights I kill the Signal, start it again and all is back to normal.
This is not poor RF signal issue because I have 5 bars on LTE, LTE+. It happens when I come back and I have very strong WiFi signal.

It looks like Signal can't negotiate new IP address with the server and it's background process is stuck in any state machine. This is definitely the flaw in the Signal's background behavior.

@maedoredyti
Copy link

maedoredyti commented Jan 9, 2018

For example after the reboot / cold start a phone catches one network and changes to another. I have roaming permanently enabled because I am in EU and in my country we have also domestic roaming for better cover of the network. I don't pay extra so I have it always enabled because it helps a lot and in my plan I have unlimited internet something like 100GB, impossible to be consumed.
During the WhatsApp call I sometimes hear reconnecting beeps but when it is fast the call is uninterrupted.

During the Signal call the voice call is mostly interrupted forever and half of the time I need to kill the Signal to make it operational again.
It is noticeable when I drive through a forest. I drive through a forest twice a day and the coverage of the the internet is spread among some locally roaming operators. When I drive through the forest I may be sure in 50% that the Signal will never receive an incoming call until I kill it.

@maedoredyti
Copy link

Some words to the story...
I live in a rural area in a single family house constructed of concrete and insulated ceramics. Such material attenuates RF signals especially when they are weak and sources are far away. I have 3 cell towers in my area but far away, let's say 5km. Suppose I sit in one room and I walk to the room on the opposite side of the house with WiFi disabled. My phone hesitates which network to chose and after this there is a big chance I will never receive incoming calls, I will get only call missing messages and no signal to signal text messages. All other apps work properly only Signal is stuck.
The same situation but with WiFi enabled. I walk to the basement, I don't have WiFi there or is very weak and of course almost no cellular networks. Phone starts to search like crazy. When I came back the same. The only cure is to kill the Signal app and start it again.
It happens on many phone models. From 2017 Android unrooted Samsung to other rooted with original firmware or Lineage OS always updated. Some of them are more susceptible some not.
Signal app should better analyze the actual default interface, it's actual IP and react better on frequent changes, maybe reload itself or by a secondary watchdog process.
Remember when you kill the Signal process and run it back without rebooting all is back to normal for some time.

@jeremymasters
Copy link

@maedoredyti The devs are accepting pull requests for fixes and since you're an Android dev, it'd be awesome if you were able to tackle this!

@maedoredyti
Copy link

I suspect it may be a problem of finding out the right interface where the data should go through. I downloaded the project and opened it in Android studio but there are so many files that I can't find the right one responsible for checking own IP on the go when subsequent BTS towers change IP assignment.
Can you help me understand how does it work?

It must be a problem with wrong IP, netmask and gateway assignment. When I drive and domestic roaming operator on the go is changed for example from TMobile to Orange my Signal call is disconnected and I need to call again or sometimes kill the app and call again.
WhatsApp handles it by longer or shorter reconnecting beep.

I use mostly Visual Studio with Xamarin and I write in C# but I had programmed in Android studio for 3-4 years in the past.
I write this https://elkom.com.tw/wp-content/uploads/2017/02/android.jpg
and some other apps for PLC controllers with encryption and very strict timestamping +/- 15s and I had problems with communication from IP -> IP on some Android versions. So as you see I have IP -> IP information for the user to debug network.

@rjhnz
Copy link

rjhnz commented Jan 16, 2018

I have a similar problem to the one described.

Calling from a Samsung Note5 to a Samsung s7, the S7 does not ring but immediately shows a missed call on cancellation from the Note5. Stock roms on all phones.
Android 7.

Calling from the S7 to the Note5 results in a ring tone as expected.

Locking to one network and restarting both phones does not affect the result. This does not appear to be related to network swapping.

Call initiated by a second S7 does not result in a ringtone at the Note5, but does result in an immediate missed call notification.

Multiple attempts at configuration changes (ring volume, override privacy settings etc) have not resulted in a change in behaviour.

Connection established via multiple networks with no change in behaviour. Multiple options tried with routers, no changes in behaviour.

Once connection is established video is stable and high quality suggesting network issues are not involved.

@kaymanov-emitter
Copy link

kaymanov-emitter commented Jan 18, 2018

Same problem for me (HTC U11, Android 7) and my girlfriend (HTC M9, Android 6)

No visible or aural indication that a call is being received. We just get a missed call notification.

@maedoredyti
Copy link

Locking to one network and restarting both phones does not affect the result. This does not appear to be related to network swapping.

I noticed the same but look... you make a reboot and your phone wakes up and during this wake up a wired process happens. I notice the same after reboot so try to KILL Signal in Apps->Signal->force stop and run it again and try to make a call.

@rjhnz
Copy link

rjhnz commented Jan 19, 2018

Stopping and restarting the app using force stop on the calling device does not improve the apps performance in my case. The app still shows dialing and never moves to ringing.

I will get the receiving device to force a stop as well sand report back on the issue.

@szotsaki
Copy link
Author

szotsaki commented Jan 19, 2018

To help the developers with truly valuable information, please:

  • Make an unsuccessful call.
  • [Signal main menu] > ... > Settings > Advanced > Send debug log > Submit > Paste the given link here.

Do it for both phones.

@2-4601 2-4601 added the bug label Jan 27, 2018
@nribeka
Copy link

nribeka commented Feb 1, 2018

I can replicate this with phone and emulator with time different of over 2 minutes (the threshold to say a call request is expired). Maybe, if possible, validate that the two devices are synced with a time server? It could be the case where both devices are not synced with any time server and both devices are 5s apart only?

@rjhnz
Copy link

rjhnz commented Feb 1, 2018 via email

@nribeka
Copy link

nribeka commented Feb 1, 2018

I'm not sure how I would be able to help this 😞

This line in the WebRtcCallService#handleIncomingCall() is one of the place where I think will mark a call as missed call if the timing is off.

Maybe we could add some logging messages in the WebRtcCallService#isIncomingMessageExpired() to print out the current phone time vs the call offer message time?

@maedoredyti
Copy link

maedoredyti commented Feb 1, 2018

Half of my contacts have ringing issues. Some of them can be called in both directions but some of them can't initiate call, answer call or both. It can be cured for some time by killing signal process. Phone restart may not cure the situation. After restart we must kill the signal app and start it again.
It doesn't meter if the phone is rooted or not if google play services are installed or not. It is rather independent of operating system version. This behavior is rather random.
I have "Call missing" many times a day from different persons. I kill signal very often to make it working.
It is somehow related to the IP change / BTS change / Wifi change.

@rjhnz
Copy link

rjhnz commented Feb 1, 2018 via email

@maedoredyti
Copy link

Did you try to kill the receiving end ?

@rjhnz
Copy link

rjhnz commented Feb 2, 2018 via email

@maedoredyti
Copy link

Try to kill the Signal app on the receiving phone without restarting your phone. Just kill it and click the icon again. And try to call again. If no result, kill it again, wait 20s and run again and test.

@rjhnz
Copy link

rjhnz commented Feb 2, 2018 via email

@maedoredyti
Copy link

maedoredyti commented Feb 2, 2018

Our symptoms are so inconsistent that it may be a coordinated assault of telecoms / governments on the Signal's protocol itself. Something like or similar to the UAE, Saudi Arabia, Egypt...?
Sometimes everything works but sometimes I can't call my wife at the same building inside the same LAN segment. Killing/running/switching to/from LTE finally helps.

I discovered one thing when there is a problem with calling. When the internet connection is overloaded, for example Windows downloads updates and ping goes to 300-500ms. When it is the case it is also impossible to make a Signal call. But in normal cases I run MTR from linux boxes to test and it is not the case when the ping is low.

With low ping we have also the same problems.

@rjhnz
Copy link

rjhnz commented Feb 2, 2018 via email

@nribeka
Copy link

nribeka commented Feb 2, 2018

@rjhnz that could very well be the case.

I still think maybe adding log information about the current phone timestamp vs timestamp of the call initiation request before marking the call request as missed call would help triage the issue.

@rjhnz
Copy link

rjhnz commented Feb 2, 2018 via email

@maedoredyti
Copy link

maedoredyti commented Feb 2, 2018

I can't confirm the time issue. I have several phones and they all are perfectly in sync with cellular network provided time and GMT/NTP time. I have PLC controller with strong encryption and its transmission relies on accurate timestamp related to the GMT. The time difference between PLC and network provided time is always within 1s on all devices at the same time. Sergey Baranov's ClockSync app on android also reports perfect time relative to the GMT. So I have Android to GMT and Android to my PLC in perfect sync. My time is synchronized to the global atomic clock and all other phones also are synchronized.
Maybe in your case it was also a time disparity as an additional factor of failures. I keep an eye on it because I write time stamped and encrypted transmission and I exactly understand this subject.

Try this:
https://play.google.com/store/apps/details?id=ru.org.amip.ClockSync

@rjhnz
Copy link

rjhnz commented Feb 3, 2018 via email

@szotsaki
Copy link
Author

szotsaki commented Feb 3, 2018

There are clearly two distinct bugs here:

Please, if you want to test and debug the former, time related one, comment to the other bug report.

@maedoredyti
Copy link

maedoredyti commented Feb 3, 2018

This is not only related to the "missing call". I notice strange freezes of the Signal. I cant't send messages because Signal displays "waving line" forever next to the message actually being sent. I kill Signal and start it again and I start receiving all missed calls and also missed signal to signal text messages. Of course this message in the sending queue is of course immediately sent after app restart.
Messages I receive have time stamps several minutes or hours to the past. Looks like Signal was hanged or communication was down..
This behavior is somehow related to the switching between Access points / H+ / LTE. If I am more on the move the hang is more probable.

@maedoredyti
Copy link

maedoredyti commented Feb 4, 2018

Just after I got Missing call info...
https://gist.github.com/7858241c5213dc36b436284522bdf8b6

@maedoredyti
Copy link

Is there any progress ? This bug appears very often on many phones.

@md3kung
Copy link

md3kung commented Feb 28, 2018

I'am still having this bug when trying to call my friend in the U.A.E . I must precise that i'm not sure if this is related to any censorship mesures because audio calls do work sometimes.

@maedoredyti
Copy link

The same here. It is something wrong with the Signal APK itself. It goes to a sleep or it goes to an undefined state and is stalled in memory. For example APK doesn't send any packets at all. Usually it sends packets to something.....amazonaws.com port 443. When it is in a bad state it doesn't send anything. Connection on the router does not exist. Sometimes I must kill the APP and open again to bring it back to life. It happens on the original not rooted phones and on the Lineageos without Google Services. I can say something wrong happens on 50% of Android phones.
My daughters's phone Samsung J7 works perfectly. My fife's LG is almost perfect but sometimes her Signal is also in a strange state, she can't receive or send chat messages.
My friend's other Samsung is down most of the time. Without killing, his Signal is mostly down for voice calls but chat is operational.
One Lineageos works almost good, another is a lottery.
One friend can't use Signal on LTE. On wifi it is ok, on LTE no way to make or receive a voice call (all is enabled in roaming, wifi and mobile)

Does anybody read it?

@automated-signal
Copy link

GitHub Issue Cleanup:
See #7598 for more information.

@signalapp signalapp locked and limited conversation to collaborators Apr 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

10 participants