HabitRPG / habitica

A habit tracker app which treats your goals like a Role Playing Game.
https://habitica.com
Other
11.84k stars 4.05k forks source link

all tags (filters) deleted from `tags` array and tasks #10272

Closed Alys closed 3 years ago

Alys commented 6 years ago

In the Report a Bug guild, Sora (8e421e84-1e5d-4961-8d6c-fb33d751d795) reports:

"My filters suddenly disappeared both from the list and the task."

"I was editing a few to-dos and when I clicked the tags for one of them, they just weren't there. At first I thought I had clicked the "clear all filters" button but I have been told that's not how that function works. I was on the website but I usually use the ios app as well, although I don't think I was using it at that moment"

I confirmed in the database that the tags array in their user document is empty, as are the tags arrays in all of their tasks. Nothing relevant is showing in Loggly for their account so I don't think it will be possible for us to work out how this happened but I'm logging it here in case we see other reports of it.

Alys commented 6 years ago

There was an earlier report of this which I've reconstructed from data I've been saving from the Report a Bug guild:

Tanya (0d3ec2d8-bd44-4aed-9706-ebab1abb0ab0) 2018-03-27: "All of my tags disappeared. I had maybe 10 of them, and now everything's just one big jumbled list. :-("

shanaqui: "That sounds weird! Can you give us more details? Do you mean your tasks became untagged, or that the tags themselves disappeared from the options that let you filter by tags?"

Tanya: "The tags disappeared from the menu. None of my tasks are tagged because there are no tags to choose from. Even my challenge tag is gone"

SabreCat: "I can confirm from a peek at your tag data that you have no tags anymore! They've all been deleted... When did you first notice this had happened? Were you doing any tag management beforehand? If so, was it on Habitica's Web site, the Android app, or iOS?"

Tanya: "I reported my missing tags the day after they disappeared. [That would make it between about 2018-03-25 and 2018-03-27] I'm pretty sure they disappeared right after I did some tag maintenance. I added two new ones, and I may have deleted one or two old ones. (I cycle through projects fairly consistently, so I frequently change my tags.) It was right after I saved my changes that I started seeing the problem."

shanaqui: "You didn't let Sabe know which device you were using, which might be useful for troubleshooting -- can you confirm whether it was web, Android or iOS?"

Tanya: "Oh, sorry. I generally use the web app. Does it matter that I pull it up on several different computers? I was on one of my work computers when I noticed that the tags had disappeared. I occasionally have a hard time loading Habitica on those computers, so I didn't worry too much until I loaded it again at home and saw that they were all missing."

Tanya reported again about 24 hours ago: "My tags keep disappearing. This time it's only one of them, but last time it happened ALL of my tags disappeared. Is there anything I can do to prevent this? (I use the website exclusively, but I access it from multiple PCs.)"

Alys commented 6 years ago

There's nothing in our server logs for Tanya from 2018-03-25 and 2018-03-27. The earliest log record still in Loggly is 2018-03-28 so I think we've missed our chance to find any errors that might have happened. For the past three days, there's a couple of "Your session is outdated" errors but nothing that would explain another tag going missing then.

SabreCat commented 6 years ago

Hasn't come up in a while; might have been some intermittent server-related issue? Closing for now, will reopen if reports resurface!

Alys commented 6 years ago

Another report of this from Tanya (0d3ec2d8-bd44-4aed-9706-ebab1abb0ab0). The full conversation is below with the most important parts bolded.

Tanya: "My tasks have lost all their tags. I've had problems with my tags disappearing twice before. Both of those times, all of the tags disappeared from the menu. This time the tags are still there, but there are no tasks sorted under them."

SabreCat: "I can confirm that of all your tasks, only 17 have any tags, and that's only a small fraction of your overall count. I wonder if this is a bug that crops up when you have a very large number of tasks, and that's why we haven't seen it very often..? I'm working on pulling a backup, so I'll see if I can get those tags re-applied via that method, but it may take a little while. In the meantime, if there are any tasks that can be pruned from your lists, doing so might help Habitica run a bit smoother for you overall!"

Tanya: "This time, yes, I do have a lot of tasks/tags going, but the last time it happened I only had 6 tags and far fewer tasks. I don't think quantity is the issue. Thank you for all your help! Also, if it's labor-intensive, please don't worry about restoring the old tags. It's not ideal to have everything untagged, but I actually kind of hate the new checkboxes in the menu (I miss my buttons!), so since my tags started disappearing I've been labeling my tasks with names that I can just Ctrl+F. I often bypass the menu entirely. Your time is better spent on site maintenance and maybe figuring out what's happening here? I can do my own task sorting."

SabreCat: "OK, I'll leave off doing anything exhaustive with the backups, then. I seem to recall that in the past, when you had tags delete themselves or the like, it was part of a flow where you were going back and forth between a mobile app (iOS, was it?), and the desktop--was that the case this time?"

Tanya: "I don't go back and forth between desktop and mobile app, but I do use many, many different desktop computers. So I log in on many desktops, but I almost never use the app."

SabreCat commented 6 years ago

It has to be something to do with the multiple browsers/computers, given that's an unusual flow (a couple computers yes, "many, many" probably pretty rare) and we haven't seen this happen to anyone else. Pretty baffling, though. How are we ending up sending all those delete/task-edit updates without the user requesting them? :\

SabreCat commented 6 years ago

Got a new report of this today:

Transcender (e64eedd4-d51c-4cdc-8635-a063fd22a62c)

I was editing my tags and deleting some of them. The moment I clicked save edits, all tags disappeared! Even the challenge tags were deleted.

Looking at logs, there is a 401 NotAuthorized: Your session is outdated. Please refresh or sync. followed by a series of 404 NotFound: No tag item was found with given id....

ETA: User doesn't have multiple Web sessions, but reports they use iPhone, iPad, and Windows PC (the issue hit while using the PC).

@TheHollidayInn theorizes this is caused by an empty tags array being sent with a user update. If we can spot where it's possible for that to happen...

veeeeeee commented 3 years ago

Closing for now; please reopen if issue is reported again.