signal-cli icon indicating copy to clipboard operation
signal-cli copied to clipboard

"Invalid account (phone number), make sure you include the country code."

Open Geremia opened this issue 1 year ago β€’ 7 comments

When I try registering with a new number, I get this:

Invalid account (phone number), make sure you include the country code.

signal-cli 0.13.2-SNAPSHOT

Geremia avatar Jun 28 '24 23:06 Geremia

Do you see the same error with the current version (0.13.4)? Also, can you provide a verbose log (by adding "-vv" on the command line)? Without the latter, nobody is able to help you find the possible reason of your problem.

m-ueberall avatar Jun 29 '24 05:06 m-ueberall

@m-ueberall I get the issue with master, too:

$ signal-cli -a +XXXXXXXXXXX -vv register
2024-06-29T16:42:26.223-0700 [main] DEBUG org.asamk.signal.App - Starting signal-cli 0.13.5-SNAPSHOT
2024-06-29T16:42:26.409-0700 [main] TRACE org.asamk.signal.manager.Manager - Expected exception when checking libsignal-client: Failed to deserialize zkgroup::api::groups::uuid_ciphertext::UuidCiphertext
2024-06-29T16:42:26.409-0700 [main] DEBUG org.asamk.signal.util.IOUtils - XDG_DATA_HOME not set, falling back to home dir
Invalid account (phone number), make sure you include the country code.

(+XXXXXXXXXXX redacted; I used an actual Google VoIP number)

I was also encountering invalid captcha errors when trying to reregister with another number (even before getting the rate-limiting RegistrationRetryException).

Geremia avatar Jun 29 '24 23:06 Geremia

Captcha issue sounds like https://github.com/AsamK/signal-cli/issues/1491

donovanglover avatar Jul 01 '24 16:07 donovanglover

@donovanglover Indeed. It does. It seems a signal-cli issues, as I'm able to register on an Android device just fine.

Geremia avatar Jul 01 '24 19:07 Geremia

What do you get when you try to validate your phone number on this page (it's using the same phone number library as Signal): https://libphonenumber.appspot.com/

AsamK avatar Jul 25 '24 20:07 AsamK

@AsamK

Phone Number entered: XXXXXXXXXX

Default Country entered: 01

Language entered: en

An error occurred while parsing the input: Error type: INVALID_COUNTRY_CODE. Missing or invalid default region. 

(phone # redacted; I typed 10 digits.)

Geremia avatar Jul 26 '24 16:07 Geremia

If your number is already registered with Signal via the mobile app, you don't need to go through the registration process again with Signal-CLI. Instead, you can link Signal-CLI to your existing Signal account.

Here’s how you can link Signal-CLI to your existing Signal account:

  1. Generate a Linking QR Code Open Command Prompt and navigate to the Signal-CLI directory:

bash Copy code cd path\to\signal-cli Run the following command to generate a QR code for linking Signal-CLI as a device:

bash Copy code signal-cli -u +92325278158 link -n "Signal-CLI" Replace +92325278158 with your registered phone number. The -n "Signal-CLI" part allows you to name the device you are linking.

This command will output a QR code in the terminal or save it to a file (depending on the terminal capabilities).

nomansial avatar Aug 16 '24 05:08 nomansial

If the libphonenumber site says that the number is invalid, then it's not a signal-cli issue. Something with the number format is wrong.

AsamK avatar Oct 26 '24 12:10 AsamK

Thanks for the reference to the libphonenumber site. I ended up pasting into hexdump and discovering that the UI where I had copied my VoIP phone number from included a couple extra (invisible) unicode characters in there. And those invisible characters had persisted every time I pasted the number.πŸ€¦πŸ»β€β™‚οΈ

What that looked like (redacted):

$ pbpaste | hexdump -C
00000000  2b 31 e2 80 aa β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ  β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ e2  |+1...β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ.|
00000010  80 ac                                             |..|
00000012

vergenzt avatar Jun 17 '25 01:06 vergenzt