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
[CD] Question submission server error #15101
Comments
Looks like an image path is being provided to |
Reproduced in prod. For a payload like the following:
Got a response:
|
Looks like we pass in image blobs retrieved from storage to the suggestion handler here: https://github.com/oppia/oppia/blob/develop/core/templates/pages/contributor-dashboard-page/modal-templates/question-suggestion-editor-modal.controller.ts#L98, but the handler expects a "files" arg: https://github.com/oppia/oppia/blob/develop/core/controllers/suggestion.py#L83. |
https://github.com/oppia/oppia/pull/14063/files migrated the schema to use the "files" handler arg, but calls to question suggestions were not updated. |
Hi @sagangwee, is the payload mentioned in #15101 (comment) the complete thing? I'm unable to find the filenames ['img_20200712_154524_88sfjivzr9_height_166_width_132.svg', 'img_20200711_165515_oqmu90mz19_height_71_width_132.svg', 'img_20200712_154812_m0biksf8pz_height_211_width_140.svg', 'img_20200711_170526_85sbwj9x81_height_211_width_140.svg', 'img_20200711_165602_yjboiwlroj_height_116_width_132.svg', 'img_20200712_154504_vys35ybfbl_height_148_width_132.svg']." in the payload. |
@kevintab95 Sorry, I do recall the img file names being listed below the payload in Chrome Dev Tools. I didn't log them on my first pass as I didn't realize they were part of the request at the time. |
Thanks! One more follow-up, looking at the question dict, I can't find any oppia-noninteractive-image tags with the corresponding filenames as attributes. Which is odd.. where are these image filenames coming from? |
Also, in the video in the issue description, it seems like there are no images (except for the math one) in the submitted question. Are the logs and video from the same session / set of operations? |
The images are loaded from ImageLocalStorageService, but I'm not familiar with it. I think the fix is to add the image blobs to a "files" arg here: https://github.com/oppia/oppia/blob/develop/core/templates/pages/contributor-dashboard-page/services/question-suggestion-backend-api.service.ts#L60 like what was done for translations: https://github.com/oppia/oppia/pull/14063/files#diff-6e706463b3e6fb489f0eab117dabc7ec24080746f2ef815593b9c608094ef09eR101. |
Update: This error happens when trying to submit a question (with or without images) for a skill that contains images. |
Thanks for investigating, @kevintab95! Just to check, what do you mean by "a skill that contains images"? Which field of the skill are you referring to? (Also that is weird. I don't really see why we would want to submit those images back to the server...) |
Skills can contain images in their subtitledHTML fields (e.g. description). I suspect these may be used in the preview or the question player,not sure. |
Misconceptions can contain images as well (the "default feedback" in the misconception can be used in the questions). |
But why do we send these back to the server? That seems odd, the CD should only be submitting the question + the skill ID. (Though I guess that's what you're investigating :P ) |
From what I understand, images are stored in model specific buckets, so all images related to the question entity will need to be stored in the question specific bucket. Some images seem to be in skill specific buckets (e.g. the description, misconceptions) so we copy them over to the question specific one -- I imagine this is why we send it to the server. |
Ah I see. Just to check ... I can see this happening for misconceptions that are ultimately submitted as part of the question, but we don't do that for the skill description, right? (At least, conceptually, I think we shouldn't, since the description is never part of the question.) |
True, currently I think we look at all HTML fields in the skill, we can restrict it to specific ones. |
"Found extra args" error:
Contributor.Dashboard.-.Oppia.2.mp4
The text was updated successfully, but these errors were encountered: