Closed seanluyk closed 3 years ago
Tested on Ubuntu 18.04 / Firefox 82.0.3. Able to reproduce.
According to Firefox console, there is a JavaScript exception causing the window to close.
Todo: try to reproduce in a dev environment.
Hypothesis, there might be an invalid number in one of the time spans, will check.
Uncaught TypeError: peaks.segments.add(): startTime should be a valid number
@seanluyk
Summary of what I've found: if the start time and end time are the same exact time then the structural editor with the waveform fails. For example
<Span label="Sparshott reads “Untitled”" begin="00:00:10.00" end="00:00:10.00"/>
.
Questions:
Details:
I'm able to reproduce in the following manner.
The window closes and no edits are allowed.
Thanks for your investigation @jefferya, I believe these are data entry errors, and that they explain why the waveform editor is not working properly. I'll explain this to the users and let you know if any other issues come up!
Just took a look at the XML and something weird is going on. If you compare the XML that appears in the source file used for batch ingest of this item with what is now appearing in the advanced structural editor, you'll see some differences:
Original Source XML in Dropbox
<Div label="Francis Sparshott"> <Span label="Birney introduces Francis Sparshott" end="0:09:14" begin="0:09:06"/> <Span label="Sparshott introduces and reads “Wasp Winter”" end="0:09:56" begin="0:09:15"/> <Span label="Sparshott reads “Dream Poem”" end="0:10:24" begin="0:09:59"/> <Span label="Sparshott reads “Untitled”" end="0:10:52" begin="0:10:25"/></Div>
What appears in the advanced editor
<Div label="Francis Sparshott">
<Span label="Birney introduces Francis Sparshott" begin="00:00:09.00" end="00:00:09.00"/>
<Span label="Sparshott introduces and reads “Wasp Winter”" begin="00:00:09.00" end="00:00:09.00"/>
<Span label="Sparshott reads “Dream Poem”" begin="00:00:09.00" end="00:00:10.00"/>
<Span label="Sparshott reads “Untitled”" begin="00:00:10.00" end="00:00:10.00"/>
</Div>
The spans seem to have been transformed during the ingest process
@jefferya just to add to this discussion, we're getting these kinds of errors not just with legacy items (i.e. those created prior to the Avalon upgrade) but also with newly created ones, e.g. https://era-av.library.ualberta.ca/media_objects/c821gm09w
In this case, it's not possible to edit the final timestamp properly and add more
@seanluyk I've done a superficial investigation.My hypothesis is the input validation for the structural components, in the past, may have missed certain scenarios (e.g., Dec 1st comment) and allowed the input but today, with the current v6.5 Avalon, the input triggers failures. I need to test this more fully. The 6t053g96s
example needs a bit more investigation on my end (a hypothesis below)
Details:
Regarding https://era-av.library.ualberta.ca/media_objects/c821gm09w, there's something weird. The last span has an end point of 01:64:0-3586.54
and the Avalon may be having a problem with the time format (I don't recognize the format). The JSON input to the waveform structure editor is the following https://era-av.library.ualberta.ca/master_files/x059c857c/structure.json:
{"type":"span","label":"Jones performs \"At Ease in Order or In Ruins…”","begin":"00:59:52.40","end":"NaN:NaN:NaN"}
Regarding 6t053g96s (above), could the the missing 00
in the input (e.g., 0:09:06
) be the problem?
@jefferya that weird last span seems to be what Avalon is adding. Even if you try to create an end span that's 1 ms after the begin span, it doesn't let you update it. We've noticed that spans in the new editor tend to be problematic at the end of a recording, so I'm not sure if that's significant. Also of note in c821gm09w is that no XML appears in the "advanced editor". With other problems like these, we've been able to fix them by changing the spans there. Not sure if the XML is supposed to populate from entry in the waveform editor or not?
@seanluyk clarification, when the structural metadata is added, is it added via the UI (i.e., the waveform editor or the advanced editor)? Or can the structural metadata be added via a batch ingest? Also, is the "upload" UI element used to attach structural metadata? The questions aim to help understand which approaches are used to add structural metadata and which I should focus on when testing.
Second question, is there some preexisting documentation for ERA A+V that outlines the steps to add structural metadata? I'd like my tests to as much as possible follow what that of others. However, if the nothing written exists, I'll follow the direction the UI intuitively takes be based on examples.
c821gm09w: is there an urgent need? There might be way to fix the time via the api as I suspect the problematic time is causing the UI problems (assuming the structural metadata wasn't added via the upload button).
Structural metadata can be added via the UI and also via batch ingest.
Sorry, I sent before completing the message. Structural metadata can be added via the UI and also via batch ingest.
We don't have specific instructions for adding structure metadata for ERA A+V but here are the documentation pages we use:
@anayram very helpful, thank you.
For testing batch ingest with structural metadata, is there an item in dropbox or google drive that you can point me to as I'd like to grab the batch ingest plus structural metadata file to use for local testing. No rush.
@jefferya no problem, here are the test files I use: https://drive.google.com/drive/u/0/folders/1_knq9iHuJqitilTOCnhHFRxEVcUSuMOS
Use the files highlighted here:
@jefferya we've experienced issues with both structural metadata added via batch and newly created metadata in the UI using the waveform editor. I don't believe we've had many issues when using the advanced editor
Note:
Updated the Structural Metadata Editor in Avalon with fixes and dependency upgrades
Here are two items where the waveform editor is causing issues:
SW039a1 - (it is listed in ERA-AV as SW039a) https://era-av.library.ualberta.ca/media_objects/c821gm09w SW050b2 - (it is listed in ERA-AV as SW050a) https://era-av.library.ualberta.ca/media_objects/j9602160s
"once I get up to about the 59 minute mark, the autofilled end times and start times begin corrupting to 01:64:0-3586.54"
Able to reproduce
Tried with upstream version v7.1.1 (test if updated structural metadata editor (SME) JS code fixes problem)
Try update v7.2 (test if updated structural metadata editor JS code fixes problem)
That's excellent news, Jeff. I'm hoping that this fixes the issue! Let me know if I can help with any testing
Diagnostics:
Problematic code:
Upstream fixed by:
Tried using the following commit:
Uncaught TypeError: nextProps.structureIsSaved is not a function
Next steps:
updates React Structural Metadata Editor (SME) to the latest version
update Ruby connector to support updated (SME):
@seanluyk @anayram To repair the problematic structural metadata produced by the Structural Metadata Editor (SME) in upstream v6.5 once this is in production:
Edit
on each timespan with an end-time beyond the 1hr mark, adjust end-time mark (if needed), and save timespanNotes:
advanced edit ==> raw xml
view and if the view lacks timespan structure then structural metadata is problematicraw XML
form as 01:01:61.000
(note: 61 sec) then no error is triggered. If viewed by SME, the time mark is displayed as 01:01:01.000
and saved as such (truncating 61 sec to 1 sec). Also, the media player when used with associated structural metadata does understand 61 sec. @jefferya I just did some testing and I'm not sure if this is completely fixed? I was able to add a new timespan to the SpokenWeb example in the object you shared with us, however, the changes don't appear in the advanced (XML) view
Sean and I met and verified the changes fix the problem.
To replicate
The window closes and no edits are allowed. May be item-specific so I'm wondering if this one of the items where the backfill script failed?