metacatui
metacatui copied to clipboard
`Metadata: null` when retrieving series DOI link
Describe the bug
When retrieving a series DOI (for example: doi:10.24431/rw1k8fz), the metadata document returns as Metadata: null. Viewing the same dataset with the exact DOI version link directly does not show this issue (for example: doi:10.24431_rw1k8fz_20241021T144253Z.
Using the Inspector to disable using cached data seems to solve this issue, and everything loads just fine.
To Reproduce Steps to reproduce the behavior:
- Go to doi:10.24431/rw1k8fz
- Scroll down to
Files and Folders - See
Metadata: nullerror - If no error appears, refresh and return to step 3.
- Open Inspector and check Disable Cache
- Refresh page
- Metadata document should populate ok
Expected behavior Metadata document should load at all times
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Mac OS
- Browser: Firefox
- Version: 133.0
This was reported in Slack: https://dataoneorg.slack.com/archives/C2ASPD868/p1735581601890769
This is consistent across multiple browsers and versions for me (FF, Brave, Safari).
I spent a few minutes in the javascript debugger with this, and found out a few interesting tidbits.
- The
fileNameattribute in the model is indeed null after exiting the block on line 245 of DataItemView.js - Backtracing this to where that data comes from, I went all the way back to where the data package is loaded on line 216 of MetadataView.js
216 const dataOneObject = new ScienceMetadata({ id: this.model.get("id") });
When I set a breakpoint on line 216 and execute that line, I see that fileName is null:
dataOneObject.attributes.fileName: null
Interestingly, after setting that breakpoint and inspecting the property, if I then hit "Continue" in the debugger, then the property gets filled in and displays the title in the UI without a problem. But, if I don't stop in the debugger, then the Metadata: null shows up in the UI. So, there seems to be a timing issue where the values are not populated yet at render time, but delaying a second or so allows them to get filled in. As @iannesbitt said, it only seems to happen when the Cache is not disabled. Here's a quick video showing the effect:
https://github.com/user-attachments/assets/7de1f2bd-86e6-40e0-a988-286cda6504c5
Thanks for the report and investigation @iannesbitt and @mbjones! @rushirajnenuji, does this tie in with any of the other intermittent hierarchical data package bugs? Maybe the root cause is the same?