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

Can't delete user #1042

Open
1 task done
giuseppe99barchetta opened this issue Oct 21, 2024 · 14 comments
Open
1 task done

Can't delete user #1042

giuseppe99barchetta opened this issue Oct 21, 2024 · 14 comments
Labels
bug Something isn't working more information needed

Comments

@giuseppe99barchetta
Copy link

Description

Can't delete a local Jellyseer user from the users page.

"message": "Something went wrong deleting the user"

Version

2.0.1

Steps to Reproduce

  1. Go to users page.
  2. Try to delete a local user.
  3. "message": "Something went wrong deleting the user"

Screenshots

Screenshot 2024-10-21 alle 18 03 08

Logs

2024-10-21T16:03:04.418Z [error][API]: Something went wrong deleting a user{"errorMessage":"Cannot read properties of null (reading 'id')","userId":"3"}

Platform

desktop

Device

MacBook Pro M2

Operating System

MacOs 15.1

Browser

Safari

Additional Context

No response

Code of Conduct

  • I agree to follow Jellyseerr's Code of Conduct
@giuseppe99barchetta giuseppe99barchetta added awaiting triage This issue needs to be reviewed bug Something isn't working labels Oct 21, 2024
@gauthier-th
Copy link
Collaborator

gauthier-th commented Oct 21, 2024

I can't reproduce this on a clean instance.

Anything specific on your instance ? Can you reproduce this every time?

@giuseppe99barchetta
Copy link
Author

I can't reproduce this on a clean instance.

Anything specific on your instance ? Can you reproduce this every time?

Yeah, tried to reboot the docker instance and same error, also on chrome on Windows. Nothing particular about my instance, running docker inside portainer

@Fallenbagel
Copy link
Owner

I can't reproduce this on a clean instance.

Anything specific on your instance ? Can you reproduce this every time?

Yeah, tried to reboot the docker instance and same error, also on chrome on Windows. Nothing particular about my instance, running docker inside portainer

Does the error occur for every local user you create and when you try to delete them?

@giuseppe99barchetta
Copy link
Author

I can't reproduce this on a clean instance.
Anything specific on your instance ? Can you reproduce this every time?

Yeah, tried to reboot the docker instance and same error, also on chrome on Windows. Nothing particular about my instance, running docker inside portainer

Does the error occur for every local user you create and when you try to delete them?

New user withouth any request history can be deleted normally. I'm trying to delete a user with 280 request in history

@Fallenbagel
Copy link
Owner

Fallenbagel commented Oct 21, 2024

I can't reproduce this on a clean instance.
Anything specific on your instance ? Can you reproduce this every time?

Yeah, tried to reboot the docker instance and same error, also on chrome on Windows. Nothing particular about my instance, running docker inside portainer

Does the error occur for every local user you create and when you try to delete them?

New user withouth any request history can be deleted normally. I'm trying to delete a user with 280 request in history

Might be a corrupted user. Ill try to see if i can replicate. Meanwhile you could stop jellyseerr and edit db and delete user ID=3

@giuseppe99barchetta
Copy link
Author

I can't reproduce this on a clean instance.
Anything specific on your instance ? Can you reproduce this every time?

Yeah, tried to reboot the docker instance and same error, also on chrome on Windows. Nothing particular about my instance, running docker inside portainer

Does the error occur for every local user you create and when you try to delete them?

New user withouth any request history can be deleted normally. I'm trying to delete a user with 280 request in history

Might be a corrupted user

How can I solve this? I want to delete all related requests

@Fallenbagel
Copy link
Owner

Meanwhile, you could stop jellyseerr and edit db and delete user ID=3

@funkyfunked
Copy link

Had the exact same problem. You need to edit the file db.sqlite3 in your config/db folder and delete the data for the user. Just google how to edit a sqlite database with a gui for easy of use, edit the dq.sqlite3 with it, delete the user, start jellseerr again - all good again, all requests by this user are gone :)

@gauthier-th
Copy link
Collaborator

Had the exact same problem.

Same error? Was that an user with a lot of requests too?

@funkyfunked
Copy link

funkyfunked commented Nov 6, 2024

Same error? Was that an user with a lot of requests too?

Yes, a new jellyseerr user with about 400 movie requests within 2 days. After that i wanted to delete the user but was met with the error.

Exact error was:

Something went wrong deleting a user{"errorMessage":"Cannot read properties of null (reading 'id')","userId":"2"}

@gauthier-th
Copy link
Collaborator

Thanks. I'll take a look and see if I can replicate.

@gauthier-th
Copy link
Collaborator

I tried to create a new user with ~1000 requests and then delete the user. I couldn't reproduce the issue, the user and its requests are successfully deleted.
Any idea how can i reproduce this so it can be fixed?

@badaz
Copy link

badaz commented Nov 20, 2024

Hello, I just encountered the same bug.

Jellyseerr v2.1.0

For me it is a local user that I created to use with suggestarr. It did a dozen of requests which I all deleted using the UI. Now when I want to delete the user I'm getting Something went wrong deleting a user {"userId":"8","errorMessage":"Cannot read properties of null (reading 'id')"}

I'm running jellyseerr in docker on a Synology DS224+. I tried restarting the container and am getting the same error.

The call being made is the following (url and session id obfuscated) :

curl 'https://my.jellyseerr.url/api/v1/user/8' \
  -X 'DELETE' \
  -H 'accept: */*' \
  -H 'accept-language: fr,fr-FR;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6' \
  -H 'cache-control: no-cache' \
  -H 'cookie: connect.sid=some-session-id-i-guess' \
  -H 'dnt: 1' \
  -H 'origin: https://my.jellyseerr.url' \
  -H 'pragma: no-cache' \
  -H 'priority: u=1, i' \
  -H 'referer: https://my.jellyseerr.url/users' \
  -H 'sec-ch-ua: "Microsoft Edge";v="131", "Chromium";v="131", "Not_A Brand";v="24"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0'

EDIT : I managed to delete the user by stopping the container, opening the sqlite DB in dbeaver, deleting the line in the user table and restarting the container.

EDIT 2 : from what I see here in the code, user is found when first fetched otherwise the error message wouldn't know the user id. This is very strange indeed.

@gauthier-th
Copy link
Collaborator

EDIT 2 : from what I see here in the code, user is found when first fetched otherwise the error message wouldn't know the user id. This is very strange indeed.

Not exactly, the error is displaying req.params.id, which is retrieved from the URL params from Express.
Without the full stack trace, I'm not sure to find the cause of this bug, because I don't see any reason for it to happen.

@gauthier-th gauthier-th added more information needed and removed awaiting triage This issue needs to be reviewed labels Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working more information needed
Projects
None yet
Development

No branches or pull requests

5 participants