-
Notifications
You must be signed in to change notification settings - Fork 771
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: Most videos are bookmarked, without explicitly being done. #635
Comments
This is a pretty weird bug. we can't reproduce it in development.
|
The only way to reproduce this bug in dev would be to modify the addedBookmark state with wrong data that doesn't exist in database. ! Not sure why this bug would appear in production, we'll probably have to look through the data in prod. Right now in dev we are using less example data and in production we have more data so maybe the the current code which works for a single data item, might be producing this bug, when used with a lot of data.
|
Were you able to get the cause of this problem? |
I don't see this problem in development, it probably has something to do with the production database. Go ahead and work on it, if you'd like to. |
Picking up this issue |
So the issue here is even my This is because there isn't any constraint while fetching all the contents. There must be a constraint that makes sure we are fetching the bookmarks of the currently logged-in user only. |
cool. nice job bro. |
@uttamsutariya how did you found out that issue is with bookmark:true by adding more videos or by creating a diff user? |
Initially, I didn't do anything in my local cms. I saw the prisma error message, then I tried to see the network request to remove the bookmark. While doing this I saw that for each request the userId is not unique & not mine. So I felt that there is some issue with all the the fetched bookmarks. Then I saw all the bookmarks have different different userId. Now at that point I understood the problem that while fetching the content, the bookmarks are not being fetched of only mine, it's being fetched without any constraint of currently logged-in user. So this way then I tried to create few users in my local db & resolved this issue. So this kinda debugging skills you will eventually learn while working with prod databases & stuffs. @hkirat Can you please review this PR as many people are struggling with the unexpected behaviour of bookmarks that they haven't added. |
Describe the bug
Videos till week-12 are bookmarked by default, and errors out if bookmark being removed
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected:
a) No previous bookmarks, which I didn't do.
b) No error if uncheck it.
Screenshots or GIFs
Works fine for new bookmarks
The text was updated successfully, but these errors were encountered: