vysheng / tg

telegram-cli
GNU General Public License v2.0
6.45k stars 1.53k forks source link

Can't register my phone number #440

Open santote opened 9 years ago

santote commented 9 years ago

Hi, i'm installing Telegram Cli on my raspberry pi to send the state of some GPIO pins. When I try to enter in first time with "bin/telegram-cli -k tg-server.pub -W", i don't receive the lines to configure my phone number. I onl see this:

pi@raspberrypi ~/tg $ bin/telegram-cli -k tg-server.pub -W Telegram-cli version 1.2.0, Copyright (C) 2013-2015 Vitaly Valtman Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type show_license'. This is free software, and you are welcome to redistribute it under certain conditions; typeshow_license' for details. Telegram-cli uses libtgl version 1.2.0 I: config dir=[/home/pi/.telegram-cli] [/home/pi/.telegram-cli] created [/home/pi/.telegram-cli/downloads] created

Thank you very much.

majn commented 9 years ago

I've noticed this in telegram-purple too. There's a problem during authentication since an IP of the telegram data center has changed and the login somehow seems to depend on the hard-coded presets. According to the log the discovery returns these data center addresses:

15:03:32: (Libpurple: prpl-telegram) DC1 '' update: 149.154.175.50:443
15:03:32: (Libpurple: prpl-telegram) DC2 '' update: 149.154.167.51:443
15:03:32: (Libpurple: prpl-telegram) DC3 '' update: 149.154.175.100:443
15:03:32: (Libpurple: prpl-telegram) DC4 '' update: 149.154.167.91:443
15:03:32: (Libpurple: prpl-telegram) DC5 '' update: 149.154.171.5:443

In tgl.h you will see:

define TG_SERVER_1 "149.154.175.50"

define TG_SERVER_2 "149.154.167.51"

define TG_SERVER_3 "174.140.142.6"

define TG_SERVER_4 "149.154.167.91"

define TG_SERVER_5 "149.154.171.5"

Change the third entry in tgl.h to

  #define TG_SERVER_3 "149.154.175.100"

and it will work again. I've submitted a pull request: https://github.com/vysheng/tgl/pull/14

Of course this is just a hotfix, there is probably some bigger issue in the code that has to be fixed, the data center discovery should theoretically work and not depend on hard-coded addresses.

santote commented 9 years ago

Thanks majn for you reply, but it's still without apearing any message to input the phone number.

majn commented 9 years ago

Have you recompiled tg?

majn commented 9 years ago

Also make sure that you clear all files in ~/.telegram-cli/

santote commented 9 years ago

Thank you very much majn, i didn't know how to recompile tg only, i recompiled all with make command. It worked perfect. Thanks a lot.

reekoheek commented 9 years ago

I think this issue resolved by hot fix from majn

AndydeCleyre commented 9 years ago

@majn's fix saved me as well. Thanks @majn!

Maverick-GH commented 9 years ago

Hi @majn ,

When you say "make sure that you clear all state files in ~/.telegram-cli/", you mean the only one "state" file, right ? Are there any other files that I should clear ? Thanks in advance

majn commented 9 years ago

@Maverick-GH No, actually I meant to clear all the files not only the state file.

Maverick-GH commented 9 years ago

@majn , I removed every single file/diretory from .telegram-cli and tried to run bin/telegram-cli -k tg-server.pub again. Same problem. Still hangs... Should I try ./configure again ? Or is there anything else I could do ? Thanks

pr00thmatic commented 9 years ago

I downloaded telegram-cli yesterday, it comes with the new line:

define TG_SERVER_3 "149.154.175.100"

anyway, I still have the same problem :( maybe an IP of the telegram's data center changed again?

khaledelcheikh commented 9 years ago

Hello guys, any updates regarding the issue? I have downloaded the repo today and still facing the issue. no phone number required and i couldn't ping any of the IPs found in the tgl.h

define TG_SERVER_1 "149.154.175.50"

define TG_SERVER_2 "149.154.167.51"

define TG_SERVER_3 "149.154.175.100"

define TG_SERVER_4 "149.154.167.91"

define TG_SERVER_5 "149.154.171.5"

root@ubuntu:/tg# bin/telegram-cli -k tg-server.pub change_user_group: can't find the user telegramd to switch to Telegram-cli version 1.3.1, Copyright (C) 2013-2015 Vitaly Valtman Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type show_license'. This is free software, and you are welcome to redistribute it under certain conditions; typeshow_license' for details. Telegram-cli uses libtgl version 2.0.2 Telegram-cli uses libpython version 2.7.6 I: config dir=[/home/khaled/.telegram-cli]

Please help and thanks in advance!

LukeLR commented 9 years ago

Ping works fine for me on all the IPs. therefore it seems to be an issue related to your network connection. Are you behind a firewall or proxy server?

On 16 Jun 2015, at 2:51 pm, khaledelcheikh notifications@github.com wrote:

149.154.175.50

khaledelcheikh commented 9 years ago

Hi, it worked after granting direct internet access.

Thanks a lot for your quick reply.

LukeLR commented 9 years ago

You're welcome :)

On 16 Jun 2015, at 5:48 pm, khaledelcheikh notifications@github.com wrote:

Hi, it worked after granting direct internet access.

Thanks a lot for your quick reply.

— Reply to this email directly or view it on GitHub.

Maverick-GH commented 9 years ago

In my case, it was a network configuration issue. The server couldn't reach internet in order to accomplish configuration. So, since you can't reach any of those IPs, I guess you have the same problem.

Em 16/06/2015 09:51, khaledelcheikh notifications@github.com escreveu: Hello guys, any updates regarding the issue? I have downloaded the repo today and still facing the issue. no phone number required and i couldn't ping any of the IPs found in the tgl.h

define TG_SERVER_1 "149.154.175.50"

define TG_SERVER_2 "149.154.167.51"

define TG_SERVER_3 "149.154.175.100"

define TG_SERVER_4 "149.154.167.91"

define TG_SERVER_5 "149.154.171.5"

root@ubuntu:/tg# bin/telegram-cli -k tg-server.pub change_user_group: can't find the user telegramd to switch to Telegram-cli version 1.3.1, Copyright (C) 2013-2015 Vitaly Valtman Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type show_license'. This is free software, and you are welcome to redistribute it under certain conditions; typeshow_license' for details. Telegram-cli uses libtgl version 2.0.2 Telegram-cli uses libpython version 2.7.6 I: config dir=[/home/khaled/.telegram-cli]

Please help and thanks in advance!


Reply to this email directly or view it on GitHub: https://github.com/vysheng/tg/issues/440#issuecomment-112415941

everhopingandwaiting commented 8 years ago

./telegram-cli -k ../tg-server.pub -v 3 -W Telegram-cli version 1.3.1, Copyright (C) 2013-2015 Vitaly Valtman Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type show_license'. This is free software, and you are welcome to redistribute it under certain conditions; typeshow_license' for details. Telegram-cli uses libtgl version 2.0.2 Telegram-cli uses libpython version 2.7.9 I: config dir=[/home/pi/.telegram-cli]

telegram-cli: tgl/mtproto-client.c:1242: tc_becomes_ready: Assertion `0' failed. SIGNAL received pi@raspberrypi ~/360upan/tools/telegram/tg/bin $ ############################################################### also my IP is right , but it still have probelm!

authorized13 commented 8 years ago

Love this concept encrypted Telegraph is the s***

Chukwuokike commented 7 years ago

Hello am having difficulties registering in telegram please I need help