metacatui
metacatui copied to clipboard
Dataset is freezing on "Checking Authorization"
Describe the bug From @justinkadi on Slack
There's a PI that has access to a dataset, but his dataset is freezing on "Checking Authorization" (ticket). I've added his ORCiD into the permissions, but there are a lot of files in this dataset. Could the reason he's unable to access it be because there's so many files in the data package? Does it take time after I've added him into the permissions?
Hi all, I've emailed the PIs working on this dataset and now both of them say that they can't view the dataset anymore. I still see it on my end, so the data isn't lost, but they mentioned they don't see it in their "My Datasets" anymore. I've added them both into the sysmeta access policy just to be sure, and here's their ORCiDs. Rodrigo Rangel: https://orcid.org/0000-0003-4934-7016 Thomas Glass: https://orcid.org/0000-0001-7494-4918
To Reproduce Steps to reproduce the behavior:
- Unable to reproduce on our end
Additional context ResourceMap access policy:
<accessPolicy>
<allow>
<subject>http://orcid.org/0000-0001-7494-4918</subject>
<permission>read</permission>
<permission>write</permission>
<permission>changePermission</permission>
</allow>
<allow>
<subject>CN=arctic-data-admins,DC=dataone,DC=org</subject>
<permission>read</permission>
<permission>write</permission>
<permission>changePermission</permission>
</allow>
<allow>
<subject>http://orcid.org/0000-0003-4934-7016</subject>
<permission>read</permission>
<permission>write</permission>
<permission>changePermission</permission>
</allow>
</accessPolicy>
Thomas Glass is now able to view and edit his dataset.
Rodrigo Rangel is able to view the dataset, but is unable to edit it. He sent this picture of what he sees
For a while before today, Tom Glass was unable to view the dataset and found this error: Nothing was found for one of the following reasons: The ID urn:uuid:e289d154-9944-4153-852a-f1cc47fd1a2c does not exist. This may be private content. (Are you signed in?) The content was removed because it was invalid.
However now, he can see it
Previously, Rodrigo was stuck on this animation when viewing the dataset, but now he sees the "Error retrieving files for this data package".
This is the new dataset that was made by the PIs. I obsoleted the older bugged version with this new, published dataset: https://doi.org/10.18739/A2SJ19S9K
Thanks for the updates @justinkadi!
In working on a new feature, I found that there was a race condition going on when re-rendering the data set landing pages. The page sometimes starts to render before MetacatUI knows if a user is logged in or not, then re-renders when the logged in status has been checked. Sometimes listeners and other tasks are still running from the first render attempt when the second one starts, and this causes some inconsistencies and other problems.
I could imagine that this is the root cause of what the PI was experiencing, especially if they had a slow connection. This is likely why Rodrigo Rangel couldn't see the edit button even though he had edit permissions.
I added a fix to this in PR #2546 (though it was a quick fix - I think long-term we need to refactor the landing pages and how listeners work there). Since we couldn't reproduce this error initially, it will be difficult to know whether it's fixed or not with the next release.
@justinkadi, do you know what the difference is between the new dataset the PIs created vs. the old one they had trouble with?