JustYuuto / deezer-discord-rpc

A Discord RPC for Deezer
Mozilla Public License 2.0
48 stars 9 forks source link

`Use "Listening to" instead of "Playing"` doesn't seem to detect my token #6

Closed jinetty closed 1 year ago

jinetty commented 1 year ago

I pasted my discord user token but it seems it cannot take my token.

[Protocol] Registered protocol
[App] Deezer Discord RPC version 1.1.11 
[119178:0424/004325.506192:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[Updater] Checking for updates...
[Updater] No updates found.
[WebSocket] Connected to Discord WebSocket server
[WebSocket] Sent authentication payload
[Menu] Updating menu entries...
[Menu] Updated menu entries
[Menu] Updating menu entries...
[Menu] Updated menu entries
[119178:0424/004331.303033:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[119178:0424/004331.304314:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
[Activity] Updating because music got changed
[Spotify Covers] Access token expired; refreshing it
(node:119124) UnhandledPromiseRejectionWarning: AxiosError: Request failed with status code 400
(Use `deezer-discord-rpc --trace-warnings ...` to show where the warning was created)
(node:119124) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
[Activity] Updating because music got changed
[Spotify Covers] Access token expired; refreshing it
(node:119124) UnhandledPromiseRejectionWarning: AxiosError: Request failed with status code 400
(node:119124) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)
[Activity] Updating because music got changed

Am I pasting wrong token ?

jinetty commented 1 year ago

I figured app did not save my token into $HOME/.config/deezer-discord-rpc/config.json so i put spotify_access_token and spotify_token_type myself into config file.

{
    "spotify_access_token":"SPOTIFY_TOKEN",
    "spotify_token_type": "Bearer",
    "discord_token":"DISCORD_TOKEN",
    "use_listening_to":true,
    "only_show_if_playing":true
}

from https://accounts.spotify.com/authorize?response_type=token&client_id=client_id&redirect_uri=redirect_uri_of_application link.

JustYuuto commented 1 year ago

You (normally) don't need to do it manually, you sure that you clicked the circled link on the screenshot and authorized your Spotify account?

Screenshot 2023-05-01 at 18 25 51

jinetty commented 1 year ago

I did it actually but it didn't wrote "spotify" token into my config file, writes discord token fine. When I authorized spotify with app, app spawns new window and pop-up still remains and when i clicked submit, i'm restarting but it does nothing.

jinetty commented 1 year ago

image This error is from spawning new window, it wasn't happening before merged your new commits.

JustYuuto commented 1 year ago

Hi! Sorry for not responding to your comment, when you installed the app did you take the .AppImage file or the .snap file?

Chroni69 commented 1 year ago

Hi, just encountered the same bug. After pasting the token without Spotify Login it just doesnt work. With the Spotify (Free) Login it works, so there's obviously a dependancy.

I'm new to github, not a programmer (Created the account just to comment here) and don't know the common guidelines but i figure it's probably not gonna be a big problem if I add this here too: At least with my free spotify account and logging in with Firefox, album covers aren't showing in Discord. It's also not displaying the remaining time of the title, but i guess that's just a technical limitation.

NocFA commented 1 year ago

I noticed the above, too with regards to Spotify seemingly being non-negotiable, which, is funny considering using the Spotify feature for cover art appears to not function at all, although, that's a topic for another issue.

JustYuuto commented 1 year ago

It's also not displaying the remaining time of the title, but i guess that's just a technical limitation.

On PC it's not, but on phone it's showing. Idk why Discord does this, but I can't change anything about this.