Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Universal Viewer locks web container in local dev environment #348

Open
1 task
laritakr opened this issue Apr 22, 2024 · 3 comments
Open
1 task

🐛 Universal Viewer locks web container in local dev environment #348

laritakr opened this issue Apr 22, 2024 · 3 comments
Assignees

Comments

@laritakr
Copy link
Contributor

Story

When in the local dev environment, you cannot visit a show page for a work that uses the universal viewer. The web container totally freezes, and requires a stop and restart.

As a workaround for hyku, you can:

  • update the iiif_viewer? method in tenant_config to bypass the universal viewer entirely but still use the flipper to test other IiifPrint behavior.
  • set the flipper to use PDF.js rather than the universal viewer to bypass the behavior
      def iiif_viewer?
return false
        Hyrax.config.iiif_image_server? &&
          representative_id.present? &&
          representative_presenter.present? &&
          iiif_media? &&
          members_include_iiif_viewable?
      end

To duplicate the problem, fire up the hyku application for local development.

  • Set the flipper to use the universal viewer.
  • Create a work with an attached image
  • Visit the work's show view
  • web container will lock up entirely

Acceptance Criteria

  • Able to view a show page for a work with universal viewer in local development

Notes

@aprilrieger aprilrieger self-assigned this Apr 22, 2024
@aprilrieger
Copy link

aprilrieger commented Apr 24, 2024

Well I chased it down to here:

config.iiif_info_url_builder = lambda do |file_id, base_url|
    uri = Riiif::Engine.routes.url_helpers.info_url(file_id, host: base_url)
    uri = uri.sub(%r{/info\.json\Z}, '')
    # Comment this next line to allow universal viewer to work in development
    # Issue with Hyrax v 2.9.0 where IIIF has mixed content error when running with SSL enabled
    # See Samvera Slack thread https://samvera.slack.com/archives/C0F9JQJDQ/p1596718417351200?thread_ts=1596717896.350700&cid=C0F9JQJDQ
    uri.sub(/\Ahttp:/, 'https:')
  end

Screenshot 2024-04-22 at 23 44 11

@aprilrieger
Copy link

@laritakr and I were talking about this in a DM so moving here for visibility, @kirkkwang LaRita was wondering if:

That’s amazing! So happy to have progress in tracing it.
Kirk does this mean anything to you? Curious if you have any ideas on a permanent workaround.
Screenshot 2024-04-23 at 20 31 40

@kirkkwang
Copy link
Contributor

Thanks for chasing it down @aprilrieger, this doesn't ring a bell right away but I'll have to look into the riiif gem itself at that controller to see what's going on. Still very strange that this happens locally but not in a deployed environment. I was chasing it down to https://github.com/sul-dlss/riiif/blob/main/app/transformers/riiif/abstract_transformer.rb#L20 which then led to here https://github.com/sul-dlss/riiif/blob/main/app/services/riiif/imagemagick_command_factory.rb#L29-L43 and then finally this spot was the last point before stalling https://github.com/sul-dlss/riiif/blob/main/app/services/riiif/imagemagick_command_factory.rb#L82-L85. Hopefully we can link up tomorrow or so and compare notes and knock this one out.

@laritakr laritakr changed the title Universal Viewer locks web container in local dev environment 🐛 Universal Viewer locks web container in local dev environment May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants