-
Notifications
You must be signed in to change notification settings - Fork 647
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
reload on connect in quizsummarypage; avoid possible error w/ missing… #12554
base: release-v0.17.x
Are you sure you want to change the base?
reload on connect in quizsummarypage; avoid possible error w/ missing… #12554
Conversation
Build Artifacts
|
Hi @nucleogenesis, following the directions in 'Path 1: Fake replication' I managed to actually replicate the original issue that is - I can see the quiz details page with "Resource not found on device" shown and I can't delete the quiz after having successfully restarted the server. Only if I manually refresh the entire page, then I can delete it. 2024-08-13_15-25-09.mp4Logs: logs.zip |
… data I could not replicate the issue described in learningequality#12388 but this seems like it ought to avoid the possibility altogether as it only seems to occur when there is a 502 during the page load.
9054f85
to
278cd17
Compare
@pcenov I've updated the PR so that the deletion modal uses the always present @rtibbles @AlexVelezLl -- I've updated the QuizSummaryPage a bit here. We were duplicating the fetch from the backend to get data we already had available by way of the classSummary store. So the component got the same data two different ways and used them differently. My changes consolidate them into one |
Hi @nucleogenesis - I confirm that now it's possible to delete a quiz while the 'Resource not found on device' message is displayed: delete.mp4I can also see the missing resources loaded correctly when I manually refresh the page after the successful server restart: reload.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any concrete reason to think this is a problem, but I suspect there could be a regression lurking in here somewhere.
Most likely if the quiz being loaded is an old quiz made on 0.16 or older.
As a final manual test here before we merge, @pcenov could you:
|
Hi @rtibbles - I confirm that there is a regression when opening a quiz created in 0.16: errors.when.opening.a.quiz.created.in.0.16.mp4I'm seeing the following error in the console:
Here's the entire home folder: |
Summary
Closes #12388
I was only able to replicate the error described there by @AlexVelezLl when I forced specifically a 502 error within the
size
endpoint's handler. I don't know any way that a 502 would come through unless the server is disconnected somehow during the page load.I could not replicate it naturally, however, so I cannot be 100% this addresses the issue at hand here.
But, ultimately, what it came down to was that if the page got a 502 error, it would show the proper "disconnected" snackbar & backdrop. In this case, the value used
this.quizId
was not yet initialized.The change here ensures that when the user regains connection to the server, their page will reload, hopefully successfully.
One thing of concern is that if there is a way in which we could end up getting some kind of unjustified 502, then this could just result in an infinite loop of failing to connect and reloading.
The only way that I can think of that the size endpoint's handler would cause a 502 is if it's crashing the server. I've made some large quizzes during development on EQM and I've not had any issues with it and trying it didn't help replicate the issue.
Without some kind of stack trace for the error from a naturally occurring replication of the error this will be hard to debug, as there are several calls within that could cause the failure:
Also worth noting that my first thought was to force an error within the function there, but that just resulted in the expected
400 Bad request
rather than the502
that is the direct cause of this issue.Reviewer guidance
Code review
QA
Path 1: Fake replication
kolibri stop
, causing the backend to no longer be availablePath 2: Possibly replicate it naturally