sochix / TLSharp

Telegram client library implemented in C#
1k stars 380 forks source link

PhoneMigrationException: Phone number registered to a different DC #954

Open Alikberova opened 4 years ago

Alikberova commented 4 years ago

'Telegram server replied requesting a migration to DataCenter 2 when this connection was already using this DataCenter' at TLSharp.Core.TelegramClient.<RequestWithDcMigration>d__13.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at TLSharp.Core.TelegramClient.<SendCodeRequestAsync>d__16.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at TelegramApiProject.Wpf.Client.d3.MoveNext() in C:\Users\user\source\repos\TelegramApiProject\TelegramApiProject.Wpf\Client.cs:line 39 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at TelegramApiProject.Wpf.Pages.AuthorizePage.d2.MoveNext() in C:\Users\user\source\repos\TelegramApiProject\TelegramApiProject.Wpf\Pages\AuthorizePage.xaml.cs:line 25

Inner: Phone number registered to a different DC: 2. See: https://github.com/sochix/TLSharp#i-get-a-xxxmigrationexception-or-a-migrate_x-error at TLSharp.Core.Network.MtProtoSender.HandleRpcResult(UInt64 messageId, Int32 sequence, BinaryReader messageReader, TLMethod request) at TLSharp.Core.Network.MtProtoSender.processMessage(UInt64 messageId, Int32 sequence, BinaryReader messageReader, TLMethod request, CancellationToken token) at TLSharp.Core.Network.MtProtoSender.d8.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at TLSharp.Core.TelegramClient.d13.MoveNext()`

Before this I entered invalid number and get PMPHONE_NUMBER_INVALID