Erratic behavior when accepting assignments (solved with refresh)

(Eric Kuha) #1

I’m testing the platform for now. I was very enthusiastic about it until today when I noticed some highly erratic behavior.

It goes something like this:

  • I create an assignment
  • I get the link
  • I log out of my main account and into a dummy account
  • I try to accept the assignment and sometimes it works and sometimes it just doesn’t.

I get one of the two error messages:

  • You are forbidden from performing this action on
  • We were not able to import you the starter code to your assignment, please try again.

Problem is, I can’t seem to reliably reproduce the bug. I can’t figure out what causes it because sometimes I’ll simply press the accept button again and it will just work. It seems to not work more often than it does. And yet, I can’t seem to find any sort of correlation between the things I’ve tried (re-making the assignments, etc) and the error messages.

Here are links to the two assignments:

(Vanessa) #2

Hi @SirYancy I’m sorry you’re experiencing these messages.

I accepted both assignments:

Lab 1. Did it successfully.

Lab 2. Got the error you were experiencing. When I reloaded the page, I was able to accept the assignment.

Hope this helps, and if you continue to encounter the error, open an Issue in the Classroom repo:

It looks like some other folks are having this error, so I’m going to add info from this thread to the open Issue.

Let me know how it goes!

(Eric Kuha) #3

Oh thank you. I am going to play around with it a bit more. This sounds good. I will subscribe to the open issue. You guys are awesome.

(Eric Kuha) #4

I’m actually super relieved that you were able to replicate the bug.

(Vanessa) #5

Sometimes it helps just to know you aren’t alone :slight_smile:

(Apanangadan) #6

Many of my students seem to be facing the same issue. They get an error after they click the assignment link, they click again and again and it seems each time a new repository is created (-1, -2, -3, …). Also, I see a lot of repositories with “ghost” in their names which don’t have any members associated with them. Is there a reason why this keeps happening? We do have a large number (> 1000) of repositories currently in our organization account.


(Eric Kuha) #7

As to your first issue, I definitely have seen this happen as well. I’ve clicked on an assignment link, seen the error, clicked it again, and then later found out that it did, indeed, clone the assignment more than once. Mildly annoying.

As to the “ghost” thing, the only thing I can think of with that is that the student deleted their account? That would orphan the repo. I would just delete it (though going through and deleting all of the ghosts from thousands of repos could be tedious as hell).

(Apanangadan) #8

I don’t think students are deleting the account. I think multiple clicks on the assignment link are either creating -1, -2, … repositories or orphaned ghost-1, ghost-2, … repositories.
Unfortunately, this is more than mildly annoying. When it comes time to grade, we now have to decide which ones to look at. (We end up considering all for grading.)

I wonder what is the root cause of this - could this somehow be fixed?


(Vanessa) #9

@apanangadan @SirYancy ghost icons seem to happen when someone leaves an organization.

I’ll ask @tarebyte to weigh in on design decision behind copies that end in -1, -2 in the slug.

(Mark Tareshawty) #10

Heyah :wave:

So the -1 -2 naming convention is used in the case where an assignment repository have a naming conflict.

This is the code for it:

As for when someone leaves an organization, we’re going to be adding webhook support in the near future to handle that situation I hope.

(Apanangadan) #11

So we created a new organization as the previous one had over a thousand repositories and the erratic behavior (of creating duplicate -1, -2, repositories) almost completely disappeared. Perhaps some part of the code (such as GitHubRepository.present?(organization.github_client, name)) takes too long for large organizations and causes an error during repository creation.