Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Update libphonenumber to >=8.2.0 (Cannot send SMS to my mobile provider)

Open kpuljek opened this issue 9 years ago • 12 comments

I have:

  • [X] searched open and closed issues for duplicates
  • [X] read https://github.com/WhisperSystems/Signal-Android/wiki/Submitting-useful-bug-reports

Bug description

My friend made me aware of this as I'm never checking my account status via SMS, but it doesn't work for me neither. To check our account status, we have to send an SMS message to 13977, but Signal fails to deliver it. I tried sending it through the native Oneplus SMS app and it goes through just fine, with an immediate response. I can send an SMS to other people, though, so it has something to do with that number. (Signal adds +385 to it for Croatia, maybe that's it?)

Steps to reproduce

  • send an SMS to my provider through Signal

Actual result: it doesn't go through, "Failed to send", "Some issues need your attention." Expected result: Message should go through and I should get a response.

Device info

Device: OnePlus3T Android version: 7.0 Signal version: 3.27.1

Link to debug log

https://gist.github.com/anonymous/f656572561ea3a91d0f4bbdeb98e587b

kpuljek avatar Jan 20 '17 22:01 kpuljek

On some phones there is a setting to enable sending messages to Short codes or short numbers. You will need to allow sending "Premium SMS". Go to Settings > Apps > Signal > scroll to the permissions section > tap on the down arrow for the section "Send premium SMS" and choose 'Ask' or 'Always allow'

riyapenn avatar Jan 21 '17 06:01 riyapenn

Once I saw the Premium SMS setting in my App permission menu, I was sure that was it. But Signal wasn't on that list. I see all the other applications that have SMS capabilities there (Google Messenger, OnePlus Messenger and Facebook Messenger), but not Signal. When I first sent my short numbered SMS, they specifically asked for permission to send, Signal doesn't, it just fails. (I didn't put two and two together that this is a special permission, I figured they were asking general SMS privileges since I just switched to them)

Under Apps > Signal > Permissions there's no mention of Premium SMS, only if I go through general app permissions as stated above.

kpuljek avatar Jan 21 '17 11:01 kpuljek

Checked with my friend, he has Signal listed under Premium SMS, but it already was on Always Allow. He also had to go through general settings, there's no Premium SMS under Signal > permissions

kpuljek avatar Jan 21 '17 11:01 kpuljek

Can anyone with a better understanding of code check if this https://github.com/googlei18n/libphonenumber/blob/master/resources/ShortNumberMetadata.xml#L4982 allows for 13977 as a shortcode number in Croatia?

kpuljek avatar Jan 25 '17 13:01 kpuljek

@kpuljek 13977 doesn't match that regular expression. I think that regular expression will allow the following numbers only: 112 118 116000 116006 116117 116111 116123 1987 192 193 194 195 93 94

I hope I don't miss any number.

nribeka avatar Jan 27 '17 03:01 nribeka

Thats how it looked to me, but I'm a noob when it comes to regex. Thanks! And if it is so, then that's the issue here. My provider Bonbon uses 13977 to check account balance and status.

kpuljek avatar Jan 27 '17 16:01 kpuljek

I think you need to create into libphonenumber then since this seems to be related to how libphonenumber parse your number and then signal need to up the dependency for the libphonenumber.

nribeka avatar Jan 27 '17 19:01 nribeka

The libphonenumber issue was fixed and closed! Will it be automatically included in the next version of Signal?

kpuljek avatar Feb 06 '17 12:02 kpuljek

No, it has to be manually updated to libsignal-service and here. I added that to the subject.

2-4601 avatar Feb 06 '17 13:02 2-4601

The reference for norway doesn't exist anymore. Therefore signal now decided that norway can only have 3, 4 and 6 digit shortcodes, but not 5 all of a sudden. Even though the online resources say 3-5(3 being emergency).

Unless you save it as a contact first, then it's fine and you cxan send/recive like before the last update.

Nazta avatar Feb 06 '17 18:02 Nazta

Thanks for the quick response, but I would hardly call this a feature. Maybe it's just an internal thing I don't know about, but feature sounds a lot less important than bug.

kpuljek avatar Feb 06 '17 21:02 kpuljek

libphonenumber has been updated to v8.3.0 in Signal-Android 3.30.0, see https://github.com/WhisperSystems/libsignal-service-java/commit/f5b94210fc6f2b9f1b8357d53ec6e83154eed3d2 and https://github.com/WhisperSystems/Signal-Android/commit/1669731329bcc32c84e33035a67a2fc22444c24b

haffenloher avatar Feb 21 '17 12:02 haffenloher