usegalaxy-no / galaxyadmin

A repository for managing the work of the usegalaxy.no GalaxyAdmin team
0 stars 0 forks source link

Problem updating information of user with the server #92

Open tothuhien opened 1 year ago

tothuhien commented 1 year ago

Some users encounter the issue (probably after deleting lots of data from their history)

An error occurred while updating information with the server. Please contact a Galaxy administrator if the problem persists.

CC7FE0485F48461BB14B4DCD36E2BD99

The issue seems to be resolved after deleting browser cache, but not sure what caused the problem

kjetilkl commented 8 months ago

I have been able to consistently reproduce errors similar to this on our test-server now. The red error dialog appears when the web browser client makes API-calls to Galaxy in the background and gets an unexpected response in return (i.e. not a JSON response). In this particular case, the proxy server in front of Galaxy has returned the "down for maintenance page" because Galaxy was either down or took too long to respond. However, it seems that such responses can be cached and cause problems again at a much later time, even if the Galaxy server is running smoothly then.

Here are a few steps that can be followed to reproduce such errors:

  1. Open Galaxy in a web browser.
  2. Stop the Galaxy server. This may lead to the red error dialog appearing right away in your web browser, since Galaxy is constantly making API-calls in the background.
  3. If you now try to open Galaxy in another tab, the proxy will return the "down for maintenance page".
  4. If you press the "view dataset" button on a dataset in Galaxy, it will show the "down for maintenance page" instead of the dataset, since the Galaxy server is down. (Note that the images on this page won't work now).
  5. Click on the name of a dataset to expand it and show more information. This triggers an API-call in the background, so the red error dialog will appear since Galaxy is down and cannot respond properly.
  6. Restart the Galaxy server and wait for it to come up again
  7. Click on another dataset to expand it. This should work fine since Galaxy is responding again. Clicking the "view dataset" for this dataset should also work.
  8. Pressing the "view dataset" button for the first dataset again may lead to the same "down for maintenance page" being displayed, if this response has been cached by the browser. It should work if you try to view the dataset in a "private/incognito" window or a different browser that hasn't cached the page.
  9. Clicking on the dataset name of the first dataset to expand it may lead to another red error dialog if this API-call response has been cached by the browser.
  10. Press the "details" button in the red dialog and find the "url" attribute. Open this URL in another tab. This will probably still show the "down for maintenance page" (without images). If you open the same URL in a "private/incognito" tab or other browser, it should work.
  11. Reload the "down for maintenance page". The browser should now contact Galaxy again and get a proper JSON response, which will replace the improper response in the cache.
  12. If you now try to click on the dataset name to expand it, it should no longer give you the red error dialog.

I don't know the particular circumstances that caused the user to get this error, but my hypothesis is that the Galaxy server was unresponsive at some point (either because we deliberately restarted it or it was slow to respond). During this time, their Galaxy client made an API-call to Galaxy (which can also happen by itself if you just leave your browser window open) and the improper response returned by the proxy was cached and reused later. At least this hypothesis explains why the problem went away when they cleared their browser cache.