TypeError: Cannot read properties of undefined (reading 'rest')
I get this error when i try to search for a song, heres hows my code is laid out:
the error is this.rest = this.node.rest;
^
TypeError: Cannot read properties of undefined (reading 'rest')
and i know the lavalink gets the connection
48 Replies
Does it appear in the console that the node has been connected?
rare-sapphireOP•2y ago
yes it does
aswell as the lavalink logs
GG @steven, you just advanced to level 1!
Could you send me a screenshot of the complete log?
rare-sapphireOP•2y ago
also worth to mention that the lavalink is running on local host
the error log?
Yeah
rare-sapphireOP•2y ago
What is the version of nodejs and the version of moonlink.js
rare-sapphireOP•2y ago
node is v18.17.0
moonlink is 2.11.76
discord.js is 14.13.0
Could you update moonlink.js to v2.13.4?
rare-sapphireOP•2y ago
yeah let me try
same issue
What is the lavalink version?
I have to ask questions until I find the root of the problem 🤭
rare-sapphireOP•2y ago
your good
just updated the console log
New lavalink node connected: NA-01 running 4.0.0-beta.4
Do you have access to node_modules?
If so, you could enter the file "/node_modules/moonlink.js/dist/src/MoonlinkPlayer.js" on line 65 and place
console.log(node)
To see what returns from the node
rare-sapphireOP•2y ago
ReferenceError: node is not defined
i tried this.node but it returned undefined
You can now put
console.log(this.data)
rare-sapphireOP•2y ago
i blocked out the ids my self
but
they are valid
Is the problem really because it is localhost?
Apparently yes lol
rare-sapphireOP•2y ago
no because i tried a hosted node
lemme try again
a hosted one
do u have a v4 hosted one?
that i can test really quickly
console.log(this.manager.nodes.values())
rare-sapphireOP•2y ago
console.log(this.manager.nodes.values())
^
TypeError: Cannot read properties of undefined (reading 'nodes')
GG @steven, you just advanced to level 2!
console.log(manager.nodes.values())
this.manager is only assigned at the very bottom
Do you use identifier?
On node
rare-sapphireOP•2y ago
yes
also
i just put it on a hosted one
v4
itstill has the same iossue
If you use this, it could be one of the factors in the problem, as I noticed that it uses the host name instead of the identifier if it has
rare-sapphireOP•2y ago
You knew
Wait a little bit
rare-sapphireOP•2y ago
?
okay
without an identifier it works
@1Lucas1.apk
Could you do a test for me?, Install the new version I just published and try again to use the player
@steven
rare-sapphireOP•2y ago
with or without an identifier?
With
rare-sapphireOP•2y ago
works bro thanks
:D
Thanks for reporting the issue and have a great day 🙂
rare-sapphireOP•2y ago
you aswell
@1Lucas1.apk also how can i destroy all players when the bot shuts off without turning off lavalink? other modules do it
I'll have to do this inside the package
I'll have to do this inside the package
rare-sapphireOP•2y ago
oh ok
also
my
playlist wont load @1Lucas1.apk
C:\Users\clap\Desktop\gr$pe v3\node_modules\moonlink.js\dist\src@Sources\Spotify.js:46
const items = initialPage.items || [];
^
TypeError: Cannot read properties of undefined (reading 'items')
im heavily dependent on spotify
cloudy-cyan•2y ago
playerlist url ? 🧐
Because I can't trigger your problem
GG @steven, you just advanced to level 3!
rare-sapphireOP•2y ago
oh
its cuz its private?
cloudy-cyan•2y ago
yes
rare-sapphireOP•2y ago
okay i just tried it again hile its not and
its taking forever
no way to speed it up?
cloudy-cyan•2y ago
no
rare-sapphireOP•2y ago
im looking at the lavalink logs and its only at the 11th song
and not going
anymore
how come other modules instantly load it lol
highly considering going to lavalink-client i mean it kinda seems like this module is in very early stages of development tbh
cloudy-cyan•2y ago
🤔
he leave :(((
F
I just found out that for me to withdraw funds from GitHub sponsors, I need a minimum of $5
You'll be stuck there until you get it lol
I'm going to try to make a parameter so that when the bot has been disconnected, when it reconnects, it stops all players
cloudy-cyan•2y ago
XDD
GG @aaaaa, you just advanced to level 6!