dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Infinite Load Times When Editing an Item or Browsing DSpace

Open aseyedia opened this issue 1 year ago • 3 comments

Describe the bug

This is a bug I have been struggling with for a long time before I realized I could replicate it on the demo site. Here it is.

https://github.com/user-attachments/assets/15a9c87b-ae60-4277-bfba-e437efce5ba9

When browsing DSpace Angular as a logged-in administrator and particularly when navigating the "Edit Item" tab(s) (or even just clicking "Edit Item" once), we experience persistent issues with infinite load times and sluggishness in the DSpace frontend. Often this will require the user (admin) to refresh more than once to get the frontend to work, and this issue adds a considerable amount of time to the use of DSpace.

Sometimes, what I believe to be the same underlying issue will produce the "Error Loading Communities" error when navigating the homepage.

There's an idiosyncrasy with this bug: It will not (or will rarely) reproduce when Chrome DevTools is open. It doesn't matter if you pop the window out, or don't have the Network tab open. It just won't happen (as often). This makes debugging incredibly difficult because you can't even see what is being printed in the console. Regardless, I have taken the time to fix some of the issues showing up in the console (e.g. messages having to do with ePerson misconfiguration), and disabling some of the customizations we've made to our site, still to no avail. This also made it difficult to detect the issue with Angular DevTools. I couldn't find anything in the backend log either, even after tinkering with the log4j configuration.

Something else that makes this issue difficult to diagnose is that it tends to occur more frequently and is more severe on a production instance than a development instance of DSpace. For example, whereas I may only run into this issue once after refreshing, on the production instance, I will run into this issue and have to keep refreshing multiple times. Angular DevTools, which I have attempted to use to understand this issue better, does not work on a production instance, only development instances.

Environment

Like I said, this issue is reproducible on the demo site, but I'm including some potentially important information about our environment down below:

  • DSpace Version: 8.0
  • Web Browser: Google Chrome 129.0.0.0
  • User Operating System: macOS Sonoma 14.7

To Reproduce

Steps to reproduce the behavior:

  1. Do not open Chrome DevTools.
  2. Log in as admin.
  3. Click on any item.
  4. Click on 'Edit this Item.'
  5. If you haven't encountered the error yet, click around on the tabs until you eventually run into the infinite loading issue.

Expected behavior

I don't mind an occasional hiccup, but this bug is so persistent on our production instance that it's unrelenting and makes actually using DSpace incredibly cumbersome. Our admin has to repeatedly refresh the page in order to get it to work, and according to her, something that should only take 30 seconds will take 10 minutes.

So the expected behavior is the occasional hiccup and not the complete inability to consistently use the app.

Related work

I have made a couple of issues before I knew this was reproducible on the demo site, so not all of them contain strictly relevant information, but I have listed them below, as well as any PRs or other issues that I think might be of importance:

  • https://github.com/DSpace/DSpace/issues/9884
  • https://github.com/DSpace/DSpace/issues/9879
  • #3252
  • https://github.com/DSpace/dspace-angular/pull/3253
  • #2924

aseyedia avatar Oct 28 '24 15:10 aseyedia