cjongseok / mtproto

Telegram MTProto and its proxy (over gRPC) in Go (golang). API Layer: 71
Apache License 2.0
151 stars 20 forks source link

TL_updates_getState Failure: mtproto RPC error: 401 AUTH_KEY_UNREGISTERED #7

Closed zkip closed 6 years ago

zkip commented 6 years ago

But my cellphone is registered.

zkip commented 6 years ago

2018/03/09 16:12:57 MAIN: new authentication 2018/03/09 16:12:57 [MM 591056883] start 2018/03/09 16:12:57 [MM 591056883] newsession to 149.154.167.50:443 2018/03/09 16:12:57 [0-8437625223955842069] dial TCP to 149.154.167.50:443 2018/03/09 16:12:59 [0-8437625223955842069] send: start 2018/03/09 16:12:59 [0-8437625223955842069] read: start 2018/03/09 16:12:59 [0-8437625223955842069] send mtproto.TL_invokeWithLayer: {"Layer":71,"Query":{"Api_id":122971,"Device_model":"Unknown","System_version":"windows/amd64","App_version":"0.0.1","System_lang_code":"en","Lang_pack":"","Lang_code":"en","Query":{}}} 2018/03/09 16:12:59 [0-8437625223955842069] read: type: mtproto.TL_msg_container, data: {[{6530855025280302081 1 28 {6530855025062334784 -7428286539121681192 [161 193 79 248 129 50 27 68]}} {6530855025280313345 2 20 {[6530855025062334784]}}]}, err: 2018/03/09 16:12:59 [0-8437625223955842069] send mtproto.TL_msgs_ack: {} 2018/03/09 16:12:59 [0-8437625223955842069] read: type: mtproto.TL_rpc_result, data: {6530855025062334784 {0 1520583179 1520586637 {} 2 [{0 1 149.154.175.50 443} {1 1 2001:0b28:f23d:f001:0000:0000:0000:000a 443} {0 2 149.154.167.51 443} {16 2 149.154.167.51 443} {1 2 2001:067c:04e8:f002:0000:0000:0000:000a 443} {0 3 149.154.175.100 443} {1 3 2001:0b28:f23d:f003:0000:0000:0000:000a 443} {0 4 149.154.167.91 443} {1 4 2001:067c:04e8:f004:0000:0000:0000:000a 443} {2 4 149.154.165.120 443} {0 5 91.108.56.165 443} {1 5 2001:0b28:f23f:f005:0000:0000:0000:000a 443}] 200 100000 100 120000 5000 30000 300000 30000 1500 10 60000 2 200 172800 2419200 30 5 0 5 20000 90000 30000 10000 https://t.me/ 0 []}}, err: 2018/03/09 16:12:59 [0-8437625223955842069] process: unknown data type mtproto.TL_config {{"Flags":0,"Date":1520583179,"Expires":1520586637,"Test_mode":{},"This_dc":2,"Dc_options":[{"Flags":0,"Id":1,"Ip_address":"149.154.175.50","Port":443},{"Flags":1,"Id":1,"Ip_address":"2001:0b28:f23d:f001:0000:0000:0000:000a","Port":443},{"Flags":0,"Id":2,"Ip_address":"149.154.167.51","Port":443},{"Flags":16,"Id":2,"Ip_address":"149.154.167.51","Port":443},{"Flags":1,"Id":2,"Ip_address":"2001:067c:04e8:f002:0000:0000:0000:000a","Port":443},{"Flags":0,"Id":3,"Ip_address":"149.154.175.100","Port":443},{"Flags":1,"Id":3,"Ip_address":"2001:0b28:f23d:f003:0000:0000:0000:000a","Port":443},{"Flags":0,"Id":4,"Ip_address":"149.154.167.91","Port":443},{"Flags":1,"Id":4,"Ip_address":"2001:067c:04e8:f004:0000:0000:0000:000a","Port":443},{"Flags":2,"Id":4,"Ip_address":"149.154.165.120","Port":443},{"Flags":0,"Id":5,"Ip_address":"91.108.56.165","Port":443},{"Flags":1,"Id":5,"Ip_address":"2001:0b28:f23f:f005:0000:0000:0000:000a","Port":443}],"Chat_size_max":200,"Megagroup_size_max":100000,"Forwarded_count_max":100,"Online_update_period_ms":120000,"Offline_blur_timeout_ms":5000,"Offline_idle_timeout_ms":30000,"Online_cloud_timeout_ms":300000,"Notify_cloud_delay_ms":30000,"Notify_default_delay_ms":1500,"Chat_big_size":10,"Push_chat_period_ms":60000,"Push_chat_limit":2,"Saved_gifs_limit":200,"Edit_time_limit":172800,"Rating_e_decay":2419200,"Stickers_recent_limit":30,"Stickers_faved_limit":5,"Tmp_sessions":0,"Pinned_dialogs_count_max":5,"Call_receive_timeout_ms":20000,"Call_ring_timeout_ms":90000,"Call_connect_timeout_ms":30000,"Call_packet_timeout_ms":10000,"Me_url_prefix":"https://t.me/","Suggested_lang_code":"","Lang_pack_version":0,"Disabled_features":[]}} 2018/03/09 16:12:59 [0-8437625223955842069] config: {"Flags":0,"Date":1520583179,"Expires":1520586637,"Test_mode":{},"This_dc":2,"Dc_options":[{"Flags":0,"Id":1,"Ip_address":"149.154.175.50","Port":443},{"Flags":1,"Id":1,"Ip_address":"2001:0b28:f23d:f001:0000:0000:0000:000a","Port":443},{"Flags":0,"Id":2,"Ip_address":"149.154.167.51","Port":443},{"Flags":16,"Id":2,"Ip_address":"149.154.167.51","Port":443},{"Flags":1,"Id":2,"Ip_address":"2001:067c:04e8:f002:0000:0000:0000:000a","Port":443},{"Flags":0,"Id":3,"Ip_address":"149.154.175.100","Port":443},{"Flags":1,"Id":3,"Ip_address":"2001:0b28:f23d:f003:0000:0000:0000:000a","Port":443},{"Flags":0,"Id":4,"Ip_address":"149.154.167.91","Port":443},{"Flags":1,"Id":4,"Ip_address":"2001:067c:04e8:f004:0000:0000:0000:000a","Port":443},{"Flags":2,"Id":4,"Ip_address":"149.154.165.120","Port":443},{"Flags":0,"Id":5,"Ip_address":"91.108.56.165","Port":443},{"Flags":1,"Id":5,"Ip_address":"2001:0b28:f23f:f005:0000:0000:0000:000a","Port":443}],"Chat_size_max":200,"Megagroup_size_max":100000,"Forwarded_count_max":100,"Online_update_period_ms":120000,"Offline_blur_timeout_ms":5000,"Offline_idle_timeout_ms":30000,"Online_cloud_timeout_ms":300000,"Notify_cloud_delay_ms":30000,"Notify_default_delay_ms":1500,"Chat_big_size":10,"Push_chat_period_ms":60000,"Push_chat_limit":2,"Saved_gifs_limit":200,"Edit_time_limit":172800,"Rating_e_decay":2419200,"Stickers_recent_limit":30,"Stickers_faved_limit":5,"Tmp_sessions":0,"Pinned_dialogs_count_max":5,"Call_receive_timeout_ms":20000,"Call_ring_timeout_ms":90000,"Call_connect_timeout_ms":30000,"Call_packet_timeout_ms":10000,"Me_url_prefix":"https://t.me/","Suggested_lang_code":"","Lang_pack_version":0,"Disabled_features":[]} 2018/03/09 16:12:59 [0-8437625223955842069] send mtproto.TL_msgs_ack: {} 2018/03/09 16:13:00 [0-8437625223955842069] send mtproto.TL_updates_getState: {} 2018/03/09 16:13:01 [0-8437625223955842069] read: type: mtproto.TL_rpc_result, data: {6530855029863554880 mtproto RPC error: 401 AUTH_KEY_UNREGISTERED}, err: 2018/03/09 16:13:01 [0-8437625223955842069] process: unknown data type mtproto.TL_rpc_error {{}} 2018/03/09 16:13:01 [MM 591056883] connect failure: TL_updates_getState Failure: mtproto RPC error: 401 AUTH_KEY_UNREGISTERED 2018/03/09 16:13:01 [0-8437625223955842069] send mtproto.TL_msgs_ack: {} 2018/03/09 16:13:01 TL_updates_getState Failure: mtproto RPC error: 401 AUTH_KEY_UNREGISTERED

cjongseok commented 6 years ago

Can you try it after removing $HOME/.telegram_xxx file? And please use the latest version. Old version had an issue

cjongseok commented 6 years ago

It seems this issue is old enough, because there were many changes for past 2+ months to enhance the authentication and session flows. Please feel free to reopen it, if it occurs again.