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

GraphQL error: Invalid email address on EMU #5842

Closed
Tracked by #5880 ...
appleoddity opened this issue Mar 18, 2024 · 27 comments · Fixed by #5983
Closed
Tracked by #5880 ...

GraphQL error: Invalid email address on EMU #5842

appleoddity opened this issue Mar 18, 2024 · 27 comments · Fixed by #5983
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release verified Verification succeeded

Comments

@appleoddity
Copy link

appleoddity commented Mar 18, 2024

  • Extension version: v0.82.0
  • VSCode Version: 1.87.0
  • OS: Windows 11
  • Repository Clone Configuration (single repository/fork of an upstream repository): Single repository
  • Github Product (Github.com/Github Enterprise version x.x.x): Github.com

It looks like this issue added a email address selection when creating a merge commit: #5326

I have been unable to submit a merge commit through vscode for probably a month now. I can everything but submit the merge commit. I have to go to the Github UI to do that.

When I click to, Create Merge Commit, I get Unable to merge pull request. GraphQL error: Invalid email address

Yet, in the details of the merge commit I see Commit will be associated with <my valid email>.

I'm not sure what else I can look for here. I'm not sure if I need to reset a setting somewhere, or what. Everything about the pull request extension seems to work fine, so I know it is recognizing my email and user account properly.

What else can I do to provide more detail or troubleshoot the issue?

@alexr00
Copy link
Member

alexr00 commented Mar 26, 2024

I'm adding some additional logging with #5870. If you could try the pre-release version of the extension tomorrow and set the log level to debug (command Developer: Set Log Level -> GitHub Pull Request -> Debug), then you'll get the new logging.

Once you have the new logging, can you try to reproduce the issue then check the GitHub Pull Request output for a log like that says "Merging PR"? That line will also include the email address. Can you confirm whether that email address is correct?

@alexr00 alexr00 added the info-needed Issue requires more information from poster label Mar 26, 2024
alexr00 added a commit that referenced this issue Mar 26, 2024
@statropy
Copy link

statropy commented Apr 3, 2024

I had this same issue, so I captured a log with the pre-release version. I did not see anything in the log that says "Merging PR". Below is from selecting the correct email address, then pressing Squash and Merge. The -1 cost and undefined are interesting. It may be stopping on error before your new debug line.

2024-04-03 15:45:44.442 [debug] RateLimit> Extension rate limit remaining: 140, /user/emails
2024-04-03 15:45:44.756 [debug] GitHubRepository> Fetch authenticated user emails - done
2024-04-03 15:45:44.757 [debug] RateLimit> REST Rate limit remaining: 4994, cost: -1, /user/emails
2024-04-03 15:45:50.798 [debug] PullRequestOverviewPanel> initialized with PR
2024-04-03 15:45:54.906 [debug] RateLimit> Extension rate limit remaining: 140, undefined

@ericohlin
Copy link

ericohlin commented Apr 4, 2024

I'm getting this same error Unable to merge pull request. GraphQL error: Invalid email address

2024-04-03 18:35:13.970 [debug] RateLimit> Extension rate limit remaining: 140, undefined
2024-04-03 18:37:25.065 [info] FolderRepositoryManager+3> Found GitHub repo for pr #33: yes
2024-04-03 18:37:25.065 [debug] GitHubRepository> Fetch pull request 33 - enter
2024-04-03 18:37:25.066 [debug] RateLimit> Extension rate limit remaining: 140, PullRequest
2024-04-03 18:37:25.547 [debug] RateLimit> GraphQL Rate limit remaining: 4819, cost: 1, PullRequest
2024-04-03 18:37:25.547 [debug] GitHubRepository> Fetch pull request 33 - done
2024-04-03 18:37:25.548 [info] FolderRepositoryManager+3> Found GitHub pr repo for pr #33: yes
2024-04-03 18:37:25.548 [info] GitHubRepository> Fetch branch main - enter
2024-04-03 18:37:25.548 [debug] RateLimit> Extension rate limit remaining: 140, GetBranch
2024-04-03 18:37:25.780 [debug] RateLimit> GraphQL Rate limit remaining: 4818, cost: 1, GetBranch
2024-04-03 18:37:25.781 [info] GitHubRepository> Fetch branch main - done: true
2024-04-03 18:37:25.784 [debug] PullRequestModel> Fetch file changes, base, head and merge base of PR #33 - enter
2024-04-03 18:37:25.785 [debug] IssueModel> Fetch viewers latest review commit
2024-04-03 18:37:25.786 [debug] RateLimit> Extension rate limit remaining: 140, LatestReviewCommit
2024-04-03 18:37:26.059 [debug] RateLimit> GraphQL Rate limit remaining: 4817, cost: 1, LatestReviewCommit
2024-04-03 18:37:26.060 [debug] RateLimit> Extension rate limit remaining: 140, /repos/{owner}/{repo}/compare/{base}...{head}
2024-04-03 18:37:26.298 [debug] RateLimit> REST Rate limit remaining: 4965, cost: -1, /repos/{owner}/{repo}/compare/{base}...{head}
2024-04-03 18:37:26.298 [debug] PullRequestModel> Fetch file changes and merge base of PR #33 - done, total files 4
2024-04-03 18:37:26.360 [debug] RateLimit> Extension rate limit remaining: 140, PullRequestFiles
2024-04-03 18:37:26.361 [debug] RateLimit> Extension rate limit remaining: 139, PullRequestComments
2024-04-03 18:37:26.629 [debug] RateLimit> GraphQL Rate limit remaining: 4816, cost: 1, PullRequestFiles
2024-04-03 18:37:26.645 [debug] RateLimit> GraphQL Rate limit remaining: 4796, cost: 20, PullRequestComments
2024-04-03 18:37:26.647 [debug] RateLimit> Extension rate limit remaining: 140, GetPendingReviewId
2024-04-03 18:37:26.870 [debug] RateLimit> GraphQL Rate limit remaining: 4795, cost: 1, GetPendingReviewId

