-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LanguageExt incompatible to iOS #64
Comments
I have become a fan of Telega and would be very happy for a solution... |
Issue opened in LanguageExt: louthy/language-ext#887 |
Hello. The easy way is to use fixed LanguageExt version. However Telega moves away from LanguageExt because it adds too much complexity for basic things. See this comment and the roadmap. You can try simplified version |
The above error occured in 0.5.0-preview001. However, I could not track down the link to LanguageExt in this repo. Perhaps a faulty nuget package? LanguageExt is listed as a dependency in the 0.5.0-preview001 package... |
Using LanguageExt v3.5.30-beta resolves the issue. |
Looks like a staled package. I've pushed |
Using Telega in a Xamarin.iOS project produces following exception when calling TelegramClient.Connect():
Telega internal exception. Unhandled exception. See an inner exception.
at Telega.TaskWrapper.Wrap[T] (System.Func`1[TResult] wrapper)
at Telega.Connect.TgBellhop.Connect (Microsoft.Extensions.Logging.ILogger logger, Telega.Connect.ConnectInfo connectInfo, Telega.CallMiddleware.TgCallMiddlewareChain callMiddlewareChain, Telega.Connect.TcpClientConnectionHandler connHandler)
at Telega.Client.TelegramClient.Connect (Telega.Connect.ConnectInfo connectInfo, Telega.ISessionStore store, Telega.CallMiddleware.TgCallMiddlewareChain callMiddlewareChain, Telega.Connect.TcpClientConnectionHandler tcpClientConnectionHandler, Microsoft.Extensions.Logging.ILogger logger)
at Telega.Client.TelegramClient.Connect (System.Int32 apiId, Telega.ISessionStore store, System.Net.IPEndPoint endpoint, Telega.CallMiddleware.TgCallMiddlewareChain callMiddlewareChain, Telega.Connect.TcpClientConnectionHandler tcpClientConnectionHandler)
Inner exception:
{System.PlatformNotSupportedException} The type initializer for 'LanguageExt.Range
3' threw an exception. at LanguageExt.Prelude.Range (System.Int32 from, System.Int32 count, System.Int32 step) at Telega.Rpc.TgSystemMessageHandler.ReadContainer (System.IO.BinaryReader br) at Telega.Rpc.TgSystemMessageHandler+<>c__DisplayClass15_0.<Handle>b__0 (Telega.Rpc.TgSystemMessageHandler+Message message) at (wrapper delegate-invoke) System.Func
2[Telega.Rpc.TgSystemMessageHandler+Message,LanguageExt.Unit].invoke_TResult_T(Telega.Rpc.TgSystemMessageHandler/Message)at LanguageExt.CondExt.Apply[A,B] (A a, System.Func
2[T,TResult] f) at Telega.Rpc.TgTransport.ReceiveLoopImpl (Microsoft.Extensions.Logging.ILogger logger) at Telega.Rpc.TgTransport.ReceiveLoop (Microsoft.Extensions.Logging.ILogger logger) at Telega.Rpc.TgTransport+<>c__DisplayClass19_0
1[T].g__CheckReceiveLoop|0 ()at Telega.Rpc.TgTransport+<>c__DisplayClass19_1
1[T].<Call>g__AwaitResult|1 () at Telega.CallMiddleware.FloodMiddleware+<>c__DisplayClass1_1
1[T].g__ReceiveWrapper|1 ()at Telega.CallMiddleware.TgCustomizedTransport.Call[T] (Telega.Rpc.Dto.ITgFunc
1[TRes] func) at Telega.Connect.TgConnectionEstablisher.EstablishConnection (Microsoft.Extensions.Logging.ILogger logger, Telega.Connect.ConnectInfo connectInfo, Telega.CallMiddleware.TgCallMiddlewareChain callMiddlewareChain, Telega.Connect.TcpClientConnectionHandler connHandler) at Telega.TaskWrapper.Wrap[T] (System.Func
1[TResult] wrapper)This is due to the use of System.Reflection.Emit in LanguageExt (which is not supported on iOS: https://docs.microsoft.com/en-us/xamarin/ios/internals/limitations).
The text was updated successfully, but these errors were encountered: