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

[Bug] | Users re-appear in the users list even after being successfully deleted #492

Open
2 tasks done
0penSourcerer opened this issue Nov 19, 2024 · 5 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@0penSourcerer
Copy link

Are you using the latest release?

  • Yes, I am using the latest release.

Have you checked a bug report doesn't already exist?

  • Yes, I have checked the existing bug reports.

What happened?

After deleting a user...
Screenshot 2024-11-18 at 10 16 35 PM

...I get a notification on the screen that the user has been successfully deleted, but after using the "Scan Users" tool...
Screenshot 2024-11-18 at 10 17 07 PM

...the user will be back in the list. The automated Scan Users task will also cause the user to re-appear when it has run.
Screenshot 2024-11-18 at 10 17 40 PM

Virtualisation

Docker

What operating system are you seeing the problem on?

Linux

What browsers are you seeing the problem on?

Chrome

Project Location

Local

Bug Description

Deleting users doesn't seem to be working properly, as users re-appear on the User page after a supposed successful deletion.

Steps to Reproduce

  1. be logged into the Admin Dashboard
  2. navigate to the Users page
  3. delete the intended user
  4. wait for the Scan Users task to run, or run the task manually using the "Scan Users" button.
  5. the user will reappear on the Users page.

Relevant Log Output

No response

@0penSourcerer 0penSourcerer added the bug Something isn't working label Nov 19, 2024
@cliffordwhansen
Copy link

I have encountered the same thing.

When I delete the user from Wizarr I get the following:

12:17:39 DEBUG https://plex.tv:443 "GET /api/users/ HTTP/1.1" 200 None
12:17:39 DEBUG https://plex.tv:443 "DELETE /api/v2/sharings/xxx HTTP/1.1" 204 0
12:17:39 DEBUG https://plex.tv:443 "GET /api/users/ HTTP/1.1" 200 None
12:17:39 DEBUG https://plex.tv:443 "DELETE /api/home/users/xxx HTTP/1.1" 404 None

And then when I sync the users I get this:

12:18:06 DEBUG https://plex.tv:443 "GET /api/v2/user HTTP/1.1" 200 None
12:18:06 DEBUG Encoding detection: utf_8 is most likely the one.
12:18:06 DEBUG https://plex.tv:443 "GET /api/users/ HTTP/1.1" 200 None
12:18:06 INFO User xxx successfully imported to database
12:18:06 INFO 127.0.0.1 - - [2024-11-20 12:18:06] "GET /api/users/scan HTTP/1.0" 200 270 0.992075

I do see that the result from the https://plex.tv/api/users does contain this user, so even though they are removed from my Plex server, they still appear in the plex API and therefore get imported.

I did see from the response of the /api/users/ endpoint that the user in question does not have a server section, so this might be a way we can filter out these results:

    <User id="xxx" title="xxx" username="xxx" email="xxx" recommendationsPlaylistId="" thumb="https://plex.tv/users/xxx/avatar?c=1714937753" protected="0" home="0" allowTuners="0" allowSync="0" allowCameraUpload="0" allowChannels="0" allowSubtitleAdmin="0" filterAll="" filterMovies="" filterMusic="" filterPhotos="" filterTelevision="" restricted="0"></User>
    <User id="xxx" title="xxx" username="xxx" email="xxx" recommendationsPlaylistId="" thumb="https://plex.tv/users/xxx/avatar?c=1729524846" protected="0" home="0" allowTuners="0" allowSync="0" allowCameraUpload="0" allowChannels="0" allowSubtitleAdmin="0" filterAll="" filterMovies="" filterMusic="" filterPhotos="" filterTelevision="" restricted="0">
        <Server id="xxx" serverId="xxx" machineIdentifier="xxx" name="xxx" lastSeenAt="1732105087" numLibraries="2" allLibraries="0" owned="1" pending="0"/>
    </User>

@zbejas
Copy link

zbejas commented Nov 22, 2024

I would like to add that when that removed user is readded, the user won't get an expiration timer set on them.

I don't know if it has anything to do with the user api, or it just fails to cause the user is already "added". It would be nice if the Server tags were checked since the new friend system messed everything up.

@t-abraham
Copy link

I think it's more into a Plex and old and new api issue...

Perhaps this thread will be helpful for the developers. Comment 4 talks about it

Removed access to my PMS for some users but they still show in XML file?

@EarthSalamander42
Copy link

Is it not related to the fact they're still friends of the server owner although not having an access to the server anymore?

@0penSourcerer
Copy link
Author

Is it not related to the fact they're still friends of the server owner although not having an access to the server anymore?

No. Many of these users I was never "friends" with in the Plex network...they were created solely as tests to test Wizarr with. What you're describing has zero relevance to the issue at hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants