github-education-resources / classroom

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.
https://classroom.github.com
1.34k stars 570 forks source link

Server error creating assignment #2558

Closed NuttKatyISD closed 4 years ago

NuttKatyISD commented 4 years ago

Describe the bug 500 server error creating an assignment

To Reproduce Steps to reproduce the behavior:

  1. New individual assignment
  2. Set starter code to use a non-template repo, but select that it should be imported from template
  3. After submit it redirects back to assignment entry page with an error message that starter code is not a template
  4. Switch tabs and change source repo to template
  5. Back to assignment creation tab and click Create Assignment again
  6. Site displays 500 error

Expected behavior I guess, not have an error

jeffrafter commented 4 years ago

Hi @THSCS this definitely looks like a bug in Classroom. We're digging into it now. Thanks for the report!

bwiedermann commented 4 years ago

I think I am seeing related errors (see info below). Students were able to last successfully use classroom on Feb. 11, 12:15am PST. The first student reported an error on Feb 11, 10:11am PST.

For a group assignment I already created, students have the following experience:

  1. Visit the URL for the assignment invitation.
  2. Type a team name in box with the label "OR Create a new team"
  3. Click Create team
  4. Site displays a 500 error.

As best I can tell, Classroom creates the team, but does not copy the assignment repo to the team.

Also, when I go to the page for the assignment, I see the following:

Screen Shot 2020-02-11 at 10 55 39 AM
d12 commented 4 years ago

:wave:, is this error still happening? We believe it might have been caused by a GitHub.com API issue which is now fixed.

NuttKatyISD commented 4 years ago

Yes, and it seems worse.

I created an empty repo that wasn't set as a template and tried to use it as starter code. Instead of giving me the error that the source had to be a template it went directly to a 500 error. I've never tried to use an empty source as a template, so maybe it's always happened. Not that it really makes sense to use an empty template anyway.

With a repo with just a readme.md file the same thing happened that was in the original post. Gives me a warning that the source isn't a template. After changing the source to a template and trying to create the assignment again it threw a 500.

Also went and tried to create a new assignment with the newly switched to template source repo and still got a 500 error.

d12 commented 4 years ago

@THSCS Which Classroom are you seeing this in? I'm digging now.

NuttKatyISD commented 4 years ago

Which of my classrooms?

/classrooms/9141231-data-structures-2019-2020

d12 commented 4 years ago

Great, is there any other info you can give us that might help debug or reproduce? We haven't been able to replicate quite yet.

NuttKatyISD commented 4 years ago

The two repos that I tested with are

https://github.com/THS-CompSci/dummy-repo It's empty and threw a 500 immediately trying to create an assignment.

https://github.com/THS-CompSci/dummy-with-readme Tried to create an assignment using this as a template, but didn't have it set as a template. It came back with an error message that the source repo wasn't a template. I opened a new tab and changed the repo to a template and hit submit again. 500 error.

Went back to Classroom and created a new assignment using this repo as a template source and got a 500 again. That was about an hour ago.

Just tried again with a new assignment on the dummy with readme repo and was able to create an assignment. The successful assignment it https://classroom.github.com/classrooms/9141231-data-structures-2019-2020/assignments/test

d12 commented 4 years ago

@THSCS We've figured out the issue and I've manually fixed up your account for now. We're working on a small fix that'll prevent this from happening in the future.

There were 2 admins on your Classroom that did not have owner access to the organization anymore. GitHub Classroom requires all admins have owner access, and does weird things when that's not the case. Normally we detect when a change is made on GitHub and auto-remove the user from the Classroom but that wasn't happening.

I've removed the two users from the Classroom to fix the issue. If you'd like them to be admins again, you'll have to first add them as owners to the GitHub organization.