koraktor / steam-condenser

A multi-language library for querying the Steam Community, Source, GoldSrc servers and Steam master servers
https://koraktor.de/steam-condenser
Other
356 stars 67 forks source link

[Ruby master branch] Unable to fetch_friends without getting 400 status #246

Closed clivecrous closed 10 years ago

clivecrous commented 10 years ago
SteamCondenser::Community::SteamId.from_steam_id( "STEAM_0:1:74955234" ).fetch_friends

=>

SteamCondenser::Error::WebApi: The Web API request has failed due to an HTTP error:  (status code: 400).
        from ...../.vendor/ruby/2.0.0/bundler/gems/steam-condenser-ruby-e04f7b4f8c0a/lib/steam-condenser/community/web_api.rb:141:in `rescue in get'
        from ...../.vendor/ruby/2.0.0/bundler/gems/steam-condenser-ruby-e04f7b4f8c0a/lib/steam-condenser/community/web_api.rb:131:in `get'
        from ...../.vendor/ruby/2.0.0/bundler/gems/steam-condenser-ruby-e04f7b4f8c0a/lib/steam-condenser/community/web_api.rb:80:in `json'
        from ...../.vendor/ruby/2.0.0/bundler/gems/steam-condenser-ruby-e04f7b4f8c0a/lib/steam-condenser/community/steam_id.rb:309:in `fetch_friends'
        from (irb):2
        from ~/.rvm/rubies/ruby-2.0.0-p451/bin/irb:12:in `<main>'
koraktor commented 10 years ago

HTTP 400 is "Bad Request". So the URL of the request would be interesting. Can you set the log level to debug and try again?

SteamCondenser::Logging.log_level = ::Logger::Severity::DEBUG
clivecrous commented 10 years ago
DEBUG -- SteamCondenser::Community::WebApi: Querying Steam Web API: https://api.steampowered.com/ISteamUser/GetFriendList/v0001/?format=json&relationship=friend&steamid=76561198110176197

SteamCondenser::Error::WebApi: The Web API request has failed due to an HTTP error:  (status code: 400)
koraktor commented 10 years ago

The URL seems to be correct. But I'm experiencing problems with other Web API methods, too. So Steam might have a problem right now. There were similar problems a few hours ago.

clivecrous commented 10 years ago

Apologies for wasting your time, verified Steam issue:

% curl -v 'https://api.steampowered.com/ISteamUser/GetFriendList/v0001/?format=json&relationship=friend&steamid=76561198110176197'
* Adding handle: conn: 0x9c1cb0
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x9c1cb0) send_pipe: 1, recv_pipe: 0
* About to connect() to api.steampowered.com port 443 (#0)
*   Trying 63.228.223.110...
* Connected to api.steampowered.com (63.228.223.110) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* Unknown SSL protocol error in connection to api.steampowered.com:443 
* Closing connection 0
curl: (35) Unknown SSL protocol error in connection to api.steampowered.com:443 
koraktor commented 10 years ago

No problem.