Open nucleogenesis opened 1 month ago
Asset type | Download link |
---|---|
PEX file | kolibri-0.17.0a0.dev0_git.67.g6ca6ff84.pex |
Windows Installer (EXE) | kolibri-0.17.0a0.dev0+git.67.g6ca6ff84-windows-setup-unsigned.exe |
Debian Package | kolibri_0.17.0a0.dev0+git.67.g6ca6ff84-0ubuntu1_all.deb |
Mac Installer (DMG) | kolibri-0.17.0a0.dev0+git.67.g6ca6ff84.dmg |
Android Package (APK) | kolibri-0.17.0a0.dev0+git.67.g6ca6ff84-0.1.4-debug.apk |
TAR file | kolibri-0.17.0a0.dev0+git.67.g6ca6ff84.tar.gz |
WHL file | kolibri-0.17.0a0.dev0+git.67.g6ca6ff84-py2.py3-none-any.whl |
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. So if we consider that a valid testing scenario, then we've not fixed the original issue since from the perspective of a normal user of Kolibri we are still getting in the edge-case scenario where we can't delete the quiz with missing resources for no obvious reason. Here's a video of what I am observing:
https://github.com/user-attachments/assets/1c59b7d9-d5ff-472c-84a9-58109f08b62b
Logs: logs.zip
@pcenov I've updated the PR so that the deletion modal uses the always present quizId
value from the URL itself. This ensures that the modal being submitted will always work.
@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 exam
property derived from classSummary/examMap
, then uses the exam utils fetchExamWithContent
function to be sure we're getting the content in the right shape. I think that we could probably just derive this from the classSummary/contentNodeMap
but I figured I'd get feedback on this first as I think the changes here should sufficiently resolve the issue this PR targets.
Hi @nucleogenesis - I confirm that now it's possible to delete a quiz while the 'Resource not found on device' message is displayed:
https://github.com/user-attachments/assets/7b9259b5-2d8b-4d6b-a5d9-7bc1922642fb
I can also see the missing resources loaded correctly when I manually refresh the page after the successful server restart:
https://github.com/user-attachments/assets/ec838c0a-bb54-41d9-bcd0-b61649f3909b
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:
https://github.com/user-attachments/assets/62e05b16-2d2b-4ce1-b035-6865ded87d4d
I'm seeing the following error in the console:
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
at ManageExamModals.vue:95:1
at QuizSummaryPagevue_type_script_lang_js_toConsumableArray (ManageExamModals.vue:95:1)
at index.vue:116:1
at Array.reduce (<anonymous>)
at Sub.selectedQuestions (index.vue:115:1)
at Watcher.get (vue.runtime.esm.js:4495:25)
at Watcher.evaluate (vue.runtime.esm.js:4597:21)
at Sub.selectedQuestions (vue.runtime.esm.js:4851:17)
at Sub.QuizSummaryPagevue_type_template_id_f77f4f98_scoped_true_render (index.vue:1:1036)
at vue-composition-api.mjs:1940:35
Here's the entire home folder: kolibri.zip
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