TLSharp.Core.Network.PhoneMigrationException
Hi, In MakeAuthAsync throw exception
($exception).InnerException {"Phone number registered to a different DC: 4. See: https://github.com/sochix/TLSharp#i-get-a-xxxmigrationexception-or-a-migrate_x-error"} System.Exception {TLSharp.Core.Network.PhoneMigrationException}
($exception).Message "One or more errors occurred." string
($exception).StackTrace " at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n at System.Threading.Tasks.Task.Wait()\r\n at ConsoleApplication1.Program.Main(String[] args) in C:\Users\Admin\Documents\Visual Studio 2015\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 82" string
Did you copy the whole stacktrace? I cannot see what method of TLSharp you were calling
Method i call that trow exception: MakeAuthAsync
TLSharp.Core.Network.MtProtoSender.HandleRpcResult(UInt64 messageId, Int32 sequence, BinaryReader messageReader, TLMethod request)
TLSharp.Core.Network.MtProtoSender.processMessage(UInt64 messageId, Int32 sequence, BinaryReader messageReader, TLMethod request)
TLSharp.Core.Network.MtProtoSender.
Thanks Naser. The bug is in this method: https://github.com/sochix/TLSharp/blob/master/TLSharp.Core/TelegramClient.cs#L157
That method should contain a while loop and a catch block like this other method: https://github.com/sochix/TLSharp/blob/master/TLSharp.Core/TelegramClient.cs#L129
Feel free to send us a Pull Request!
is this bug solved or not ? I have the same issue and i'm stuck. :(
@AmiNadim it's not solved, but I explained above exactly how to solve it, so anyone that has 2 minutes of their time can contribute the fix in a pull request. Do you have 2 minutes to do it?
Fixed in https://github.com/sochix/TLSharp/commit/0d55940c123008013f454c8c5b090884747789ff by AmiNadim.