doLogin() throws System.TypeLoadException
apepenkov opened this issue · comments
Client client = new Client();
await client.doLogin(login, password);
throws error
Could not load "AngleSharp.Parser.Html.HtmlParser" from "AngleSharp, Version=0.13.0.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea".
StackTrace: in fbchat_sharp.API.Client.<_login>d__41.MoveNext()
in System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
in fbchat_sharp.API.Client._login()
in fbchat_sharp.API.Client.<doLogin>d__46.MoveNext()
---
in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
in System.Runtime.CompilerServices.TaskAwaiter.GetResult()
in socialPost.MainWindow.<DoFacebookMessendgerAsync>d__91.MoveNext()
Data: System.Collections.ListDictionaryInternal, Source: fbchat-sharp
in fbchat (python) same loggining info passes fine
try using client.DoLogin() not client.doLogin()
I am using AngleSharp 0.13 and FbChat itself 0.2.8
looks like i have to use MessengerClient instead of Client?
this version of FbChat is old use the dev version with AngleSharp 0.9.11, Microsoft.NETCore.Portable.Compatibility 1.0.1, NETStandard.Library 1.6.1, Newtonsoft.Json 11.0.2 and System.ComponentModel.Annotations 4.5.0
fbchat-dev.zip
I don't have rights (access) to update the lib on Nuget
Allright, thx
forgot to re-open, comment above is problem
what's the client type?
change the AngleSharp
version in the *.csproj
and project.json
fbchat_sharp.API.Client
what's your platform?
Windows 10
I mean UWP/WinForms/WPF/Windows Phone/.Net Core/.Net Standard?
WPF
So the error is
The value cannot be undefined
parameter content
StackTrace: in System.Net.Http.StreamContent..ctor(Stream content, Int32 bufferSize)
in fbchat_sharp.API.State.<_postFile>d__25`1.MoveNext()
my sending message code:
string msg_uid;
FB_Message message = new FB_Message(text: postBody);
msg_uid = await client.send(message, user);
FBClient client = new FBClient();
var logged_in = await client.DoLogin(email, password);
// Check login was successful
if (logged_in)
{
}
public class FBClient : MessengerClient
{
protected override async Task DeleteCookiesAsync()
{
await Task.Yield();
}
protected override async Task<Dictionary<string, List<Cookie>>> ReadCookiesFromDiskAsync()
{
await Task.Yield();
return null;
}
protected override async Task WriteCookiesToDiskAsync(Dictionary<string, List<Cookie>> cookieJar)
{
await Task.Yield();
}
}
Works, Thanks for patience