signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.59k stars 6.14k forks source link

Automatically remove leading 0 in UK numbers stored in phone otherwise can receive not send Signal messages to numbers of +440xxxxxxxxxx (zero after the country code) #5928

Closed cyrus-and closed 7 years ago

cyrus-and commented 7 years ago

I have:


Bug description

Fresh installation: the registration procedure completes successfully.

Basically nothing else works:

Note: due to an operator switch my current SIM cannot always provide the correct phone number (like in this case), so I need to manually fix that. It happens for other services as well, e.g., WhatsApp, without any problems. Anyway, as I said the registration procedure works.

Device info

Device: Nexus 5 Android version: 6.0.1 Signal version: 3.23.0 (from Play store)

Link to debug log

https://gist.github.com/anonymous/86ddc6e25f17dacb07b1415d0bd294f7

riyapenn commented 7 years ago

You need to edit your contact's phone number format in your phone. See the support page or contact support@whispersystems.org.

cyrus-and commented 7 years ago

My contact's phone number already contains the + country code. Maybe I have not made myself clear, this is not a problem with one particular contact.

riyapenn commented 7 years ago

Contact support@whispersystems.org with which steps from the support page you've completed.

cyrus-and commented 7 years ago

I'll do it, but the lack of in-app warnings or any type of feedback is still an issue worth to be fixed IMHO; merely showing an empty contact list is terrible UX.

cyrus-and commented 7 years ago

It turned out that Signal got confused by the 0 after the country code (for UK numbers): +440xxxxxxxxxx. Dropping the zero was the solution. Note that the zero is successfully ignored when I manually enter the number (from the blue pencil), that is Signal recognizes the contact and properly shows the name regardless of the presence of the 0 in the stored number. Yet, it is unable to send secure messages to the contact (only SMS) if it is stored with the zero.

Please note that almost certainly I didn't enter the number manually the first time, rather I must have saved it from a received call or whatever. So that is probably how Android stores it by default and it would be nice if Signal would be aware of that.

Also, it seems that WhatsApp is unaffected by this, i.e, it is able to strip away the zero and save its own contact without it.

moxie0 commented 7 years ago

@cyrus-and Can you tell me more about how your contact's number ended up formatted this way? As far as I know +440 isn't a valid e164 encoding. Did you manually enter it that way, or did it get in your contacts through some other vector? Is it common to enter numbers as +440 in the UK? Thanks!

cyrus-and commented 7 years ago

@moxie0 it happened a couple of years ago, but I'm pretty sure I didn't enter it by hand, most likely I saved it from a regular SMS (vanilla SMS app or Hangouts).

But the thing that puzzles me is that WhatsApp is able to overcame this, so at first I didn't think about the number formatting issue, apart from what concerns the presence/lack of the international prefix.

Is it common to enter numbers as +440 in the UK?

I don't live in the UK myself, so I can't tell.

Thank for investigating this!

moxie0 commented 7 years ago

in 3.25.0