gave92 / fbchat-sharp

Facebook Messenger client library for C#
Other
65 stars 19 forks source link

new exception in fbchat_sharp.API.FBchatPleaseRefresh #40

Closed k4r3l01 closed 4 years ago

k4r3l01 commented 4 years ago

hello please i have problem when i try to start app i give this exception Exception thrown: 'fbchat_sharp.API.FBchatPleaseRefresh' in fbchat-sharp.dll Refreshing state and resending request

gave92 commented 4 years ago

Thanks for reporting this. The error may happen if your session has expired. Please try to delete the session cookies file (if you saved it). Then login again with user/pw

k4r3l01 commented 4 years ago

its same after delete fbchat cookies

k4r3l01 commented 4 years ago

and last think i using v1 build

k4r3l01 commented 4 years ago

so today i tried your v2 builůd and its same issue :(

SpencerConstance commented 4 years ago

I have also started to get the same error, and deleting cookies is having no effect. I'm running version 0.3.3 still if that makes any difference. I will try and investigate more later if I have a chance.

gave92 commented 4 years ago

Yup I can confirm this. Facebook changed something, I'll see if I can fix this. Edit: please try again with the latest commit in the master branch

SpencerConstance commented 4 years ago

I am still having issues with this, I get fbchat_sharp.API.FBchatPleaseRefresh multiple times then the following exception:

fbchat_sharp.API.FBchatPleaseRefresh: Error #1357004 when sending request: Please try closing and re-opening your browser window.
at fbchat_sharp.API.Session._post(String url, Dictionary'2 query, Dictionary'2 files, Boolean as_graphql, CancellationToken cancellationToken, Boolean retry) in fbchat-sharp-master\fbchat-sharp\API\Session.cs:line 546
   at fbchat_sharp.API.Session._post(String url, Dictionary'2 query, Dictionary'2 files, Boolean as_graphql, CancellationToken cancellationToken, Boolean retry) in fbchat-sharp-master\fbchat-sharp\API\Session.cs:line 544
   at fbchat_sharp.API.Session.graphql_requests(List'1 queries) in fbchat-sharp-master\fbchat-sharp\API\Session.cs:line 578
   at fbchat_sharp.API.Session.graphql_request(GraphQL query) in fbchat-sharp-master\fbchat-sharp\API\Session.cs:line 587
   at fbchat_sharp.API.Listener._fetch_mqtt_sequence_id() in fbchat-sharp-master\fbchat-sharp\API\Mqtt.cs:line 135
   at fbchat_sharp.API.Listener._messenger_queue_publish() in fbchat-sharp-master\fbchat-sharp\API\Mqtt.cs:line 151
   at fbchat_sharp.API.Listener.<>c__DisplayClass7_0.<<Connect>b__1>d.MoveNext() in fbchat-sharp-master\fbchat-sharp\API\Mqtt.cs:line 85
--- End of stack trace from previous location where exception was thrown ---
   at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
   at fbchat_sharp.API.Listener.Connect(Session session, Func'2 onEvent, Boolean chat_on, Boolean foreground, CancellationToken cancellationToken) in fbchat-sharp-master\fbchat-sharp\API\Mqtt.cs:line 126
   at fbchat_sharp.API.MessengerClient.SafeWrapper[T](Func'1 action, String method) in fbchat-sharp-master\fbchat-sharp\MessengerClient.cs:line 188: StartListening

Any ideas? I've tried the latest develop branch as well as multiple versions of the master branch, including the latest of that. I've also deleted any app-specific cookies and still nothing.

SpencerConstance commented 4 years ago

Sorry just noticed issue #42, but the same issue still stands for me on the current version of the develop branch for some reason. I already ported all my code over to be compatible with V2 to encounter basically the same issue.

When entering my account credentials into the latest version of your WPF app from the develop branch using credentials that work currently to log into messenger, I get this error in the console: "fbchat_sharp.API.FBchatNotLoggedIn: Email or PhonePasswordForgot account?"

I came across that same error in my app once I debugged your library from it. It looks like the new messenger endpoint "https://www.messenger.com/login/password/" we are posting credentials to does some slightly weird things that I haven't had a chance to dig into that deeply, although I did notice a few differences between the WPF app's posts and the regular messenger websites post when inspecting in fiddler, so that might be a place to start.

Thank you for all the work you put into this awesome library!