GitHub Pull Requests v0.82.1

Version: 1.87.2 (system setup)
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
Date: 2024-03-08T15:20:17.278Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.20348

I also tried on v0.83.2024030509 (pre-release) and the result is exactly the same.

@alexr00
Copy link
Member

alexr00 commented Apr 4, 2024

Thanks for the logs, but they are missing the new log line. The latest pre-release version of the extension requires that you use VS Code insiders (at least it will for a few more hours, there should be a new stable version of VS Code and the extension today).

@statropy
Copy link

statropy commented Apr 4, 2024

I did switch to the insiders plugin. I think the error happens earlier on.

@fearnycompknowhow
Copy link

Just to add more to this discussion, I am able to merge the PR if I use the Create Merge Commit button from the GitHub Pull Request sub-menu, but (like the others have said) it doesn't work if I try to do the same thing from the Pull Request description screen
Screenshot 2024-04-04 at 3 34 07 PM

@ericohlin
Copy link

ericohlin commented Apr 4, 2024

Hey @alexr00,

I updated my VSCode and I'm on the latest pre-release of GitHub Pull Requests.

GitHub Pull Requests: v0.87.2024040414 (pre-release)

Version: 1.88.0 (system setup)
Commit: 5c3e652f63e798a5ac2f31ffd0d863669328dc4c
Date: 2024-04-03T13:26:18.741Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.20348

The issue still exists.

Unable to merge pull request. GraphQL error: Invalid email address

2024-04-04 13:57:16.560 [debug] FolderRepositoryManager+0> Merging PR: 33 method: merge for user: "[email protected]" - enter

2024-04-04 13:57:16.561 [debug] RateLimit> Extension rate limit remaining: 140, undefined

Thanks!

@alexr00
Copy link
Member

alexr00 commented Apr 5, 2024

@ericohlin thanks for sharing those log! Is the email address listed in the logs the one that you expected the merge to be associated with? No extra spaces or other incorrect characters?

@alexr00 alexr00 self-assigned this Apr 5, 2024
@ericohlin
Copy link

ericohlin commented Apr 5, 2024

@ericohlin thanks for sharing those log! Is the email address listed in the logs the one that you expected the merge to be associated with? No extra spaces or other incorrect characters?

Hey @alexr00, thank you for the quick response. Yes, that's correct. I sanitized the log before sharing. To double-check, I copied the value from the log into Beyond Compare and then manually typed my email address, and they appear to be a 100% match. Everything looks exactly as it should.

@alexr00
Copy link
Member

alexr00 commented Apr 8, 2024

Ok, I'm not sure what's going on here then. Does your email address have any special characters? If you go to github.com to merge the PR are you allowed to select this email address there?

@ericohlin
Copy link

ericohlin commented Apr 8, 2024

Ok, I'm not sure what's going on here then. Does your email address have any special characters? If you go to github.com to merge the PR are you allowed to select this email address there?

Good morning. There are no special characters in my email address. If I go to github.com and merge the PR, when I click on Merge Pull Request, it says just above the Commit Merge button This commit will be authored by [email protected] and the email address is identical to the one in the logs.

This may be helpful, or maybe it's not, but this PR also has a commit from another team member. There are two total commits, one from me and one from my teammate.

@zxramozx zxramozx mentioned this issue Apr 9, 2024
@alexr00
Copy link
Member

alexr00 commented Apr 9, 2024

If I go to github.com and merge the PR, when I click on Merge Pull Request, it says just above the Commit Merge button This commit will be authored by [email protected] and the email address is identical to the one in the logs.

This is exactly what I needed to know, though I don't see why this can happen.

This may be helpful, or maybe it's not, but this PR also has a commit from another team member. There are two total commits, one from me and one from my teammate.

Maybe. Let's see if we can find the exact combination that can cause this:

  • Did you create the PR, or did your colleague?
  • Did you make the first commit?
  • Did you make the most recent commit?
  • Do you and your colleague have the same level of permissions in the repo? What level of permissions do you both have?
  • Is this an org-owned repo, or a personal repo?

@appleoddity
Copy link
Author

appleoddity commented Apr 9, 2024

I can confirm that the email address is correct. I have monitored the GraphQL query with Fiddler, and even recreated the request with the GitHub GraphQL Explorer. It is always the same result, "Invalid email address."

