EionRobb / skype4pidgin

Skype Plugin for Pidgin, libpurple and more
https://github.com/EionRobb/skype4pidgin/tree/master/skypeweb#skypeweb-plugin-for-pidgin
624 stars 88 forks source link

Sent messages are not always delivered #615

Open aidaho opened 6 years ago

aidaho commented 6 years ago

Hi.

Recently, I've noticed more and more of my sent messages do not get through. They show up in Pidgin chat log, but do not show up in Skype web client nor they are being synchronized to other Pidgin instances.

I've compiled v1.5, but it has the same problem. Actually, I think it's the skype server where the problem is, since things worked smoothly for months before. Perhaps skypeweb plugin is missing some workaround?

After some back and forth, I've catched following log filtered by 'skype|http' immediately after sending "lost" message:

(12:46:14) http: Performing new request 0x55e91d88e350 to bn2-client-s.gateway.messenger.live.com.
(12:46:14) nss: subject=CN=apis.skype.com issuer=CN=Microsoft IT TLS CA 5,OU=Microsoft IT,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US
(12:46:14) nss: Trusting CN=apis.skype.com
(12:46:14) http: Request 0x55e91d88e350 performed without success.
(12:46:14) skypeweb: No data in response
(12:46:35) http: Request 0x55e91e715640 performed successfully.
(12:46:35) skypeweb: executing callback for https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/endpoints/SELF/subscriptions/0/poll
(12:46:36) http: Performing new request 0x55e91e55b8f0 to bn2-client-s.gateway.messenger.live.com.
(12:46:51) http: Performing new request 0x55e91e551f00 to contacts.skype.com.
(12:46:51) http: Request 0x55e91e551f00 performed successfully.
(12:46:51) skypeweb: executing callback for https://contacts.skype.com/contacts/v2/users/SELF/invites
(12:47:06) http: Request 0x55e91e55b8f0 performed successfully.
(12:47:06) skypeweb: executing callback for https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/endpoints/SELF/subscriptions/0/poll
(12:47:06) blist: Updating buddy status for <redacted> (Skype (HTTP))
(12:47:07) http: Performing new request 0x55e91e553300 to bn2-client-s.gateway.messenger.live.com.
(12:47:07) http: Request 0x55e91e553300 performed successfully.
(12:47:07) skypeweb: executing callback for https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/endpoints/SELF/subscriptions/0/poll
(12:47:07) blist: Updating buddy status for <redacted> (Skype (HTTP))
(12:47:07) blist: Updating buddy status for <redacted> (Skype (HTTP))
(12:47:07) blist: Updating buddy status for <redacted> (Skype (HTTP))
(12:47:07) blist: Updating buddy status for <redacted> (Skype (HTTP))
(12:47:07) blist: Updating buddy status for <redacted> (Skype (HTTP))
EionRobb commented 6 years ago
(12:46:14) http: Request 0x55e91d88e350 performed without success.
(12:46:14) skypeweb: No data in response

Yeah, that's not good. It could be that the server is rejecting the message, but that normally has data in the response, rather than just a blank response. Unfortunately the debug info doesn't say what the error code of the response was, unless it's run from a command prompt/terminal with the --debug flag.

Are you able to run pidgin --debug from a terminal to get more verbose debugging, and try get another log with the headers captured, when a message fails?

aidaho commented 6 years ago
(12:46:14) http: Request 0x55e91d88e350 performed without success.
(12:46:14) skypeweb: No data in response

Yeah, that's not good. It could be that the server is rejecting the message, but that normally has data in the response, rather than just a blank response. Unfortunately the debug info doesn't say what the error code of the response was, unless it's run from a command prompt/terminal with the --debug flag.

Are you able to run pidgin --debug from a terminal to get more verbose debugging, and try get another log with the headers captured, when a message fails?

I'm afraid it doesn't show anything else in console either.

In fact, manpage says:

Print debugging messages to stdout. These are the same debugging messages that are displayed in the Debug Window.

I've tried to proxy http requests to squid and this is what corresponds to lost message in access.log

    1530106656.669    556 127.0.0.1 TAG_NONE/200 0 CONNECT bn2-client-s.gateway.messenger.live.com:443 - HIER_DIRECT/65.52.108.76
    1530106656.831    147 127.0.0.1 TCP_MISS/502 5566 POST https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations8%3A<<contactname>>/messages - HIER_DIRECT/65.52.108.76 text/html

Server responded with HTTP 502

P.S. sorry for the ill-formatted log. Github says email replies don't get Markdown support.

Regards, Sergey.

bodqhrohro commented 6 years ago

I grabbed some logs for this situation. Not sure what exactly applies here, the message was sent at 17:48:11. The link is masked.

pidgin-cropped.log

bodqhrohro commented 6 years ago

Maybe related: right now 3 consequent messages were posted by other buddy in a group. They appeared immediately in official client, but only 8 minutes later in Pidgin. For the time they appeared in official client, I don't see any entries in log related to skypeweb besides of several joinpart: Removing key for %username% entries. However there definitely no buddies were leaving any chats.

EionRobb commented 6 years ago

Are the undelivered messages always urls? I've seen that happening a lot where links from certain domains are blocked by the server (some kind of anti-spam thing?)

aidaho commented 6 years ago

Are the undelivered messages always urls? I've seen that happening a lot where links from certain domains are blocked by the server (some kind of anti-spam thing?)

No, just short ordinary sentences.

If I'm to re-send the same message, it gets through.

deadtrickster commented 6 years ago

not sure if it's the same bug (I'm using bitlbee) but generally about 6 to 10 % messages lost. Easily reproducible if sent really quick, i.e. 50 lines in single-line mode.

EionRobb commented 6 years ago

@deadtrickster can you attach a purple debug log to see if its the same issue, or something different?

deadtrickster commented 6 years ago

Not now but I'll do my best tomorrow. still learning how to debug bitlbee :-)

Rydian commented 6 years ago

I run the Skype program itself alongside Pidgin to handle voice calls, so I can check in the Skype client to see if a message from Pidgin went through.

I've been getting this problem for a while now, and it's not just messages with URLs in them. I've been logging on and off since last night (Pidgin debug log window right?) but of course now that I want to catch it, it's not doing it (it's sporadic). I'll post again once I finally catch it happening.

Rydian commented 6 years ago

Alright finally got a few cases of messages showing up in Skype but not in Pidgin.

http://rydian.net/purple-debug.log

grzegorz-janoszka commented 4 years ago

I have the same - usually with the first message to a given contact. The further messages go through.