New annotations won't save on certain observations

Same thing with this observation:

Here’s another one, two annotations save and two doesn’t.
So, would be nice to see fix of it.

Platform: Website

Browser: Opera

URLs (aka web addresses) of any relevant observations or pages:

Screenshots of what you are seeing:
Peek 2023-06-27 12-17

Description of problem: In the specific linked annotation (and nowhere else that I can tell) selecting the “Alive or Dead” annotation seems to submit a value, but have it rejected for some reason; a 400 error is shown in the console.

Edit: Forgot to specify, this has been happening since the day I put it up, so almost a week by now.

is there more text that accompanies this error code? there are several reasons that may correspond with this code, and it might be useful to know what the error reason was in addition to the error code.

are you having the problem only on this particular observation? are you able to add other annotations (ex. life stage) to this observation?

I tried again to confirm Life stage also doesn’t work. Obviously Evidence of Organism worked originally though.

Not a lot of info given:

Screenshot from 2023-06-27 12-52-43

This is the POST payload (for Life Stage):

it’s possible that the annotations are already stored in the system but that the system isn’t showing them. try making another change to the observation. for example, go to the Data Quality Assessment section, and click the thumbs up on the Data is Accurate item. this could trigger the observation to be updated and indexed, which could cause hidden annotations to be revealed.

1 Like

This happens to me constantly. They usually reappear ~5 seconds later but sometimes not at all. I just click them again. Usually it’s the new photos that I have just added to an observation that give me the hardest time. They do the exact same thing but tend to take twice as long to disappear and reappear.

I have noted this as well on a few of my obs
" Evidence of Presence" & &
“Alive or Dead” & “Evidence of Presence”
Some of these obs have been on for a few years already. I tried again now and still not accepting it.

since you had several of these, i updated the first of these by modifying one of the Data Quality Assessment items, and now the Evidence of Presence annotation is displayed.

Ok, so that does suggest it’s stored but not shown. It’s also not accessible to the search though (I still get this obvs when looking for stuff that is missing the Alive or Dead annotation in Identify).

right. because the index is not updated to reflect the actual contents of the database.

but if you do what i suggested to update the observation, it should also update the index. have you already tried this?

It probably would fix it - since I’m not in a rush with it I just thought I’d leave it be for now in case it helps developers debug what can cause the index to get out of sync. Although it’s probably just mostly random and not something about the specific observation.

i think this is a well-known issue that unfortunately is not easy to debug because it’s not known how to reliably reproduce the situation. i doubt that leaving your particular observation the way it is is going to help developers research the problem any better, but it’s up to you if you want to leave it the way it is.

here’s a related bug report (which moderators might want to merge this one into):

Gotcha. I didn’t realize this was such an old issue (I skimmed the recent reports before posting but didn’t go too far back) :) Forced a reindex, it all shows now, so marking as solved. We can keep the previous one as a central hub indeed.

Thanks @pisum for your input and advice.

Problems like this are really easy to reproduce for me, but I don’t know if there is an easy fix. One way to get quirky behavior is to create a race condition where you use hotkeys to near-simultaneously add two incompatible annotations, like ‘no evidence of flowering’ and ‘flowering’. It has to pick one, usually the first but maybe sometimes not. The same thing can happen if you submit an annotation that is incompatible with an annotation that hasn’t loaded yet. Sometimes if you scroll to a new observation in identify too fast, the annotation gets added to the new observation (this particular quirk happens to me most with observation fields, actually). It may also be possible to get quirky behavior if you add a currently-legal annotation and then near-simultaneously add an ID to a taxon for which the ID would not be legal.

I think they’re all some kind of race condition thing and while some of those seem for sure fixable in a pretty standard way (the quickly flipping to a new observation version), the ‘easiest’ way to fix the others is probably just to make the site faster so that race conditions happen less.

Moved the above conversation to this original bug report and changed the title to reflect the general issue.

are you saying that you can reliably reproduce the exact kind of situation described in this thread, or are you saying you can produce other kinds of quirkiness?

i tried the first couple of things you described (submitting incompatible annotations at roughly the same time and submitting annotations while switching quickly between observations), and i’m not able to reproduce the situation described in this thread.

if you can produce such a situation, could you capture a video of what you did and also provide an example of the observation where the annotation has been added but the observation does not show the annotation because no reindex was triggered? (feel free to use my observations, if you need some to experiment on.)

1 Like

I haven’t been able to replicate using these methods either.

At this moment I don’t seem to be getting enough lag to get it to do anything weird for me :man_shrugging: I can try again next time I’m experiencing more lag. I don’t know about how to tell if it is a re-indexing issue specifically or just like, not registering?

There is also a possibly related issue that I was having like a week or two ago where if I opened the annotations page in identify on an observation where the observer only allowed curators to add observation fields, then arrow-keyed to an observation that should have allowed me to add observation fields, it still would say the user only allowed curators to add observation fields, until I closed the modal and reopened it. I think I could also produce this issue in reverse (letting me add fields to things I should not have been able to), except I don’t know if the observation fields I accidentally illegally added were actually saved or not. I’m not sure whether that was lag-related or not, but as I recall it happened pretty reliably. I don’t think that would be indexing related though.