aperpen / clash-royale-client

NodeJS client to connect to Clash Royale servers
GNU General Public License v3.0
49 stars 16 forks source link

can't log in clash royale server #7

Closed liyejun closed 6 years ago

liyejun commented 6 years ago

Select an account: 1 ? Handshake ? HandshakeOk ? Login ? LoginFailed ?? Error decoding 20103 packet RangeError: Illegal offset: 0 <= 3411609329 (+4) <= 294 at ByteBuffer.readIString (D:\Projects\clash-royale-client-master\utils\byte buffer-sc.js:139:19) at Object.module.exports.decode (D:\Projects\clash-royale-client-master\pack ets\server\LoginFailed\index.js:18:11) at Processor.parse (D:\Projects\clash-royale-client-master\packets\processor .js:26:42) at packetizer.packetize (D:\Projects\clash-royale-client-master\index.js:56: 23) at Packetizer.packetize (D:\Projects\clash-royale-client-master\utils\packet izer.js:29:21) at Socket.server.on.chunk (D:\Projects\clash-royale-client-master\index.js:4 9:20) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11)

liyejun commented 6 years ago

I tried google play account and apple id account. both failed.

aperpen commented 6 years ago

How are you tring to log in? :thinking: You need the account token, not google play or apple id account. (The error is because LoginFailed packet definition is not finished, however it doesn't really matter)

liyejun commented 6 years ago

Thanks. I tried my tag ID (with and without #) and API token, still log in failed.

aperpen commented 6 years ago

That's not the token you must use, the token you need is account passToken, which is hidden in the game files in your phone. However, right now there's not an easy way to get it due to Supercell security improvements.