gave92 / fbchat-sharp

Facebook Messenger client library for C#

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

onMessage problem

k4r3l01 opened this issue · comments

Hello please i have problem with onMessage event.
This event stop working after few hours without any error i think its stop listening. and i dont know how to print debug messages :( to console and better to file

Hello, in case you haven't try again with the latest commit fe14554 in the develop branch. It should automatically reconnect in case of client disconnecting. Please let me know

Hello i using this commit and with this commit i have disconnect problem

Thanks for the feedback. Let me know if commit 0a2c806 fixes the issue.

thanks i will try

Hello so it looks like it works

Closing this, feel free to reopen if u have further issues

Hello so now i have similiar problem but in debug log i have this
Vyvolaná výjimka: fbchat_sharp.API.FBchatPleaseRefresh v fbchat-sharp.dll Vyvolaná výjimka: fbchat_sharp.API.FBchatPleaseRefresh v fbchat-sharp.dll Vyvolaná výjimka: fbchat_sharp.API.FBchatPleaseRefresh v System.Private.CoreLib.dll Vyvolaná výjimka: fbchat_sharp.API.FBchatPleaseRefresh v System.Private.CoreLib.dll Vyvolaná výjimka: fbchat_sharp.API.FBchatPleaseRefresh v System.Private.CoreLib.dll Vyvolaná výjimka: fbchat_sharp.API.FBchatPleaseRefresh v System.Private.CoreLib.dll Vyvolaná výjimka: fbchat_sharp.API.FBchatPleaseRefresh v System.Private.CoreLib.dll Vyvolaná výjimka: fbchat_sharp.API.FBchatPleaseRefresh v System.Private.CoreLib.dll Vyvolaná výjimka: fbchat_sharp.API.FBchatPleaseRefresh v System.Private.CoreLib.dll Vyvolaná výjimka: fbchat_sharp.API.FBchatPleaseRefresh v System.Private.CoreLib.dll fbchat_sharp.API.FBchatPleaseRefresh: Error #1357004 when sending request: Zkuste zavřít a opět otevřít okno prohlížeče. at fbchat_sharp.API.State._post(String url, Dictionary2 query, Dictionary2 files, Boolean as_graphql, CancellationToken cancellationToken) in x:\fbchat-dev2\fbchat-sharp\API\State.cs:line 488 at fbchat_sharp.API.State.graphql_requests(List1 queries) in x:\fbchat-dev2\fbchat-sharp\API\State.cs:line 520
at fbchat_sharp.API.Client.graphql_requests(List1 queries) in x:\fbchat-dev2\fbchat-sharp\API\Client.cs:line 126 at fbchat_sharp.API.Client.fetchThreadInfo(List1 thread_ids) in x:\fbchat-dev2\fbchat-sharp\API\Client.cs:line 828
at fbchat_sharp.API.Client.fetchUserInfo(List1 user_ids) in x:\fbchat-dev2\fbchat-sharp\API\Client.cs:line 716 at examples.FBClient_Cookies.onMessage(String mid, String author_id, String message, FB_Message message_object, String thread_id, Nullable1 thread_type, Int64 ts, JToken metadata, JToken msg) in x:\fbchat-dev2\examples\netcore\FBClient_Cookies.cs:line 34
at fbchat_sharp.API.Client._parseDelta(JToken m) in x:\fbchat-dev2\fbchat-sharp\API\Client.cs:line 3357
at fbchat_sharp.API.Client._parse_mqtt(String event_type, JToken event_data) in x:\fbchat-dev2\fbchat-sharp\API\Client.cs:line 3755
at fbchat_sharp.API.Client._try_parse_mqtt(String event_type, JToken event_data) in x:\fbchat-dev2\fbchat-sharp\API\Client.cs:line 3715`

Hello commit 7b375c7 should help with that.
Please not that some methods (e.g. TryLogin() and DoLogin()) have changes slightly. You can check the examples for the necessary modifications.

thanks its seems to working now correctly for now running 28 hours without problems