node-steam-user icon indicating copy to clipboard operation
node-steam-user copied to clipboard

Protobuf error during logOn

Open exogenesick opened this issue 9 years ago • 2 comments

During logOn to steam I got error:

at TCP.onread (net.js:542:20) at Socket.Readable.push (_stream_readable.js:130:10) at readableAddChunk (_stream_readable.js:183:13) at emitReadable (stream_readable.js:432:7) at emitReadable (_stream_readable.js:438:10) at emitNone (events.js:86:13) at Socket.emit (events.js:185:7) at TCPConnection._readPacket (/app/node_modules/steam-client/lib/tcp_connection.js:179:7) at TCPConnection.emit (events.js:188:7) at emitOne (events.js:96:13) at CMClient._netMsgReceived (/app/node_modules/steam-client/lib/cm_client.js:307:24) at CMClient.handlers.(anonymous function) (/app/node_modules/steam-client/lib/cm_client.js:590:7) at CMClient.emit (events.js:188:7) at emitOne (events.js:96:13) at CMClient.g (events.js:286:16) at SteamUser.onConnected (/app/node_modules/steam-user/components/logon.js:183:15) at CMClient.logOn (/app/node_modules/steam-client/lib/cm_client.js:252:109) at MessagePrototype.set (/app/node_modules/protobufjs/dist/protobuf.js:2483:38) at Message (/app/node_modules/protobufjs/dist/protobuf.js:2411:34) at MessagePrototype.set (/app/node_modules/protobufjs/dist/protobuf.js:2490:35) at Error (native) Error: .CMsgClientLogon#account_name is not a field: undefined

I used libraries: steam-user = 3.21.7 steam-client = 2.5.4

exogenesick avatar Aug 17 '17 10:08 exogenesick

Show your code and the entire output.

DoctorMcKay avatar Aug 17 '17 16:08 DoctorMcKay

Error: .CMsgClientLogon#account_name is not a field: undefined

This tells me you're trying to log in using:

const logindetails = {
    account_name: process.env.account_name,
    password: process.env.password
};

You should instead use:

const logindetails = {
    accountName: process.env.account_name,
    password: process.env.password
};

account_name is replaced with accountName, account_name isn't a field used in the logOn function

"account_name" is a field used in the internal system of the logOn function; however, you must supply your account name via the accountName key in the object you parse

Tl;DR: Use accountName, not account_name

lewisgibson avatar Dec 21 '17 21:12 lewisgibson