JSON Parse errors while sending the payload

before this it was posting errors with this token in JSON, so i tried sanitizing it but resulted with a blank output, since it didnt worked i then removed the bot from that guild which had that token in its name. still the issue persists with a blank token? fyi trying to migrate from a deprecated client to moonlink glad to see if theres a workaround for it :purr_love: thank you
No description
1Lucas1.apk
1Lucas1.apk115d ago
Hello, I have a question, which version of moonlink are you using?
rival-black
rival-black115d ago
3.1.52
1Lucas1.apk
1Lucas1.apk115d ago
Could you help me discover the error?
process.on('unhandledRejection', (reason, promise) => {
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
});
process.on('unhandledRejection', (reason, promise) => {
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
});
Putting this in the code to ignore rejection errors And in the moonlink options put WebSocketDebug: true It will return the frames in the console, so I can fix it in the RFC 6455 implementation code
rival-black
rival-black115d ago
okies
1Lucas1.apk
1Lucas1.apk115d ago
No description
rival-black
rival-black115d ago
tried with my testing bot but now returns the heart
[24-01-2024 09:14:13]: [READY] Classical 2 online!
[24-01-2024 09:14:13]: [READY] Ready on 1 servers, for a total of 4 users
@Moonlink(WebSocket) - {
opcode: 8,
fin: true,
mask: false,
maskingKey: null,
payloadLength: 2,
payloadOffset: 2,
payload: <Buffer 03 f3>
} ♥�
URejectSyntaxError: Unexpected token ♥ in JSON at position 0
[24-01-2024 09:14:13]: [CMD] Client Application (/) Registered.
[24-01-2024 09:14:13]: [READY] Classical 2 online!
[24-01-2024 09:14:13]: [READY] Ready on 1 servers, for a total of 4 users
@Moonlink(WebSocket) - {
opcode: 8,
fin: true,
mask: false,
maskingKey: null,
payloadLength: 2,
payloadOffset: 2,
payload: <Buffer 03 f3>
} ♥�
URejectSyntaxError: Unexpected token ♥ in JSON at position 0
[24-01-2024 09:14:13]: [CMD] Client Application (/) Registered.
yeah added it
1Lucas1.apk
1Lucas1.apk115d ago
It is a type of opcode that is not text, I will fix and update the package Thank you very much for reporting Have a great day
rival-black
rival-black115d ago
u too! was trying to debug it for hours, i thought it was likely my mistake https://cdn.discordapp.com/emojis/1082725079495999589.webp?size=48&name=uglycry&quality=lossless
harsh-harlequin
harsh-harlequin115d ago
GG @Suryansh, you just advanced to level 1!
1Lucas1.apk
1Lucas1.apk115d ago
🤭 @Suryansh Could you test the new version to see if it fixed it?
rival-black
rival-black115d ago
oki so now it doesnt push an error on the client side but i can see some unhandled exceptions on lavalink server side
rival-black
rival-black115d ago
rival-black
rival-black115d ago
and the client is
[25-01-2024 03:01:10]: [READY] Classical 2 online!
[25-01-2024 03:01:10]: [READY] Ready on 1 servers, for a total of 4 users
@Moonlink(WebSocket) - {
opcode: 8,
fin: true,
mask: false,
maskingKey: null,
payloadLength: 2,
payloadOffset: 2,
payload: <Buffer 03 f3>
} ♥�
[25-01-2024 03:01:11]: [CMD] Client Application (/) Registered.
[25-01-2024 03:01:10]: [READY] Classical 2 online!
[25-01-2024 03:01:10]: [READY] Ready on 1 servers, for a total of 4 users
@Moonlink(WebSocket) - {
opcode: 8,
fin: true,
mask: false,
maskingKey: null,
payloadLength: 2,
payloadOffset: 2,
payload: <Buffer 03 f3>
} ♥�
[25-01-2024 03:01:11]: [CMD] Client Application (/) Registered.
1Lucas1.apk
1Lucas1.apk115d ago
The payload shows <Buffer 03 f3> converting correctly it returns 1011
1Lucas1.apk
1Lucas1.apk115d ago
No description
1Lucas1.apk
1Lucas1.apk115d ago
IETF Datatracker
RFC 6455: The WebSocket Protocol
The WebSocket Protocol enables two-way communication between a client running untrusted code in a controlled environment to a remote host that has opted-in to communications from that code. The security model used for this is the origin-based security model commonly used by web browsers. The protocol consists of an opening handshake followed by ...
1Lucas1.apk
1Lucas1.apk115d ago
1011 1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request. Does other versions of moonlink work? Like the version that uses ws Because there may also be something related to my code that prevents the connection from being established
rival-black
rival-black115d ago
nope i havent tried was using poru before this and migrated to moonlink since i am rewriting the code i did it from scratch so i dont think theres something blocking the requests, i am trying other jdk maybe theres an issue with my openj9 java nope still the same switched from openj9 17 to azul 17 @1Lucas1.apk it got fixed in 3.2.8 somehow
1Lucas1.apk
1Lucas1.apk115d ago
🥲 A very miraculous way indeed
rival-black
rival-black115d ago
@1Lucas1.apk fyi ya turned on the verbose of raw for search results in v3.2.8
{
loadType: 'search',
data: [
{
...results...
}
]
}
{
loadType: 'search',
data: [
{
...results...
}
]
}
harsh-harlequin
harsh-harlequin115d ago
GG @Suryansh, you just advanced to level 2!
1Lucas1.apk
1Lucas1.apk115d ago
I forgot to compile the project 😖
rival-black
rival-black115d ago
what does packetUpdate do? is it async'ly updating the client about voice state of channels across every guild?
1Lucas1.apk
1Lucas1.apk115d ago
The packetUpdate, it catches two events emitted by the client
if (!["VOICE_STATE_UPDATE", "VOICE_SERVER_UPDATE"].includes(t))
if (!["VOICE_STATE_UPDATE", "VOICE_SERVER_UPDATE"].includes(t))
It takes the information from these two events, takes the information from these stores and sends it to lavalink to make the connection And he is also responsible for seeing if the player changed calls, if he was disconnected and among others. The second question, yes it tunes the player information with lavalink and with the package
rival-black
rival-black115d ago
i see i see, very thank u for helping me out! finally it loads some stuff and basic canvas works finally tho i was verbosing thru in track info and ig the length is coming out as undefined
let durationMS = track.length;
console.log(title, artist, durationMS, link);
-----------
MC Jottapê, MC Kekel e Kevinho - Eterna Sacanagem (kondzilla.com) | Official Music Video Canal KondZilla undefined https://i.ytimg.com/vi/2ndgHnrJkhA/maxresdefault.jpg
let durationMS = track.length;
console.log(title, artist, durationMS, link);
-----------
MC Jottapê, MC Kekel e Kevinho - Eterna Sacanagem (kondzilla.com) | Official Music Video Canal KondZilla undefined https://i.ytimg.com/vi/2ndgHnrJkhA/maxresdefault.jpg
No description
1Lucas1.apk
1Lucas1.apk115d ago
It's track.duration
rival-black
rival-black115d ago
ohh i see mb