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
30 Replies
1Lucas1.apk
1Lucas1.apk•11mo ago
Hello, I have a question, which version of moonlink are you using?
deep-jade
deep-jadeOP•11mo ago
3.1.52
1Lucas1.apk
1Lucas1.apk•11mo 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
deep-jade
deep-jadeOP•11mo ago
okies
1Lucas1.apk
1Lucas1.apk•11mo ago
No description
deep-jade
deep-jadeOP•11mo 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.apk•11mo 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
deep-jade
deep-jadeOP•11mo 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
MEE6
MEE6•11mo ago
GG @Suryansh, you just advanced to level 1!
1Lucas1.apk
1Lucas1.apk•11mo ago
🤭 @Suryansh Could you test the new version to see if it fixed it?
deep-jade
deep-jadeOP•11mo ago
oki so now it doesnt push an error on the client side but i can see some unhandled exceptions on lavalink server side
deep-jade
deep-jadeOP•11mo ago
deep-jade
deep-jadeOP•11mo 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.apk•11mo ago
The payload shows <Buffer 03 f3> converting correctly it returns 1011
1Lucas1.apk
1Lucas1.apk•11mo ago
No description
1Lucas1.apk
1Lucas1.apk•11mo 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.apk•11mo 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
deep-jade
deep-jadeOP•11mo 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.apk•11mo ago
🥲 A very miraculous way indeed
deep-jade
deep-jadeOP•11mo 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...
}
]
}
MEE6
MEE6•11mo ago
GG @Suryansh, you just advanced to level 2!
1Lucas1.apk
1Lucas1.apk•11mo ago
I forgot to compile the project 😖
deep-jade
deep-jadeOP•11mo ago
what does packetUpdate do? is it async'ly updating the client about voice state of channels across every guild?
1Lucas1.apk
1Lucas1.apk•11mo 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
deep-jade
deep-jadeOP•11mo 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.apk•11mo ago
It's track.duration
deep-jade
deep-jadeOP•11mo ago
ohh i see mb
Want results from more Discord servers?
Add your server