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.35k stars 569 forks source link

Unable to add as collaborator #1271

Closed ratairas closed 6 years ago

ratairas commented 6 years ago

One of my students is unable to create a repository. The error message "We were not able to add you to the assignment as a collaborator on this assignment. Please try again." came up. Other students have been able to accept the assignment, the latest as being about three hours ago. When I go to the organization dashboard, it shows the repository being generated several times, but it does not show up on the list (main page of organization).

matt297 commented 6 years ago

My students are encountering the same issue when they try and accept an assignment invitation - they always get the error message, We were not able to add you to the assignment as a collaborator on this assignment. Please try again. I am not however seeing any repositories being created/generated multiple times.

I tried creating a brand new assignment (https://classroom.github.com/a/8FyDefF3), but accepting the invitation produces the same error, and no repo is ever created. One student tried revoking their GitHub Classroom OAuth token, authorizing GitHub Classroom again, and then trying the assignment invitation, but still received the same error.

When I (an organization admin as well as the person who created the assignment starter repo) try and accept the invitation, it works without a problem.

rmquimby commented 6 years ago

My students are suddenly having this same problem. All students were able to access assignments yesterday, but as of a few hours ago none of them can.

filalano commented 6 years ago

I have the same issue at the moment! https://classroom.github.com/a/UvQiVcNw

Kadaaran commented 6 years ago

Hello everyone,

Thank you for reporting this issue.

@filalano @matt297 @ratairas @rmquimby can you give me your organization ID and the assignment so we can take a look at it ?

ratairas commented 6 years ago

@Kadaaran My organization ID is vu-cs3270-s18 and assignment is Project 1. I tried Homework 3 and it didn't work either.

Thanks.

Kadaaran commented 6 years ago

@ratairas Do you have the login or name of a student that got the repository created multliple times and on which assignment ?

ratairas commented 6 years ago

@Kadaaran Here's one: vandercc gets an error on Homework 3 and Project 1.

ghemingway commented 6 years ago

@Kadaaran I am seeing this issue also. My organization is vu-cs3251-s18 assignment is Assignment 3. The student with the issue's GH account ID is: kzhang798.

matt297 commented 6 years ago

@Kadaaran The organization id is 34665183 and the assignment name is Test Assignment (https://classroom.github.com/a/8FyDefF3). All of my students are getting the error, but if it helps, a couple specifically are navroop9152 and chaoxunzhou.

laleese commented 6 years ago

@Kadaaran - our org is @CS-112-02-spring2018 and its for Lab3 URL: https://classroom.github.com/a/UvQiVcNw

@tarebyte - I see that you have seen this issue before. https://github.com/education/classroom/pull/818 Can you help?

mmm commented 6 years ago

We're seeing the same thing for multiple classrooms:

The audit log for the org shows lots of: repo.create, repo.add_member, and then repo.destroy events for the problematic student assignment repos, but doesn't include any error messages

rmquimby commented 6 years ago

Thanks @Kadaaran . My organization id is 35276586. The problem first showed up with my assignment homework#4 (some students successfully accepted, but later others could not). None of my students were able to accept Quiz #6.

FanBu commented 6 years ago

It seems like something is wrong here. https://github.com/education/classroom/blob/6a50c7febf555fb1ba91c79b0b9f0062134dde0e/app/models/github_organization.rb#L29 The repo cannot be created but the user is invited to the repo.

tarebyte commented 6 years ago

Hi Everyone,

First thank you for reporting this issue, we really appreciate the community bringing these problems to us.

There was a deploy that made a breaking change to the GitHub API yesterday afternoon which is what is causing your issues.

I'm currently working on a PR to fix the API problem and then a subsequent PR to fix this issue on the Classroom side.

Thank you for your patience.

FanBu commented 6 years ago

The error is raised here https://github.com/education/classroom/blob/6a50c7febf555fb1ba91c79b0b9f0062134dde0e/app/models/assignment_repo/creator.rb#L106 because the controller tries to add users to a repo which is failed during creation. However, I think the error should be raised within https://github.com/education/classroom/blob/6a50c7febf555fb1ba91c79b0b9f0062134dde0e/app/models/assignment_repo/creator.rb#L113

DbCrWk commented 6 years ago

I'm also having this issue. Commenting here to stay subscribed!

Percipient24 commented 6 years ago

I'm also having this issue. I'm happy to provide additional details / add you to my ORG / act as test subject.

whatwho commented 6 years ago

Our students are having the same issue, commenting here just to stay subscibed! Thanks for the quick fix in advance!

malloc82 commented 6 years ago

One of my students had the same issue, but I was able to fix it by converting him to "outside collaborator" from "member" manually.

He was listed as a organization member because github classroom added first time students as organization "member" last fall. However, this semester github added first time students as an "outside collaborator".

So all the students who are listed as "outside collaborator" had no problem accepting assignment, the only student who is listed as member had that issue, and I was able to fix it by converting him to "outside collaborator".

sebkopf commented 6 years ago

Same problem with our students, could not solve it with malloc82's suggestion. Thanks in advance for working on the fix.

malloc82 commented 6 years ago

Just want to add that at the moment, not even organization's owner can accept assignment, only "outside collaborator" can accept assignment in my classroom.

And my assignments are all individual assignments.

DbCrWk commented 6 years ago

@malloc82 I'm experiencing similar behavior

coatless commented 6 years ago

@Kadaaran thanks for your work on the problem thus far. However, is there an ETA expected for this fix or should I start working on a side script to spin up repos for students?

Percipient24 commented 6 years ago

I'm writing to confirm @malloc82's 'outside collaborator' fix worked for me and my students. Go to https://github.com/orgs/[your org here]/people and, for each student, select 'Convert to outside collaborator' from the settings cog menu:

screen shot 2018-02-19 at 12 30 44 am

Thanks @malloc82 !

arjenpdevries commented 6 years ago

Worked here as well, tnx @malloc82

arjenpdevries commented 6 years ago

Is there an ETA for a solution, @tarebyte ?

(I need to hand out new assignments on Thursday, would be nice to know if I need to look for a workaround or that this will likely not be an issue anymore.)

AlexHartveld commented 6 years ago

We're having the same issues, commenting here to keep updated about a possible fix. Thanks for going after this, hope the PR is done soon :) Both Members and Owners of organisation were unable to Accept the invitation.

lubaochuan commented 6 years ago

I am experiencing the same issue. Couldn't accept this assignment created by myself: https://classroom.github.com/a/ajnTka1E

malloc82 commented 6 years ago

@lubaochuan I just accepted your assignment. I don't know if you are a owner or member, but at the moment, only "outside collaborator" or people have no association to the organization (like me) at all can accept the repo.

kmmcgarry commented 6 years ago

I'm having the same issue. Patiently waiting for an update on this.

Kadaaran commented 6 years ago

Hello everyone,

First of all thank you for your patience. We are still waiting for the PR to the API to be merged so we can merge our own fix on Classroom.

For now, please check if you have students who are members of your organization. If it's the case, you can manually convert them as outside collaborators, as @malloc82 has suggested, in your organization's settings https://github.com/orgs/[your org here]/people and ask your students to accept the assignment again. (If you are a member or owner of your organization you will not be able to check yourself by accepting the assignment, it won't work. This issue is related to permissions levels.)

If it does the trick for some that would be great and I thank you in advance 👏 For the others I will get back to you as soon as we have news from the PR @tarebyte did to fix the API.

Thank you again for your patience.

vuse-student commented 6 years ago

@ratairas @ghemingway pls daddy

maryvilleDevProf commented 6 years ago

Adding myself to the listener list. Thanks for working on this!

mrmirah commented 6 years ago

Thank you for the workaround for now and working quickly to get a fix. Subscribing to this to stay updated.

kraigh commented 6 years ago

Would like to chime in that we're experiencing a similar issue- students are able to clone the repos, but the "Give students Admin permissions on their repository" option is not honored, and students are not added as administrators on their repository, only write permissions. This is an issue for us because students use Github Pages to host their site, and they cannot set up Github Pages without admin access.

Kadaaran commented 6 years ago

Hi everyone,

The PR has been merged, it should be resolved now 🎉 Please tell me if you are still experiencing issues like this one.

Thank you again for your patience 🙏

lubaochuan commented 6 years ago

@malloc82 Thanks for your comment. It turned out a few of my students were considered inside collaborators because they were added to a team in my organization last year. The issue is definitely new because none of my students had issues accepting assignments just a few weeks ago. It seems the issue has been fixed.

Kadaaran commented 6 years ago

Hi everyone,

You can find the report of the last week's incident here if you want more informations about what happened and how it was resolved.

Thank you ✨

rossdakin commented 6 years ago

@Kadaaran was this intentionally reopened? Are there ongoing/new issues?

Thanks!

Kadaaran commented 6 years ago

Hi @rossdakin , we are keeping it open in case some people still experience this issue. If there is no issue related to this one we will close it in a few weeks :)

fvanwijk commented 6 years ago

It looks like the student needs 2FA enabled if the owning organisation required 2FA for all collaborators

ericpollmann commented 5 years ago

I'm experiencing this issue again, we do not have 2FA on, and 2 of 8 students who attempted to accept the assignment failed setup with this message.

jbschrades commented 5 years ago

We are seeing this issue with some (not all) of our students. We do not have 2FA enabled at the org level.

mehraUTD commented 4 years ago

I am having the same issue! any updates?

d12 commented 4 years ago

@mehraUTD We're working on solving this issue with template repo imports, which should reduce the error rate here. More info: https://classroom.github.com/help/using-template-repos-for-assignments