steamcommunity-mobile-confirmations icon indicating copy to clipboard operation
steamcommunity-mobile-confirmations copied to clipboard

[Error: Invalid protocol: steammobile:]

Open Tem4a opened this issue 9 years ago • 15 comments

After 2-3 hours to make trades this stops and writing to the console error: [Error: Invalid protocol: steammobile:].

what to do?

Tem4a avatar Dec 07 '15 17:12 Tem4a

having same problem.

aleksiaaa avatar Dec 09 '15 05:12 aleksiaaa

I got it too, right from the start.

zharikovpro avatar Dec 09 '15 17:12 zharikovpro

i got that when i was logged into the bot elsewhere.

buddhapest avatar Dec 09 '15 20:12 buddhapest

I believe this happens with invalid cookies.

scholtzm avatar Dec 10 '15 12:12 scholtzm

yes but why the cookies turn invalid? how can i get new cookies?

tambu22 avatar Dec 10 '15 13:12 tambu22

Adding my code:

function aceptMobile()
{

try {
var steamcommunityMobileConfirmations = new SteamcommunityMobileConfirmations(
{
    steamid:         'steamID',
    identity_secret: 'ISecret',
    device_id:       'deviceID',
    webCookie:       COOKIE,
});
steamcommunityMobileConfirmations.FetchConfirmations((function (err, confirmations)
{
    if (err)
    {
        weblogon();
        console.log(err);
        return;
    }
    console.log('steamcommunityMobileConfirmations.FetchConfirmations received ' + confirmations.length + ' confirmations');
    if ( ! confirmations.length)
    {
        return;
    }
    steamcommunityMobileConfirmations.AcceptConfirmation(confirmations[0], (function (err, result)
    {
        if (err)
        {
            console.log(err);
            return;
        }
        console.log('steamcommunityMobileConfirmations.AcceptConfirmation result: ' + result);
    }).bind(this));
}).bind(this));

} catch (e) {}
}


function weblogon() 
{
        steamWebLogOn.webLogOn(function(sessionID, newCookie){
    COOKIE=newCookie;    
    getSteamAPIKey({
        sessionID: sessionID,
        webCookie: newCookie
        }, function(err, APIKey) {
            offers.setup({
                sessionID: sessionID,
                webCookie: newCookie,
                APIKey: APIKey
             });
steamuserinfo.setup(APIKey);
aceptMobile();
    });
});
}

tambu22 avatar Dec 10 '15 14:12 tambu22

You are not retrying after calling weblogon.

scholtzm avatar Dec 10 '15 14:12 scholtzm

its the same after that i cant get any new confirmations or load offers

tambu22 avatar Dec 10 '15 14:12 tambu22

Does somebody find solution for that problem?

dgtvc avatar Dec 28 '15 13:12 dgtvc

use random device id.

tambu22 avatar Dec 28 '15 13:12 tambu22

How to cast that random id?

Edit:

mobileConfirmations = new SteamMobileAuth({
                steamid: config.steamid,
                identity_secret: config.identity_secret,
                device_id: "android:" + require('crypto').randomBytes(16).toString('hex'),
                webCookie: cookies
            });

aleksiaaa avatar Dec 28 '15 14:12 aleksiaaa

    var hash = require('crypto').createHash('sha1');
    hash.update(Math.random().toString());
    hash = hash.digest('hex');
    device_id = 'android:' + hash;

tambu22 avatar Dec 28 '15 14:12 tambu22

Please help too have this problem

Bartek4175 avatar Jan 10 '16 20:01 Bartek4175

I personally don't have this problem but it would be good to have a fix for it. Try doing a weblogon everytime it logs an error, so between every console.log(error) and return put a weblogon();

Gergo4961 avatar Jan 11 '16 21:01 Gergo4961

...

[SERVER] Starting the countdown for Game #12 [SERVER] Ending current game & choosing winner. [SERVER] Trade Offer for Game #12 has been successfully sent and is awaiting mobile confirmation. [SERVER] Received 1 confirmations [SERVER] Confirmation handling result: true [Error: Invalid protocol: steammobile:] [Error: 503] [Error: 503] [Error: 503] [Error: 503] [Error: 503] [Error: 503] [Error: 503] [Error: 503] [Error: 503] [Error: 503] [Error: 503] events.js:85 throw er; // Unhandled 'error' event ^ Error: Connection lost: The server closed the connection. at Protocol.end (/home/bot_csgon_1/node_modules/mysql/lib/protocol/Protocol.js:103:13) at Socket. (/home/bot_csgon_1/node_modules/mysql/lib/Connection.js:102:28) at Socket.emit (events.js:129:20) at _stream_readable.js:908:16 at process._tickCallback (node.js:355:11)

GregorWedlich avatar Feb 24 '16 12:02 GregorWedlich