Skip to content
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

Trying to submit with Firefox: error processing file, undefined method `[]' for nil:NilClass #1134

Closed
Mat2095 opened this issue Apr 24, 2020 · 9 comments

Comments

@Mat2095
Copy link

Mat2095 commented Apr 24, 2020

I'm trying to submit a file on the demo-site using firefox.

I can drag the file in and the file-info is correct.
But when I check the "I affirm..."-checkbox, the file disappears and an error is shown which says "There was an error processing your file, please try again."

Then I can drag the file in again and click submit.
This however results in an error-page:

ClipboarderTemp-2673619

This happened on two machines (windows and linux) using Firefox, while Chrome works fine.

@victorhuangwq
Copy link
Contributor

Hi @Mat2095 that does look like something we should look into. I have however just tested the demo site on firefox, with a tar file and it still seemed to work fine. May I know what kind of file did you try to submit? I suspect that the filetype / the file itself could be relevant to the issue this time around.

@Mat2095
Copy link
Author

Mat2095 commented Apr 25, 2020

Okay, I guess I did get a few things wrong.
I submitted to the Lab Template, which doesn't really work even on Chrome (make doesn't find the python command, so everything just fails).
So I added the hello-lab, which works fine on Chrome (score of 100 when submitting the hello.c solution file).

Doing the same thing fails on firefox (hello.c from https://github.com/autolab/Autolab/blob/master/examples/hello/src/hello.c ).
However I've noticed that the error doesn't occur every time. If I Ctrl+F5 reload on http://autolab.ml/courses/AutoPopulated/assessments/hello drag-in the file and check the checkbox, the error occurs in about 50% of the cases.
If I click the upload-region to select a file, I didn't get the error (tried it about 10 times).

@cg2v
Copy link
Member

cg2v commented Apr 26, 2020

Note that the CMU instance has had this problem in the past:
https://lists.andrew.cmu.edu/mailman/private/autolab-dev/2018-May/044484.html (devs only)
It's patched there now:
cg2v@df5e132

@fanpu
Copy link
Contributor

fanpu commented May 11, 2020

Closing because fix has been merged in #1138

@fanpu fanpu closed this as completed May 11, 2020
@Mat2095
Copy link
Author

Mat2095 commented May 11, 2020

Now there is a nice error message "Submission was blank - please upload again".
But the bug that (sometimes, with firefox) caused the blank submission in the first place is still present!

@fanpu fanpu reopened this May 12, 2020
@fanpu
Copy link
Contributor

fanpu commented May 12, 2020

Hey @Mat2095, sorry about that - could I check which version of Firefox you are on, and whether you have tried this with all extensions disabled? I could not replicate this issue on Firefox 74.0.1 on Linux after submitting 5 times

@Mat2095
Copy link
Author

Mat2095 commented May 12, 2020

For me this error occurs on a Ubuntu 18.04 VM where nothing besides Autolab is installed. Firefox is on version 76.0 with no addons. But it also happens on my Windows PC using Firefox 76.0.1 on the http://autolab.ml site.

I've recorded a small video: https://www.youtube.com/watch?v=ZKMTDuvKRAI
First I just reload the page. I drag in the file, the content seems to get read successfully (LoC is correct). But when I check the checkbox, an error occurs. Then I drag in the file again and submit, resulting in the "Submission was blank"-error. Finally I upload via the upload-dialog, which works without a problem.

@fanpu
Copy link
Contributor

fanpu commented May 13, 2020

Thanks for the recording, I will try to replicate the issue on Windows using your setup

@damianhxy
Copy link
Member

For showFiles to be called from dropHandler, we must have fileSelector.files.length === 1.

However, for the error to display when #integrity_checkbox changes, in enableSubmit, we must have fileSelector.files.length === 0.

So somehow, the length is changing between the drag-and-drop, and the checking of the checkbox. But this should not happen since fileSelector.files is only cleared when #remove-handed-in is clicked.

It would be great if the root cause can be identified, but I'll close this issue as can't repro for now.

@damianhxy damianhxy closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants