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

The plugin doesn't automatically reconnect upon network disruption. #143

Closed
fangfufu opened this Issue Sep 21, 2015 · 19 comments

Comments

Projects
None yet
5 participants
@fangfufu

fangfufu commented Sep 21, 2015

I am on 6a0a79182ebc, I am experiencing an issue similar #35 again. I have to manually disable the plugin and re-enable it to reconnect.

@jgeboski

This comment has been minimized.

Show comment
Hide comment
@jgeboski

jgeboski Sep 21, 2015

Collaborator

Is this somehow related to #89?

Collaborator

jgeboski commented Sep 21, 2015

Is this somehow related to #89?

@fangfufu

This comment has been minimized.

Show comment
Hide comment
@fangfufu

fangfufu Sep 21, 2015

No, it is not. The plugin isn't disabled after network disruption.

fangfufu commented Sep 21, 2015

No, it is not. The plugin isn't disabled after network disruption.

@jgeboski

This comment has been minimized.

Show comment
Hide comment
@jgeboski

jgeboski Sep 21, 2015

Collaborator

Then it should be reconnecting after a timeout (between 8 seconds to a minute)?

Collaborator

jgeboski commented Sep 21, 2015

Then it should be reconnecting after a timeout (between 8 seconds to a minute)?

@fangfufu

This comment has been minimized.

Show comment
Hide comment
@fangfufu

fangfufu Sep 21, 2015

It doesn't reconnect even after an hour or so. Pidgin's tray icon shows the disconnected sign. When I open up Pidgin's contact list, the status icon is spinning. My XMPP accounts are already reconnected.

fangfufu commented Sep 21, 2015

It doesn't reconnect even after an hour or so. Pidgin's tray icon shows the disconnected sign. When I open up Pidgin's contact list, the status icon is spinning. My XMPP accounts are already reconnected.

@jgeboski

This comment has been minimized.

Show comment
Hide comment
@jgeboski

jgeboski Sep 21, 2015

Collaborator

What reason does it give for the disconnection?

Collaborator

jgeboski commented Sep 21, 2015

What reason does it give for the disconnection?

@fangfufu

This comment has been minimized.

Show comment
Hide comment
@fangfufu

fangfufu Sep 21, 2015

It doesn't give any reason for disconnection. It seems to have got stuck in some sort of loop of trying to reconnect.

fangfufu commented Sep 21, 2015

It doesn't give any reason for disconnection. It seems to have got stuck in some sort of loop of trying to reconnect.

@jgeboski

This comment has been minimized.

Show comment
Hide comment
@jgeboski

jgeboski Sep 21, 2015

Collaborator

Does the debugging log show anything enlightening?

Collaborator

jgeboski commented Sep 21, 2015

Does the debugging log show anything enlightening?

@fangfufu

This comment has been minimized.

Show comment
Hide comment
@fangfufu

fangfufu Sep 21, 2015

I will get onto it and report back later.

fangfufu commented Sep 21, 2015

I will get onto it and report back later.

@kaberett

This comment has been minimized.

Show comment
Hide comment
@kaberett

kaberett Sep 21, 2015

(This looks like behaviour similar to what I was erroneously tacking on to comments in #89.)

kaberett commented Sep 21, 2015

(This looks like behaviour similar to what I was erroneously tacking on to comments in #89.)

@fangfufu

This comment has been minimized.

Show comment
Hide comment
@fangfufu

fangfufu Sep 21, 2015

@kaberett, I commented on that issue as well, then I realised that it is something different.

fangfufu commented Sep 21, 2015

@kaberett, I commented on that issue as well, then I realised that it is something different.

@fangfufu

This comment has been minimized.

Show comment
Hide comment
@fangfufu

fangfufu Sep 26, 2015

This is what my pidgin looks like after suspension. I have emailed you the debug log separately. I have to either restart pidgin or restart the plugin to reconnect back to Facebook.

pidgin

fangfufu commented Sep 26, 2015

This is what my pidgin looks like after suspension. I have emailed you the debug log separately. I have to either restart pidgin or restart the plugin to reconnect back to Facebook.

pidgin

@fangfufu

This comment has been minimized.

Show comment
Hide comment
@fangfufu

fangfufu Sep 26, 2015

Perhaps purple-facebook never informed Pidgin that it had failed to connect? I don't know.

fangfufu commented Sep 26, 2015

Perhaps purple-facebook never informed Pidgin that it had failed to connect? I don't know.

@jgeboski

This comment has been minimized.

Show comment
Hide comment
@jgeboski

jgeboski Sep 26, 2015

Collaborator

After looking at your log, this is due to libpurple failing to resolve domain names. NetworkManager sends the NM_STATE_ASLEEP (10) as expected, and when the system resumes, NM_STATE_CONNECTED_LOCAL (50). This is where things become problematic, as an external network has yet to be activated. It would be ideal if the plugin could hint at pidgin to wait for NM_STATE_CONNECTED_GLOBAL (70) before reconnecting.

The account does not appear to disconnect with an error. If it did, it would end up reconnecting on its own after a period of time. But my guess is, Pidgin nullifies all errors while the account is in the re-connection phase. And as soon as the plugin hits and error, it bails out, and propagates an error message to the user. I will have to look into this when I get time.

(11:53:08) network: Got StateChange from NetworkManager: 10.
...
(11:53:17) network: Got StateChange from NetworkManager: 50.
...
(11:53:17) dnsquery: Performing DNS lookup for graph.facebook.com
...
(11:53:17) dns: Got response for 'graph.facebook.com'
(11:53:17) dnsquery: Error resolving graph.facebook.com:
Name or service not known
(11:53:17) proxy: Connection attempt failed: Error resolving graph.facebook.com:
Name or service not known
(11:53:17) http: error: Unable to connect to graph.facebook.com: SSL Connection Failed
(11:53:17) http: Cancelling connection 0x7fdfbe520400...
(11:53:17) http: releasing a socket: 0x7fdfbda81500
(11:53:17) socket: invalid state: 3 (should be: 2)
(11:53:17) http: destroying socket: 0x7fdfbda81500
(11:53:17) http: Request 0x7fdfbe520400 performed without success.
...
(11:53:26) network: Got StateChange from NetworkManager: 70.
Collaborator

jgeboski commented Sep 26, 2015

After looking at your log, this is due to libpurple failing to resolve domain names. NetworkManager sends the NM_STATE_ASLEEP (10) as expected, and when the system resumes, NM_STATE_CONNECTED_LOCAL (50). This is where things become problematic, as an external network has yet to be activated. It would be ideal if the plugin could hint at pidgin to wait for NM_STATE_CONNECTED_GLOBAL (70) before reconnecting.

The account does not appear to disconnect with an error. If it did, it would end up reconnecting on its own after a period of time. But my guess is, Pidgin nullifies all errors while the account is in the re-connection phase. And as soon as the plugin hits and error, it bails out, and propagates an error message to the user. I will have to look into this when I get time.

(11:53:08) network: Got StateChange from NetworkManager: 10.
...
(11:53:17) network: Got StateChange from NetworkManager: 50.
...
(11:53:17) dnsquery: Performing DNS lookup for graph.facebook.com
...
(11:53:17) dns: Got response for 'graph.facebook.com'
(11:53:17) dnsquery: Error resolving graph.facebook.com:
Name or service not known
(11:53:17) proxy: Connection attempt failed: Error resolving graph.facebook.com:
Name or service not known
(11:53:17) http: error: Unable to connect to graph.facebook.com: SSL Connection Failed
(11:53:17) http: Cancelling connection 0x7fdfbe520400...
(11:53:17) http: releasing a socket: 0x7fdfbda81500
(11:53:17) socket: invalid state: 3 (should be: 2)
(11:53:17) http: destroying socket: 0x7fdfbda81500
(11:53:17) http: Request 0x7fdfbe520400 performed without success.
...
(11:53:26) network: Got StateChange from NetworkManager: 70.
@fangfufu

This comment has been minimized.

Show comment
Hide comment
@fangfufu

fangfufu Sep 26, 2015

I think this bug was introduced in the recent revision. I didn't have this problem at one point. I wonder if this is related to #89.

fangfufu commented Sep 26, 2015

I think this bug was introduced in the recent revision. I didn't have this problem at one point. I wonder if this is related to #89.

@fangfufu

This comment has been minimized.

Show comment
Hide comment
@fangfufu

fangfufu Oct 23, 2015

Okay, I switched away from Pidgin to KDE Telepathy, which can use libpurple as a backend, it magically fixed the problem. I don't know if this helps anyone. The problem is that conversation are not marked as read automatically any more.

fangfufu commented Oct 23, 2015

Okay, I switched away from Pidgin to KDE Telepathy, which can use libpurple as a backend, it magically fixed the problem. I don't know if this helps anyone. The problem is that conversation are not marked as read automatically any more.

@ZenithDK

This comment has been minimized.

Show comment
Hide comment
@ZenithDK

ZenithDK Oct 23, 2015

I have this problem on Windows - but I'm probably using an old version of the plugin, will try a newer one and test more and if it is still an issue I will get the logs for it.

ZenithDK commented Oct 23, 2015

I have this problem on Windows - but I'm probably using an old version of the plugin, will try a newer one and test more and if it is still an issue I will get the logs for it.

@ZenithDK

This comment has been minimized.

Show comment
Hide comment
@ZenithDK

ZenithDK Nov 18, 2015

facebook-not-reconnecting.txt
I've attached a log I grabbed some time ago - meant to sanitize it but I'm crossing my fingers nothing sensitive is in there. Seems like passwords have already been stripped out.

ZenithDK commented Nov 18, 2015

facebook-not-reconnecting.txt
I've attached a log I grabbed some time ago - meant to sanitize it but I'm crossing my fingers nothing sensitive is in there. Seems like passwords have already been stripped out.

@dequis

This comment has been minimized.

Show comment
Hide comment
@dequis

dequis Nov 18, 2015

Owner

@ZenithDK this log doesn't have anything at all. It's mostly stuff from your unrelated jabber and oscar accounts. Follow the instructions in https://github.com/jgeboski/purple-facebook/wiki/Debugging-Logs - this plugin won't log anything unless you enable UNSAFE/VERBOSE debug and that's way harder to sanitize, so don't post it publicly.

Owner

dequis commented Nov 18, 2015

@ZenithDK this log doesn't have anything at all. It's mostly stuff from your unrelated jabber and oscar accounts. Follow the instructions in https://github.com/jgeboski/purple-facebook/wiki/Debugging-Logs - this plugin won't log anything unless you enable UNSAFE/VERBOSE debug and that's way harder to sanitize, so don't post it publicly.

@jgeboski

This comment has been minimized.

Show comment
Hide comment
@jgeboski

jgeboski Dec 22, 2015

Collaborator

This has been resolved as of 50bb40c and is in the latest release.

Collaborator

jgeboski commented Dec 22, 2015

This has been resolved as of 50bb40c and is in the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment