vysheng / tg

telegram-cli
GNU General Public License v2.0
6.49k stars 1.54k forks source link

Moving profile directory makes me relogin using phone number #1746

Open hawkofsky opened 2 years ago

hawkofsky commented 2 years ago

I logged with phone number(default profile) and I added another profile to the config file so now I have 2 profiles(logged and so generated auth files). Now I moved second profile directory to other directory. I changed config_directory for the second profile in the config file. And I tried to log with that profile using telegram-cli -p xxx but it asks phone number. I believed it would log in without asking authentication. What's wrong with me?

Paulchen232 commented 2 years ago

More than once?

hawkofsky commented 2 years ago

Yes, and even if I enter phone number and authenticate, it fails with loop.c:480: write_auth_file: Assertion auth_file_fd >= 0' failed. The directory I specified is 777 so anyone can read/write it. I tried to use -U root but the same result. What's the issue?