d99kris / nchat

Terminal-based Telegram / WhatsApp client for Linux and macOS
MIT License
647 stars 45 forks source link

Hangs after ' Enter phone number: ' #1

Closed delneg closed 5 years ago

delneg commented 5 years ago

Couldn't find option to enable verbose logging, so i'm writing here

d99kris commented 5 years ago

Hi, thanks for reporting a bug.

  1. Could you please share the content of your ~/.nchat/td.log ?
  2. Did you enter your phone number with country code? I.e. if in U.S. like +16505551234 with the leading +1?
  3. Do you have an existing Telegram account, or trying to register a new number? Thanks, Kris
delneg commented 5 years ago

1. mbp-denis:build delneg$ cat ~/.nchat/td.log Using key: mi4JuEVsIWsytVaf Using key: fTSfDsqB4HBeZcUF

  1. Tried both
  2. Existing account
d99kris commented 5 years ago

Thanks. Hmm I would expect the td.log to contain something more. Do you mind trying to run nchat setup again and see if there's some more in td.log? You can alter the actual data from td.log if your phone number or other personal info is there.

To be honest you are probably the first user aside from myself. But I do use it daily without issues.

d99kris commented 5 years ago

And to clarify, the phone number should be entered with country code. After which you should be prompted to enter a confirmation code sent to your phone/telegram.

I should probably add more documentation in the README regarding this.

delneg commented 5 years ago

I'm not the first, a couple of my friends are building it right now. One is struggling with the same issue after build on OpenBSD.

I tried to enter phone in the format of +7903XXXXXXX

delneg commented 5 years ago

You should probably add much more verbose logging, as well as set logging param for tdlib to at least 14 I'm not a c++ programmer myself, but here's an example from other project

include <td/telegram/td_log.h>

td_set_log_verbosity_level(14);

d99kris commented 5 years ago

Thanks, it's probably a good idea to increase the logging verbosity. I'm on my phone now and won't get a chance to change that until I'm at my PC tomorrow evening. Btw, which OS are you using? Nchat is mainly developed/tested on macOS 10.14 Mojave and Ubuntu 18.04,

delneg commented 5 years ago

As you could've guessed from my shell prompt, i'm using macOS. The version is 10.14 mojave as well

d99kris commented 5 years ago

Yep I did guess macOS, but just wanted to make sure. Thanks.

d99kris commented 5 years ago

Btw did you try to re-run nchat setup and see if td.log contained any additional stuff? The "Using key" entry should only be there once authentication has been passed and nchat is started with plain nchat I think.

delneg commented 5 years ago

Yep, i did it at least 5 times. The only log is Using key: stuff

d99kris commented 5 years ago

Ok, thank you. I won't be able to do much today, but hopefully tomorrow. Will post updates here.

d99kris commented 5 years ago

I've implemented support for verbose logging. You can try running the setup with verbose logging enabled like this:

nchat --verbose --setup

Also, I'm wondering regarding your phone number example (+7903XXXXXXX) - is the country code +79? If yes, you can try to omit the first 0 after the country code. Or open the Telegram app on your phone, press menu button and check the number format shown there and use the same.

d99kris commented 5 years ago

No updates received the last 3 weeks, so I will proceed to close this issue. Feel free to re-open with additional log data if the issue persists.