seishun / node-steam

Interface directly with Steam servers from Node.js
MIT License
1.01k stars 181 forks source link

Length not multiple of 4 #162

Closed kjsmita6 closed 9 years ago

kjsmita6 commented 9 years ago

I'm trying to log in my bot, but keep getting this error:

C:\Users\Kyle\Desktop\Desktop\Steam Bots\Shock\Shock\node_modules\steam\node_mod
ules\bytebuffer\dist\ByteBufferNB.js:2717
                throw TypeError("Illegal str: Length not a multiple of 4");
                      ^
TypeError: Illegal str: Length not a multiple of 4
    at TypeError (native)
    at Function.module.exports.ByteBuffer.fromBase64 (C:\Users\Kyle\Desktop\Desk
top\Steam Bots\Shock\Shock\node_modules\steam\node_modules\bytebuffer\dist\ByteB
ufferNB.js:2717:23)
    at Function.module.exports.ByteBuffer.wrap (C:\Users\Kyle\Desktop\Desktop\St
eam Bots\Shock\Shock\node_modules\steam\node_modules\bytebuffer\dist\ByteBufferN
B.js:308:39)
    at ProtoBuf.Reflect.ElementPrototype.verifyValue (C:\Users\Kyle\Desktop\Desk
top\Steam Bots\Shock\Shock\node_modules\steam\node_modules\protobufjs\dist\Proto
Buf.js:1938:43)
    at ProtoBuf.Reflect.FieldPrototype.verifyValue (C:\Users\Kyle\Desktop\Deskto
p\Steam Bots\Shock\Shock\node_modules\steam\node_modules\protobufjs\dist\ProtoBu
f.js:3538:37)
    at MessagePrototype.set (C:\Users\Kyle\Desktop\Desktop\Steam Bots\Shock\Shoc
k\node_modules\steam\node_modules\protobufjs\dist\ProtoBuf.js:2542:63)
    at MessagePrototype.set (C:\Users\Kyle\Desktop\Desktop\Steam Bots\Shock\Shoc
k\node_modules\steam\node_modules\protobufjs\dist\ProtoBuf.js:2533:42)
    at Message (C:\Users\Kyle\Desktop\Desktop\Steam Bots\Shock\Shock\node_module
s\steam\node_modules\protobufjs\dist\ProtoBuf.js:2463:38)
    at SteamClient.handlers.(anonymous function) (C:\Users\Kyle\Desktop\Desktop\
Steam Bots\Shock\Shock\node_modules\steam\lib\steam_client.js:177:44)
    at SteamClient._netMsgReceived (C:\Users\Kyle\Desktop\Desktop\Steam Bots\Sho
ck\Shock\node_modules\steam\lib\steam_client.js:106:26)

I'm not really sure what's causing it, but it seems to happen right before the bot is logged in, but it doesn't tell me where in my code it's breaking. Thanks.

seishun commented 9 years ago

You're passing a string as shaSentryfile instead of a Buffer.