Author Topic: Steam protocol  (Read 378137 times)

0 Members and 9 Guests are viewing this topic.

Offline Vulpix

Re: Steam protocol
« Reply #315 on: 12 11 2015, 16:27:29 »
@robyer/unsane I was trying some other stuff and I tried pidgin (the plugin for steam uses this: https://github.com/eionrobb/pidgin-opensteamworks ). It stayed connected all day without disconnecting.

I was watching conntrack on my router and I noticed one thing - where Miranda has a single "main" thread in which it polls, pidgin always closes the old one and opens a new one when the 30sec timeout period expires.

I.e. there is a single connection for miranda that's always open (ESTABLISHED) and all that happens to it is the timeout timer is reset when miranda polls the steam webapi. Whereas the one I linked above always closes the previous connection when the polling period (30sec) expires and opens a brand new one.

I'm going to test it for longer to make sure it wasn't a fluke, but where miranda disconnects within an hour, 100% of the time, pidgin has remained connected all day today.
 

Offline Robyer

Re: Steam protocol
« Reply #316 on: 13 11 2015, 05:13:02 »
Vulpix, hi, you can't compare with that plugin - AFAIK it is using "hacked" steam client, it's not web based. So, web based steam could be "crashing" more often than the native client. But it shouldn't be related to whether we keep persistent connection or (less efficiently) create new connection again at every request).

I forgot to reply to your last message - your last log is different from the previous one I was talking about in my reply. I can perhaps solve issue from the last one by trying to reconnect whole steam (as it is saying that you're not logged anymore).
« Last Edit: 13 11 2015, 05:17:18 by Robyer »
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.
 

Offline Vulpix

Re: Steam protocol
« Reply #317 on: 13 11 2015, 06:35:53 »
Vulpix, hi, you can't compare with that plugin - AFAIK it is using "hacked" steam client, it's not web based. So, web based steam could be "crashing" more often than the native client. But it shouldn't be related to whether we keep persistent connection or (less efficiently) create new connection again at every request).

@Robyer, I actually made sure not to post something like that if it was incomparable, but you are wrong (I assume you haven't checked the link? :P)

The plugin uses the same api that our plugin does.

Quote:

Quote
As of version 1.0 the (new) plugin will connect to Steam without Steam running via the Steam mobile API and thus works on Linux and OSX.

for example a part of the poll method:

Quote
steam_poll(SteamAccount *sa, gboolean secure, guint message)
{
   GString *post = g_string_new(NULL);
   SteamMethod method = STEAM_METHOD_POST;
   const gchar *url = "/ISteamWebUserPresenceOAuth/PollStatus/v0001";
   
   if (secure == TRUE || purple_account_get_bool(sa->account, "always_use_https", FALSE))

You can clearly see it uses the web api :p

It didn't DC all day whereas miranda went down 11 times.
 

Offline Robyer

Re: Steam protocol
« Reply #318 on: 13 11 2015, 22:45:44 »
Vulpix, oops, you're right, I guessed just by opensteamworks in URL :-)

Ok, then would be interesting to compare how our request is different from theirs (except the not-persistent connection)... I hope they are just reconnecting and it's not something magic somewhere inside :-)
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.
 

Offline Vulpix

Re: Steam protocol
« Reply #319 on: 14 11 2015, 09:53:59 »
It would  certainly be awesome if you could go over it and check it ! :D It really doesn't disconnect. I'm using pidgin for steam atm instead of miranda. Oh, and a bonus - they also have offline message retrieval~
 

Offline Smiling Spectre

  • Jr. Member
  • **
  • Posts: 66
  • Country: 00
Re: Steam protocol
« Reply #320 on: 16 11 2015, 06:12:47 »
Hello, Robyer.

Today for some reason Steam decided to forget my Steam credentials for Miranda plugin (it worked yesterday!)

Oh, and I got "Steam guard" window. That doesn't work. After receiving confirmation e-mail I enter code, and after that Steam goes offline. And ask for code in the next attempt. New code.

It worked for me before, long ago, in developer version. But not now, obviously. Can you try to fix it, please?

Oh, and I tried developer version too. It doesn't even give me the Steam Guard window now. *sigh*
 

Offline Robyer

Re: Steam protocol
« Reply #321 on: 24 11 2015, 18:15:28 »
Smiling Spectre, I just tested it and it works correctly in development version (32 bit) - it shows guard window and when typing code from e-mail it correctly connects me. In stable it indeed will be broken so I recommend switching to development.
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.
 

Offline Smiling Spectre

  • Jr. Member
  • **
  • Posts: 66
  • Country: 00
Re: Steam protocol
« Reply #322 on: 26 11 2015, 11:10:48 »
It seems, there was some strange profile settings in my developer-based profile, because it didn't work even after full reinstall everything except profile itself. Clean install worked.

Thank you! :)

Can I ask why it doesn't work in stable release? Will it work after next Miranda version will go stable?
 

Offline Robyer

Re: Steam protocol
« Reply #323 on: 26 11 2015, 11:42:08 »
Smiling Spectre, it would be enough to just delete and create new Steam account in Miranda. No need for whole clean profile.

And yes, it will work in next stable. Problem is that actual stable is old. And there were changes on Steam server, which were fixed only in development builds. And these changes wasn't backported to actual stable.
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.
 

Offline Smiling Spectre

  • Jr. Member
  • **
  • Posts: 66
  • Country: 00
Re: Steam protocol
« Reply #324 on: 26 11 2015, 22:56:57 »
Ah, got it. Thank you again for the explanations! :) (I hope for a new stable release now... :)
 

Offline Vulpix

Re: Steam protocol
« Reply #325 on: 27 11 2015, 11:14:32 »
Hello Robyer!

The fix you put in indeed worked, I'm no longer getting blocked by steam servers.

Instead, I'm getting disconnected only about once a day, usually at night (i.e. when I wake up and check miranda, I'm logged out).

The error is something completely different. Unlike before when I'm literally blocked from the site, here the connection just suddenly says that it had timed out and that I'm not logged on.

Here's the log (only a part of it, nothing suspicious in the previous sections):

Code: [Select]
[02:41:16 085C] [STEAM_1] (0E92B1E8:6620) Data received
HTTP/1.1 200 OK
[02:41:16 085C] [STEAM_1] (0E92B1E8:6620) Data received
date: Fri, 27 Nov 2015 01:41:03 GMT
expires: Fri, 27 Nov 2015 01:41:03 GMT
content-type: application/json; charset=UTF-8
content-length: 56

[02:41:16 085C] [STEAM_1] (0E92B1E8:6620) Data received
{
        "pollid": 0,
        "sectimeout": 30,
        "error": "Timeout"
}
[02:41:16 085C] [STEAM_1] (0E92B1E8:6620) Connection closed internal
[02:41:16 085C] [STEAM_1] (0E92B1E8:4294967295) Connection closed
[02:41:16 085C] [STEAM_1] Send request to https://api.steampowered.com/ISteamWebUserPresenceOAuth/Poll/v0001
[02:41:16 085C] [STEAM_1] Connection request to api.steampowered.com:443 (Flags 11)....
[02:41:16 085C] [STEAM_1] (0E92AFA8) Connecting to server api.steampowered.com:443....
[02:41:16 085C] [STEAM_1] (0E92AFA8) Connecting to ip 208.64.202.85:443 ....
[02:41:17 085C] [STEAM_1] (6812) Connected to api.steampowered.com:443
[02:41:17 085C] [STEAM_1] (6812 api.steampowered.com) Starting SSL negotiation
[02:41:17 085C] [STEAM_1] (6812 api.steampowered.com) SSL negotiation successful
[02:41:47 085C] [STEAM_1] (0E92AFA8:6812) Data received
HTTP/1.1 200 OK
[02:41:47 085C] [STEAM_1] (0E92AFA8:6812) Data received
Date: Fri, 27 Nov 2015 01:41:33 GMT
expires: Fri, 27 Nov 2015 01:41:33 GMT
Content-Type: application/json; charset=UTF-8
content-length: 56

[02:41:47 085C] [STEAM_1] (0E92AFA8:6812) Data received
{
        "pollid": 0,
        "sectimeout": 30,
        "error": "Timeout"
}
[02:41:47 085C] [STEAM_1] (0E92AFA8:6812) Connection closed internal
[02:41:47 085C] [STEAM_1] (0E92AFA8:4294967295) Connection closed
[02:41:47 085C] [STEAM_1] Send request to https://api.steampowered.com/ISteamWebUserPresenceOAuth/Poll/v0001
[02:41:47 085C] [STEAM_1] Connection request to api.steampowered.com:443 (Flags 11)....
[02:41:47 085C] [STEAM_1] (0E92B428) Connecting to server api.steampowered.com:443....
[02:41:47 085C] [STEAM_1] (0E92B428) Connecting to ip 208.64.202.85:443 ....
[02:41:47 085C] [STEAM_1] (6416) Connected to api.steampowered.com:443
[02:41:47 085C] [STEAM_1] (6416 api.steampowered.com) Starting SSL negotiation
[02:41:47 085C] [STEAM_1] (6416 api.steampowered.com) SSL negotiation successful
[02:42:06 085C] [STEAM_1] (0E92B428:6416) Data received
HTTP/1.1 200 OK
[02:42:06 085C] [STEAM_1] (0E92B428:6416) Data received
Date: Fri, 27 Nov 2015 01:41:52 GMT
expires: Fri, 27 Nov 2015 01:41:52 GMT
Content-Type: application/json; charset=UTF-8
content-length: 394

[02:42:06 085C] [STEAM_1] (0E92B428:6416) Data received
{
        "pollid": 0,
        "messages": [
                {
                       <censored>
                }
        ]
        ,
        "messagelast": 1155,
        "timestamp": 177634636,
        "utc_timestamp": 1448588512,
        "messagebase": 1154,
        "sectimeout": 18,
        "error": "OK"
}
[02:42:06 085C] [STEAM_1] (0E92B428:6416) Connection closed internal
[02:42:06 085C] [STEAM_1] (0E92B428:4294967295) Connection closed
[02:42:06 21C8] [STEAM_1] Send request to https://api.steampowered.com/ISteamUserOAuth/GetUserSummaries/v0001?access_token=<censored>&steamids=<censored>
[02:42:06 085C] [STEAM_1] Send request to https://api.steampowered.com/ISteamWebUserPresenceOAuth/Poll/v0001
[02:42:06 21C8] [STEAM_1] Connection request to api.steampowered.com:443 (Flags 11)....
[02:42:06 085C] [STEAM_1] Connection request to api.steampowered.com:443 (Flags 11)....
[02:42:06 085C] [STEAM_1] (0E92B068) Connecting to server api.steampowered.com:443....
[02:42:06 21C8] [STEAM_1] (132576A0) Connecting to server api.steampowered.com:443....
[02:42:06 21C8] [STEAM_1] (132576A0) Connecting to ip 208.64.202.85:443 ....
[02:42:06 085C] [STEAM_1] (0E92B068) Connecting to ip 208.64.202.85:443 ....
[02:42:06 21C8] [STEAM_1] (2312) Connected to api.steampowered.com:443
[02:42:06 21C8] [STEAM_1] (2312 api.steampowered.com) Starting SSL negotiation
[02:42:06 085C] [STEAM_1] (6528) Connected to api.steampowered.com:443
[02:42:06 085C] [STEAM_1] (6528 api.steampowered.com) Starting SSL negotiation
[02:42:06 21C8] [STEAM_1] (2312 api.steampowered.com) SSL negotiation successful
[02:42:06 085C] [STEAM_1] (6528 api.steampowered.com) SSL negotiation successful
[02:42:06 21C8] [STEAM_1] (132576A0:2312) Data received
HTTP/1.1 200 OK
[02:42:06 21C8] [STEAM_1] (132576A0:2312) Data received
date: Fri, 27 Nov 2015 01:41:53 GMT
expires: Fri, 27 Nov 2015 01:41:53 GMT
content-type: application/json; charset=UTF-8
content-length: 822

[02:42:06 21C8] [STEAM_1] (132576A0:2312) Data received
{
        "players": [
                {
                        <censored>
                }
        ]

}
[02:42:06 21C8] [STEAM_1] (132576A0:2312) Connection closed internal
[02:42:06 21C8] [STEAM_1] (132576A0:4294967295) Connection closed
[02:42:23 085C] [STEAM_1] (0E92B068:6528) Data received
HTTP/1.1 200 OK
[02:42:23 085C] [STEAM_1] (0E92B068:6528) Data received
date: Fri, 27 Nov 2015 01:42:09 GMT
expires: Fri, 27 Nov 2015 01:42:09 GMT
content-type: application/json; charset=UTF-8
content-length: 387

[02:42:23 085C] [STEAM_1] (0E92B068:6528) Data received
{
        "pollid": 0,
        "messages": [
                {
                        <censored>
                }
        ]
        ,
        "messagelast": 1156,
        "timestamp": 177651749,
        "utc_timestamp": 1448588529,
        "messagebase": 1155,
        "sectimeout": 17,
        "error": "OK"
}
[02:42:23 085C] [STEAM_1] (0E92B068:6528) Connection closed internal
[02:42:23 085C] [STEAM_1] (0E92B068:4294967295) Connection closed
[02:42:23 21C8] [STEAM_1] Send request to https://api.steampowered.com/ISteamUserOAuth/GetUserSummaries/v0001?access_token=<censored>&steamids=<censored>
[02:42:23 21C8] [STEAM_1] Connection request to api.steampowered.com:443 (Flags 11)....
[02:42:23 085C] [STEAM_1] Send request to https://api.steampowered.com/ISteamWebUserPresenceOAuth/Poll/v0001
[02:42:23 085C] [STEAM_1] Connection request to api.steampowered.com:443 (Flags 11)....
[02:42:23 21C8] [STEAM_1] (132573A0) Connecting to server api.steampowered.com:443....
[02:42:23 085C] [STEAM_1] (0E92B1E8) Connecting to server api.steampowered.com:443....
[02:42:23 21C8] [STEAM_1] (132573A0) Connecting to ip 208.64.202.85:443 ....
[02:42:23 085C] [STEAM_1] (0E92B1E8) Connecting to ip 208.64.202.85:443 ....
[02:42:23 085C] [STEAM_1] (6300) Connected to api.steampowered.com:443
[02:42:23 085C] [STEAM_1] (6300 api.steampowered.com) Starting SSL negotiation
[02:42:23 21C8] [STEAM_1] (5872) Connected to api.steampowered.com:443
[02:42:23 21C8] [STEAM_1] (5872 api.steampowered.com) Starting SSL negotiation
[02:42:23 085C] [STEAM_1] (6300 api.steampowered.com) SSL negotiation successful
[02:42:23 21C8] [STEAM_1] (5872 api.steampowered.com) SSL negotiation successful
[02:42:24 21C8] [STEAM_1] (132573A0:5872) Data received
HTTP/1.1 200 OK
[02:42:24 21C8] [STEAM_1] (132573A0:5872) Data received
Date: Fri, 27 Nov 2015 01:42:10 GMT
expires: Fri, 27 Nov 2015 01:42:10 GMT
Content-Type: application/json; charset=UTF-8
content-length: 860

[02:42:24 21C8] [STEAM_1] (132573A0:5872) Data received
{
        "players": [
                {
                        <censored>
                }
        ]

}
[02:42:24 21C8] [STEAM_1] (132573A0:5872) Connection closed internal
[02:42:24 21C8] [STEAM_1] (132573A0:4294967295) Connection closed
[02:42:44 085C] [STEAM_1] (0E92B1E8:6300) Data received
HTTP/1.1 200 OK
[02:43:58 085C] [STEAM_1] (0E92B1E8:6300) Data received
Date: Fri, 27 Nov 2015 01:42:30 GMT
expires: Fri, 27 Nov 2015 01:42:30 GMT
Content-Type: application/json; charset=UTF-8
content-length: 394

[02:43:58 085C] [STEAM_1] (0E92B1E8:6300) Data received
{
        "pollid": 0,
        "messages": [
                {
                        <censored>
                }
        ]
        ,
        "messagelast": 1157,
        "timestamp": 177672794,
        "utc_timestamp": 1448588550,
        "messagebase": 1156,
        "sectimeout": 21,
        "error": "OK"
}
[02:43:58 085C] [STEAM_1] (0E92B1E8:6300) Connection closed internal
[02:43:58 085C] [STEAM_1] (0E92B1E8:4294967295) Connection closed
[02:43:58 21C8] [STEAM_1] Send request to https://api.steampowered.com/ISteamUserOAuth/GetUserSummaries/v0001?access_token=<censored>&steamids=<censored>
[02:43:58 085C] [STEAM_1] Send request to https://api.steampowered.com/ISteamWebUserPresenceOAuth/Poll/v0001
[02:43:58 085C] [STEAM_1] Connection request to api.steampowered.com:443 (Flags 11)....
[02:43:58 21C8] [STEAM_1] Connection request to api.steampowered.com:443 (Flags 11)....
[02:43:58 085C] [STEAM_1] (0E92B128) Connecting to server api.steampowered.com:443....
[02:43:58 21C8] [STEAM_1] (132575E0) Connecting to server api.steampowered.com:443....
[02:43:58 085C] [STEAM_1] (0E92B128) Connecting to ip 208.64.202.85:443 ....
[02:43:58 21C8] [STEAM_1] (132575E0) Connecting to ip 208.64.202.85:443 ....
[02:43:58 085C] [STEAM_1] (6964) Connected to api.steampowered.com:443
[02:43:58 085C] [STEAM_1] (6964 api.steampowered.com) Starting SSL negotiation
[02:43:58 21C8] [STEAM_1] (3824) Connected to api.steampowered.com:443
[02:43:58 21C8] [STEAM_1] (3824 api.steampowered.com) Starting SSL negotiation
[02:43:58 085C] [STEAM_1] (6964 api.steampowered.com) SSL negotiation successful
[02:43:58 21C8] [STEAM_1] (3824 api.steampowered.com) SSL negotiation successful
[02:43:59 085C] [STEAM_1] (0E92B128:6964) Data received
HTTP/1.1 200 OK
[02:43:59 085C] [STEAM_1] (0E92B128:6964) Data received
Date: Fri, 27 Nov 2015 01:43:45 GMT
expires: Fri, 27 Nov 2015 01:43:45 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 61

[02:43:59 085C] [STEAM_1] (0E92B128:6964) Data received
{
        "pollid": 0,
        "sectimeout": 1,
        "error": "Not Logged On"
}
[02:43:59 085C] [STEAM_1] (0E92B128:6964) Connection closed internal
[02:43:59 085C] [STEAM_1] (0E92B128:4294967295) Connection closed
[02:43:59 085C] [STEAM_1] CSteamProto::PollingThread: Not Logged On (200)
[02:43:59 085C] [STEAM_1] CSteamProto::PollingThread: Timeout is too low (1)
[02:43:59 085C] [STEAM_1] CSteamProto::PollingThread: leaving
[02:43:59 085C] [STEAM_1] CSteamProto::PollingThread: unexpected termination; switching protocol to offline
[02:43:59 085C] [STEAM_1] CSteamProto::SetStatus: changing status from 40073 to 40071
[02:43:59 05A8] [STEAM_1] Send request to https://api.steampowered.com/ISteamWebUserPresenceOAuth/Logoff/v0001
[02:43:59 05A8] [STEAM_1] Connection request to api.steampowered.com:443 (Flags 11)....
[02:43:59 05A8] [STEAM_1] (13200B40) Connecting to server api.steampowered.com:443....
[02:43:59 05A8] [STEAM_1] (13200B40) Connecting to ip 208.64.202.85:443 ....
[02:43:59 21C8] [STEAM_1] (132575E0:3824) Data received
HTTP/1.1 200 OK
[02:43:59 21C8] [STEAM_1] (132575E0:3824) Data received
Date: Fri, 27 Nov 2015 01:43:45 GMT
expires: Fri, 27 Nov 2015 01:43:45 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 822

[02:43:59 21C8] [STEAM_1] (132575E0:3824) Data received
{
        "players": [
                {
                        <censored>
                }
        ]

}
[02:43:59 21C8] [STEAM_1] (132575E0:3824) Connection closed internal
[02:43:59 21C8] [STEAM_1] (132575E0:4294967295) Connection closed
[02:43:59 05A8] [STEAM_1] (6652) Connected to api.steampowered.com:443
[02:43:59 05A8] [STEAM_1] (6652 api.steampowered.com) Starting SSL negotiation
[02:43:59 05A8] [STEAM_1] (6652 api.steampowered.com) SSL negotiation successful
[02:44:00 05A8] [STEAM_1] (13200B40:6652) Data received
HTTP/1.1 200 OK
[02:44:00 05A8] [STEAM_1] (13200B40:6652) Data received
Date: Fri, 27 Nov 2015 01:43:46 GMT
expires: Fri, 27 Nov 2015 01:43:46 GMT
Content-Type: application/json; charset=UTF-8
content-length: 29

[02:44:00 05A8] [STEAM_1] (13200B40:6652) Data received
{
        "error": "Not Logged On"
}
[02:44:00 05A8] [STEAM_1] (13200B40:6652) Connection closed internal
[02:44:00 05A8] [STEAM_1] (13200B40:4294967295) Connection closed

It feels as though there are two threads checking something at the same time, which causes an issue with the timeout or I dunno :o but it's a completely different problem, because I can actually "talk" to the server when this happens. I just get a bad reply.
 

Offline Der Jude

  • Newbie
  • *
  • Posts: 29
Re: Steam protocol
« Reply #326 on: 01 12 2015, 08:24:48 »
This is really pissing off, after token expiration a steamguard window in miranda does pop up, however more times than not writting/copypasting the code does jackshit, the plugin fails and treats them as invalid codes and in turn gets my inbox spammed to death. Also cancel/killwindow button doesn't work as intended.

 

Offline Robyer

Re: Steam protocol
« Reply #327 on: 01 12 2015, 10:12:15 »
Der Jude, make sure you're using development version (of whole Miranda!). In stable it is unfortunately broken...
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.
 

Offline Der Jude

  • Newbie
  • *
  • Posts: 29
Re: Steam protocol
« Reply #328 on: 03 12 2015, 17:03:20 »
Robyer I am always on the dev build channel

Code: [Select]
Miranda NG Version: 0.95.5 alpha build #15796
Build time: 1 Dec 2015 8:58:40
Steam.dll v.0.11.4.2 [24 Nov 2015 16:03:56] - Steam protocol

The plugin's steamguard authentication does bug after running miranda for a long time, if it asks for it right after starting miranda then it does work as intended.
« Last Edit: 03 12 2015, 17:06:29 by Der Jude »
 

Offline Robyer

Re: Steam protocol
« Reply #329 on: 03 12 2015, 19:28:19 »
Der Jude, aha, ok then.

Also cancel/killwindow button doesn't work as intended.
And what is the expected and real behavior?
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.