wiz0u / WTelegramClient

Telegram Client API (MTProto) library written 100% in C# and .NET
https://wiz0u.github.io/WTelegramClient/
MIT License
956 stars 156 forks source link

Object of type 'TL.PeerChannel' cannot be converted to type 'TL.MessageFwdHeader'. #253

Closed BlueSky-Sea closed 4 months ago

BlueSky-Sea commented 4 months ago

When I try to update WTelegramClient to the latest version, my program logs often display Cannot find type for ctor # 663841ef or Object of type 'TL. PeerChannel' cannot converted to type TL Error in Message FwdHeader. PeerChannel 'cannot be converted to TL type. Is my update incorrect, causing the problem? I'm confused about this, I really appreciate your work, brother. Can you help me answer this question?😭

  1. Object of type 'TL.MessageReplyHeader' cannot be converted to type 'TL.MessageFwdHeader'. StackTrace: at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast) at System.Reflection.RtFieldInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture) at TL.Serialization.ReadTLObject(BinaryReader reader, UInt32 ctorNb) at TL.Serialization.ReadTLValue(BinaryReader reader, Type type) at TL.Serialization.ReadTLObject(BinaryReader reader, UInt32 ctorNb) at TL.Serialization.ReadTLValue(BinaryReader reader, Type type) at TL.Serialization.ReadTLVector(BinaryReader reader, Type type) at TL.Serialization.ReadTLValue(BinaryReader reader, Type type) at TL.Serialization.ReadTLObject(BinaryReader reader, UInt32 ctorNb) at WTelegram.Client.ReadFrame(Byte[] data, Int32 dataLen) at WTelegram.Client.Reactor(Stream stream, CancellationTokenSource cts) at WTelegram.Client.Reactor(Stream stream, CancellationTokenSource cts) at WTelegram.Client.Invoke[T](IMethod`1 query)

2.Cannot find type for ctor #663841e8 at TL.Serialization.ReadTLObject(BinaryReader reader, UInt32 ctorNb) at TL.Serialization.ReadTLValue(BinaryReader reader, Type type) at TL.Serialization.ReadTLObject(BinaryReader reader, UInt32 ctorNb) at TL.Serialization.ReadTLValue(BinaryReader reader, Type type) at TL.Serialization.ReadTLObject(BinaryReader reader, UInt32 ctorNb) at TL.Serialization.ReadTLValue(BinaryReader reader, Type type) at TL.Serialization.ReadTLVector(BinaryReader reader, Type type) at TL.Serialization.ReadTLValue(BinaryReader reader, Type type) at TL.Serialization.ReadTLObject(BinaryReader reader, UInt32 ctorNb) at TL.Serialization.ReadTLObject(BinaryReader reader, UInt32 ctorNb) at WTelegram.Client.ReadFrame(Byte[] data, Int32 dataLen) at WTelegram.Client.Reactor(Stream stream, CancellationTokenSource cts) 1714963877964

BlueSky-Sea commented 4 months ago

The current problem always occurs after a period of program execution, which may be an hour or two to three days later

wiz0u commented 4 months ago

Please post a full log. See also pinned issue: https://github.com/wiz0u/WTelegramClient/issues/191

BlueSky-Sea commented 4 months ago

The problem has been resolved at the moment. Thank you for your answer