Postuf / telegram-osint-lib

Telegram scenario-based API aimed at OSINT
https://habr.com/ru/post/486322
MIT License
255 stars 41 forks source link

ERR_MSG_PHONE_MIGRATE #163

Closed kirkins closed 4 years ago

kirkins commented 4 years ago

Getting the following after I enter phone number when running examples/registration in Docker.

Fatal error: Uncaught TelegramOSINT\Exception\TGException: ERR_MSG_PHONE_MIGRATE: phone n2xzIwQuwaUVXybXwzv4nuLAgbXR7q9Yu/mrkzoxC5hAxRrsM33zl2fsTOgh+MB1/1icuMt0pV9NRTM/mP5CrhvxVpjZjleuOEwro3Nabu7FgYajeKHwm9QJlaoV61OWZCUdyWDdYC0MGu+SfFWyvB5bKOVZHFR/qGiQXKgebS+dHULEyYTh76r3fu2ff0ljaPrL7xAbffN68ENyYF45ZhI6ryvEnXLMTai9TuRTg0tfP9szNayh4ZOb2h+sKvvFS/0VCodDTw3vEPCIYdFSg3Ic6/iKZvsCGhZSGRSpDzu3HGGVlVyZmFzKFJC0hSGGm6aRGItDjivWKnDjBu6+2g== already used in another DataCenter in /app/src/TGConnection/SocketMessenger/EncryptedSocketMessenger.php:356
Stack trace:
#0 /app/src/TGConnection/SocketMessenger/EncryptedSocketMessenger.php(299): TelegramOSINT\TGConnection\SocketMessenger\EncryptedSocketMessenger->analyzeRpcError(Object(TelegramOSINT\TLMessage\TLMessage\ServerMessages\Rpc\RpcError))
#1 /app/src/TGConnection/SocketMessenger/EncryptedSocketMessenger.php(147): TelegramOSINT\TGConnection\SocketMessenger\EncryptedSocketMessenger->processServiceMessage(Object(TelegramOSINT\MTSerialization\OwnImplementation\OwnAnonymousMessage))
#2 /ap in /app/src/TGConnection/SocketMessenger/EncryptedSocketMessenger.php on line 356
v
Qusonann commented 4 years ago

Hi! You are right, we currently have datacenter 2 set for registration by default (https://github.com/Postuf/telegram-osint-lib#limitations , https://github.com/Postuf/telegram-osint-lib/blob/master/src/LibConfig.php#L35). That may prevent you from registering a certain subset of numbers. We may implement handling those errors later, currently you can change datacenter id/address to a matching one (try 1, 3, 4, ...). DC list: https://gist.github.com/Qusonann/64da6d82db8355e02b2386b786bf3d36 (you can get those addresses yourself from https://core.telegram.org/method/help.getConfig response).

Qusonann commented 4 years ago

Fixed, please check.

kirkins commented 4 years ago

Thank you! Testing now.