Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication Failed - You do not have permissions to access this service #51

Closed
angiioh opened this issue Jun 22, 2023 · 9 comments · Fixed by #52
Closed

Authentication Failed - You do not have permissions to access this service #51

angiioh opened this issue Jun 22, 2023 · 9 comments · Fixed by #52

Comments

@angiioh
Copy link

angiioh commented Jun 22, 2023

Hi! I recently added this plugin so I can scrobble my music on Jellyfin. However, whenever I try to login, I get the following error: "Authentication Failed - You do not have permissions to access this service" How do I get it to prompt last.fm to allow access?

Thank you

@ywaf
Copy link

ywaf commented Jun 30, 2023

use username not email

@angiioh
Copy link
Author

angiioh commented Jun 30, 2023

I never tried my email. In other apps it's always been username so that's all I tried.

@monday-j
Copy link

monday-j commented Jul 2, 2023

Having the same issue here - I'm running Jellyfin through a privileged Proxmox LXC if that makes a difference

Thinking about it, you could probably edit the .xml file in the Jellyfin Plugin config directory, but unfortunately I don't know the syntax I would use for this to work

@jesseward
Copy link
Owner

hey @angiioh and @monday-j thanks for reporting this.

Please confirm you're running 8.0.0.3 of the plugin. Your logs will output something similar to the following

[2023-07-03 01:00:03.497 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.Lastfm, Version=8.0.0.3, Culture=neutral, PublicKeyToken=null" from "/config/plugins/LastFM/Jellyfin.Plugin.Lastfm.dll"

Please also provide any logs that include the string Jellyfin.Plugin.Lastfm. These may include additional details about the failure.

@angiioh
Copy link
Author

angiioh commented Jul 3, 2023

No problem! I am using 8.0.0.3

I found this in the log after clicking 'save' in the plugin settings:

[2023-07-02 21:14:57.215 -06:00] [INF] Fetching LastFM mobilesession auth for Username="angii"
[2023-07-02 21:14:57.666 -06:00] [INF] Lost 1 WebSockets.
[2023-07-02 21:15:02.288 -06:00] [INF] Fetching LastFM mobilesession auth for Username="angii"
[2023-07-02 21:15:02.455 -06:00] [ERR] Authentication Failed - You do not have permissions to access the service
[2023-07-02 21:15:02.460 -06:00] [WRN] Slow HTTP Response from "http://127.0.0.1:8096/Lastfm/Login" to "127.0.0.1" in 0:00:05.2558504 with Status Code 200
[2023-07-02 21:15:02.484 -06:00] [ERR] Authentication Failed - You do not have permissions to access the service

@jesseward
Copy link
Owner

hey @angiioh, The error itself is being returned from the Last.FM API. This is interesting and it seems limited to a subset of accounts as this is not happening to my account (sample size of 1 😮‍💨 ).

I found this comment from @ben-xo who was a longtime developer at last.fm before moving on to a new company. tomahawk-player/tomahawk#435 (comment) . There are a few things that stand out.

can try changing their password on the site (feel free to subsequently change it back again) to resynchronise their auth.getMobileSession authToken. We sometimes find that a user's authToken can get out of sync, due to the fact that it's a bit of a hack, and not really supported any more (it's mainly left in place for owners of hardware devices that cannot get their firmware updated, such as Sonos).

This Jellyfin plugin does use auth.getMobileSession (https://github.com/jesseward/jellyfin-plugin-lastfm/blob/master/Jellyfin.Plugin.Lastfm/Resources/Strings.cs#L15). I wasn't aware this endpoint is deprecated. FWIW their documentation doesn't state as such (https://www.last.fm/api/mobileauth). So I am not (yet) planning to rewrite the auth mechanism.

As a long shot, can you try changing your password on the last.fm site and then swap it back. It sounds like that had previously kicked off a synchronize task. In the event this is a Last.FM account related problem.

@monday-j
Copy link

monday-j commented Jul 4, 2023

Changing my password worked! Thanks for looking this up for us :)

@angiioh
Copy link
Author

angiioh commented Jul 4, 2023

Worked for me as well. Thank you!

@jesseward
Copy link
Owner

Thanks for confirming @angiioh and @monday-j. I have added a note to the known issues section of the README.

Will keep an eye out for reports of this and determine if the auth mechanism should be migrated away from their mobileauth endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants