Spotify Access Token Fetch Error

I'm currently encountering an issue while using Moonlink.js with Spotify support. Here's the error log:
/root/Moon/node_modules/moonlink.js/dist/src/sources/Spotify.js:56
throw new Error('Failed to fetch Spotify access token');
^
Error: Failed to fetch Spotify access token
at Spotify.initTokens (/root/Moon/node_modules/moonlink.js/dist/src/sources/Spotify.js:56:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Node.js v22.16.0
/root/Moon/node_modules/moonlink.js/dist/src/sources/Spotify.js:56
throw new Error('Failed to fetch Spotify access token');
^
Error: Failed to fetch Spotify access token
at Spotify.initTokens (/root/Moon/node_modules/moonlink.js/dist/src/sources/Spotify.js:56:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Node.js v22.16.0
No description
29 Replies
1Lucas1.apk
1Lucas1.apkโ€ข4mo ago
Since it's early morning where I live, I'll do a hotfix on this in about 8 hours. Thanks for reporting
INSANE17?.!!
INSANE17?.!!OPโ€ข4mo ago
Thanks
UnschooledGamer
UnschooledGamerโ€ข4mo ago
It's endpoint got changed ๐Ÿ™ƒ Also the reason param in the url.
Drac
Dracโ€ข4mo ago
hey just wanted to know if this is fixed sorry for the ping @1Lucas1.apk
UnschooledGamer
UnschooledGamerโ€ข4mo ago
Just 3 hours passed
Drac
Dracโ€ข4mo ago
Okay Thanks for the reply
UnschooledGamer
UnschooledGamerโ€ข4mo ago
INSANE17?.!!
INSANE17?.!!OPโ€ข4mo ago
Is it fixed ?
UnschooledGamer
UnschooledGamerโ€ข4mo ago
As per my testing yes. Lucas Will check & release He should be here anytime in some hours
INSANE17?.!!
INSANE17?.!!OPโ€ข4mo ago
waiting for him :Basu_PandaEatingChips:
UnschooledGamer
UnschooledGamerโ€ข4mo ago
might have gotta held IRL works.
INSANE17?.!!
INSANE17?.!!OPโ€ข4mo ago
Yeah
UnschooledGamer
UnschooledGamerโ€ข4mo ago
you can install that version. But I can't ensure it might have everything as dev & main branch are not synced. 6 commits behind v4.(v4 = current main branch)
INSANE17?.!!
INSANE17?.!!OPโ€ข4mo ago
Nah, I'll wait until the release.
MEE6
MEE6โ€ข4mo ago
GG @INSANE17?.!!, you just advanced to level 1!
1Lucas1.apk
1Lucas1.apkโ€ข4mo ago
The internet cables broke in the street because of a tree now that they finished fixing them Sorry for the delay
UnschooledGamer
UnschooledGamerโ€ข4mo ago
wait
1Lucas1.apk
1Lucas1.apkโ€ข4mo ago
Thanks for fixing it, you're awesome โœŒ๐Ÿฝ
UnschooledGamer
UnschooledGamerโ€ข4mo ago
don't publish I forgot to change embed to web-player
1Lucas1.apk
1Lucas1.apkโ€ข4mo ago
I still need to remove these errors that cause these fatal errors, let it automatically disable when the source cannot obtain this necessary information.
UnschooledGamer
UnschooledGamerโ€ข4mo ago
hmm, just warning it. with console.warn or process.warning
1Lucas1.apk
1Lucas1.apkโ€ข4mo ago
To publish, just put the version in package.json and a release on github Sometimes there are people who don't like logs, so I think I'll send it through some event, I think through debug
UnschooledGamer
UnschooledGamerโ€ข4mo ago
you should warn to my guess. As else User will need to dig down. a process.warning or warn can be handled. you can suppress them with a flag/option
1Lucas1.apk
1Lucas1.apkโ€ข4mo ago
Then I will send it through console.warn I made an option to disable it and realized that it is not working. I will have to fix that too.
INSANE17?.!!
INSANE17?.!!OPโ€ข4mo ago
@1Lucas1.apk hey ! Good to see you !
ComicallyBad
ComicallyBadโ€ข4mo ago
Hey, so I'm still getting this error with the latest version, is it still an issue atm with moonlink? Or could it be my application.yml needs to be updated? edit* not getting that error anymore sorry, but I'm getting: TypeError: Body is unusable: Body has already been read yeah, commenting Spotify out from the application.yml fixed it lol, spotify is working now
1Lucas1.apk
1Lucas1.apkโ€ข4mo ago
This is because of fetch, I'll soon rewrite makeRequest to http
ComicallyBad
ComicallyBadโ€ข4mo ago
So does moonlink not need lavasrc? Seems to work fine with lavasrc Spotify configuration disabled
1Lucas1.apk
1Lucas1.apkโ€ข4mo ago
Since last month I introduced a dynamic sourceManager and added support for Spotify and Deezer natively, but it needs a default source to stream

Did you find this page helpful?