If I remove the authorEmail variable from the graphQL request all together, the merge pull request succeeds.

I'm starting to wonder if this is a Github issue. Can anybody successfully perform a merge pull request with GraphQL while supplying an authorEmail?

To answer your questions:

  • I created the PR
  • I made the first commit
  • I made all commits
  • There is no colleague working on this project right now. I created the repo, the commits, and the pull requests.
  • This is an Org owned repo.

@ericohlin
Copy link

If I go to github.com and merge the PR, when I click on Merge Pull Request, it says just above the Commit Merge button This commit will be authored by [email protected] and the email address is identical to the one in the logs.

This is exactly what I needed to know, though I don't see why this can happen.

This may be helpful, or maybe it's not, but this PR also has a commit from another team member. There are two total commits, one from me and one from my teammate.

Maybe. Let's see if we can find the exact combination that can cause this:

  • Did you create the PR, or did your colleague?
  • Did you make the first commit?
  • Did you make the most recent commit?
  • Do you and your colleague have the same level of permissions in the repo? What level of permissions do you both have?
  • Is this an org-owned repo, or a personal repo?

Did you create the PR, or did your colleague?
-- I created
Did you make the first commit?
-- I made first commit
Did you make the most recent commit?
-- Colleague made most recent commit
Do you and your colleague have the same level of permissions in the repo? What level of permissions do you both have?
-- Same. Maintain
Is this an org-owned repo, or a personal repo?
-- Org-owned

@alexr00
Copy link
Member

alexr00 commented Apr 10, 2024

Thanks for all the details! I'll try this out with a private, org owned, repo.

I do expect that this is a GitHub issue. I'm just trying to find a way I can repro the issue so I can tell the GitHub folks how to repro it.

@alexr00
Copy link
Member

alexr00 commented Apr 10, 2024

Tried with a private, org owned, repo. I still can't repro the issue.

@grays29
Copy link

grays29 commented Apr 10, 2024

We are experiencing the same issue by all users. Org owned Repo's

Our email is the format Firstname_surname@domain

Works Fine from the web

@appleoddity
Copy link
Author

Tried with a private, org owned, repo. I still can't repro the issue.

Can you grab the API query with Fiddler. Maybe we can compare how it is different.

As mentioned, I grabbed the query being sent to Github and it had what looked like a valid formed request, with the proper email address, yet it still fails when submitting directly. I wonder how your request looks different. Perhaps it is something on the Github side that has to do with a certain repo setting, or what not.

@ericohlin
Copy link

Hey @alexr00, I was able to reproduce this error again with a brand new PR; this time, I was the only contributor.

Private, org-owned, repo, solo contributor.

What do you need from me? 😄

Thanks!

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Apr 29, 2024
@alexr00
Copy link
Member

alexr00 commented Apr 29, 2024

I guess having other contributors to the PR was a red herring.

One more question: when you go to github.com for your repo, is there a little label in the top right that says "GitHub Enterprise", like this?

image

@ChrisHines
Copy link

I have encountered this problem. My details are similar to those described in #5842 (comment). github.com does have the "GitHub Enterprise" label you asked about in the above comment.

@ericohlin
Copy link

I guess having other contributors to the PR was a red herring.

One more question: when you go to github.com for your repo, is there a little label in the top right that says "GitHub Enterprise", like this?

image

Yes there is.

@Mouhand999067 Mouhand999067 mentioned this issue May 1, 2024
@alexr00
Copy link
Member

alexr00 commented May 2, 2024

Yes there is.

github.com does have the "GitHub Enterprise" label you asked about in the above comment.

This is great news. I'll disable this feature for Enterprise. I'm guessing Enterprise just never supports setting an email because you'll only have one email associated with your enterprise account.

@alexr00 alexr00 added the candidate Issue identified as probable candidate for fixing in the next release label May 2, 2024
@alexr00 alexr00 added this to the April 2024 Recovery 1 milestone May 2, 2024
alexr00 added a commit that referenced this issue May 2, 2024
alexr00 added a commit that referenced this issue May 2, 2024
@alexr00 alexr00 reopened this May 2, 2024
alexr00 added a commit that referenced this issue May 7, 2024
@alexr00
Copy link
Member

alexr00 commented May 7, 2024

The fix has been available in the pre-release version of the extension for a couple days. Could some of the folks in this thread install the pre-release version and let me know if it solves the issue?

alexr00 added a commit that referenced this issue May 7, 2024
@alexr00 alexr00 closed this as completed May 7, 2024
@ericohlin
Copy link

@alexr00 this resolved the issue for me. I'm on version v0.89.2024050704 (pre-release).

Thank you! 🙇🏻 🙇🏻

@alexr00
Copy link
Member

alexr00 commented May 7, 2024

Thanks for verifying and for your patience while I found a fix!

@alexr00 alexr00 added the verified Verification succeeded label May 7, 2024
@alexr00 alexr00 changed the title GraphQL error: Invalid email address GraphQL error: Invalid email address on EMU May 8, 2024
@appleoddity
Copy link
Author

Confirmed working in latest release. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants