Jump to content
McKay Development

steam-user elecron issue


aatmjeets

Recommended Posts

I trying to make a csgo application on electron, since I am using node-steam user it is showing WebSocketBase.disconnect,  WebSocketConnection.end and SteamUser._disconnected issues. I think this some issue with electron, but is this important to define websockets before using steam-user. P.s. my other applications worked with socketing. the code goes here:

const form = document.getElementById("details");
form.addEventListener('submit',function(event){
    event.preventDefault();
    const name = document.getElementById("user").value;
    //console.log(name);
    const pass = document.getElementById("pass").value;
    //console.log(pass);
    const logOnOptions = {
          accountName: name,
         password: pass,
          twoFactorCode: SteamTotp.generateAuthCode('auth')
    };

    client.logOn(logOnOptions);

    client.on('loggedOn', () => {
          console.log('Logged into Steam');
          client.setPersona(SteamUser.EPersonaState.Online)
        client.setPersona(SteamUser.EPersonaState.Online, 'desired_name');
        client.gamesPlayed(730);
    });

})

 

Link to comment
Share on other sites

Uncaught TypeError: setTimeout(...).unref is not a function
    at WebSocketBase.disconnect (./node_modules/websocket13/lib/base.js:68)
    at WebSocketConnection.end (./node_modules/steam-user/components/connection_protocols/websocket.js:153)
    at SteamUser._disconnect (./node_modules/steam-user/components/logon.js:312)
    at ./node_modules/steam-user/components/logon.js:259

this is the error that I encountered. do i have to define a socket,  to use steam user here?

 

also this, error is only encountered inside electron, the script runs fine without electron.

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...