Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong token returned from DiscordAuthWebsocket #267

Closed
3 tasks done
Naozumi520 opened this issue Aug 20, 2022 · 9 comments
Closed
3 tasks done

Wrong token returned from DiscordAuthWebsocket #267

Naozumi520 opened this issue Aug 20, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@Naozumi520
Copy link

Which package has the bugs?

The core library

Issue description

Scan the QR code to log in then token is logged, but the token is different each time and it is wrong. (Tried it twice and the token is highlighted below:)
token_tem

Code sample

const { Client, DiscordAuthWebsocket } = require('discord.js-selfbot-v13')

const AuthWebsocket = new DiscordAuthWebsocket()
  AuthWebsocket.connect()
  AuthWebsocket.on('ready', (_, url) => {
    // prompt.webContents.send('event', { action: 'qrRen', args: { qrCodeUrl: url } })
    // prompt.show()
    console.log('qr Ready!')
  })
    .on('finish', (_, token) => {
          console.log(token)
          // storage.set('discordToken', { token: token })
          // prompt.destroy()
    });

Package version

discord.js-selfbot-v13@2.6.4

Node.js version

v18.3.0

Operating system

macOS 13.0 Beta (22A5311f)

Priority this issue should have

Medium (should be fixed soon)

Checklist

  • I have searched the open issues for duplicates.
  • I have shared the entire traceback.
  • I am using a user token (and it isn't visible in the code).

Additional Information

No response

@Naozumi520 Naozumi520 added the bug Something isn't working label Aug 20, 2022
@aiko-chan-ai
Copy link
Owner

each time you do RemoteAuth you have generated a random RSA key. So the hash of the token will be different every time it is used. Please save the token after scanning the QR code, it will always work

@Naozumi520
Copy link
Author

Naozumi520 commented Aug 20, 2022

I saved the token and try to login with it, however, everytime I log in with the token, it keeps saying the token is invalid.
Scanning the QR code also doesn't log the library in. 🥹

@aiko-chan-ai
Copy link
Owner

I saved the token and try to login with it, however, everytime I log in with the token, it keeps saying the token is invalid. Scanning the QR code also doesn't log the library in. 🥹

I will check again (will fix if there is an error in the next 1 hour)

@aiko-chan-ai
Copy link
Owner

ohhhhh i found the problem: v Discord changed the way remote authentication works by adding a new endpoint (I omitted it)

@aiko-chan-ai
Copy link
Owner

image

@aiko-chan-ai
Copy link
Owner

ohhhhh i found the problem: v Discord changed the way remote authentication works by adding a new endpoint (I omitted it)

@Naozumi520 ok latest :))

@Naozumi520
Copy link
Author

Sadly, when I login with the token this error was shown 🥲:

Uncaught Exception:
TypeError: Cannot read properties of undefined (reading 'rawSetting')
    at Client.customStatusAuto (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/discord.js-selfbot-v13/src/client/Client.js:813:24)
    at Object.module.exports [as READY] (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/discord.js-selfbot-v13/src/client/websocket/handlers/READY.js:140:12)
    at WebSocketManager.handlePacket (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketManager.js:359:31)
    at WebSocketShard.onPacket (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketShard.js:482:22)
    at WebSocketShard.onMessage (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketShard.js:317:10)
    at WebSocket.onMessage (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/ws/lib/event-target.js:199:18)
    at WebSocket.emit (node:events:390:28)
    at Receiver.receiverOnMessage (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/ws/lib/websocket.js:1178:20)
    at Receiver.emit (node:events:390:28)
    at Receiver.dataMessage (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/ws/lib/receiver.js:528:14)
    ```

@aiko-chan-ai
Copy link
Owner

Sadly, when I login with the token this error was shown 🥲:

Uncaught Exception:
TypeError: Cannot read properties of undefined (reading 'rawSetting')
    at Client.customStatusAuto (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/discord.js-selfbot-v13/src/client/Client.js:813:24)
    at Object.module.exports [as READY] (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/discord.js-selfbot-v13/src/client/websocket/handlers/READY.js:140:12)
    at WebSocketManager.handlePacket (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketManager.js:359:31)
    at WebSocketShard.onPacket (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketShard.js:482:22)
    at WebSocketShard.onMessage (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketShard.js:317:10)
    at WebSocket.onMessage (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/ws/lib/event-target.js:199:18)
    at WebSocket.emit (node:events:390:28)
    at Receiver.receiverOnMessage (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/ws/lib/websocket.js:1178:20)
    at Receiver.emit (node:events:390:28)
    at Receiver.dataMessage (/Users/yeungyathung/Desktop/discordOverlayMac/discordOverlayMacPro/node_modules/ws/lib/receiver.js:528:14)
    ```

fixed v2.6.6

@Naozumi520
Copy link
Author

fixed v2.6.6

Thanks! It's now working. 😋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants