avalonmediasystem / avalon

Avalon Media System – Samvera Application
http://www.avalonmediasystem.org/
Apache License 2.0
93 stars 51 forks source link

[BUG] Create thumbnail button breaks after switching items #5407

Closed masaball closed 10 months ago

masaball commented 11 months ago

Describe the bug On a media object with multiple items, the create thumbnail button works on initial page load, but generates a console error "player.player is null" after a new item is selected from the structured navigation.

To Reproduce Steps to reproduce the behavior, including the results:

  1. Go to https://avalon-dev.dlib.indiana.edu/media_objects/g158bh28p
  2. Click on 'Create Thumbnail'
  3. See that the modal pops up and populates
  4. Close modal
  5. Select a new item from the structured navigation
  6. Click on 'Create Thumbnail'
  7. Modal does not pop up
  8. Check browser console to see error

Expected behavior Modal pops up and functions properly after switching items, no error is logged to the console

Screenshots/Screen Recording Private Zenhub Image

Environment (please complete the following information):

Release: 7.7

elynema commented 11 months ago

When you first load the page, the JS for the modal loads with details of first section. When you switch sections, there is no code to update the JS for the modal to the data for new section. So this is likely causing the issue.

elynema commented 11 months ago

Share button does have some functionality to make it work whenever the canvas/section is switched. There is an event it's listening for to get the latest info.

joncameron commented 10 months ago

Setting the thumbnail is working for me for the first section, but switching to any other section and launching the Create Thumbnail modal only shows a broken image icon. The video below is a bit janky but I was able to reproduce this and get this in the modal:

Screenshot 2023-11-03 at 7 45 38 AM

Console error: GET https://avalon-dev.dlib.indiana.edu/master_files/6d56zw601/poster?offset=73.541672&preview=true [HTTP/2 500 800ms]

https://github.com/avalonmediasystem/avalon/assets/1406618/08e12519-29a9-4546-aac4-83bad4bef3aa

joncameron commented 10 months ago

Is this a separate bug where the poster offset image from the stream can't be pulled properly?

masaball commented 10 months ago

Yes, this seems to be a different bug. The information for pulling the poster image is populated correctly in the request, but the extract_frame method is bombing. Here's the server log: Private Zenhub Image

I'd assume that the log mentioned in the runtime error is the ffmpeg logs but I'm not sure where those live.

Checking another media object on avalon-dev, this may be an issue specific to this object or at least not affecting all objects because it is working on this item.

joncameron commented 10 months ago

@joncameron to close this and create a new bug issue for this frame extraction error.

joncameron commented 10 months ago

Created #5455 for followup on the frame extraction error.