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

Empty co-authors panel / Cannot read property 'email' of undefined #25

Closed
3 tasks done
chakeresa opened this issue Oct 7, 2019 · 9 comments
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@chakeresa
Copy link

Prerequisites

  • Checked that your issue isn't already filed
  • Tried upgrading to the latest git-mob-vs-code and git-mob version (npm i -g git-mob)
  • Tried upgrading to the latest git version (brew upgrade git if installed with Homebrew/Linuxbrew)

Description

The GIT MOB CO-AUTHORS box in the git panel of VS Code is completely empty, and I get the following error whenever I click the commit message field or run the other git mob commands (like Git Mob: Add co-author): Cannot read property 'email' of undefined

Steps to Reproduce

  1. My .git-coauthors file looks like this (but the same happens when I make coauthors an empty object):
{
  "coauthors": {
    "alias": {
      "name": "My Buddy",
      "email": "[email protected]"
    }
  }
}
  1. Open VS Code's git panel
  2. Click in the commit message text box or run a command (like Git Mob: Add co-author)

Expected behaviour: I should see a list of project coauthors in the GIT MOB CO-AUTHORS box on the git panel of VS Code. I should be able to select co-authors, remove co-authors, etc.
Actual behaviour: The GIT MOB CO-AUTHORS box is completely empty and I get a Cannot read property 'email' of undefined error when editing my commit message or running any git mob commands.

Reproduces how often: 100% (for the last week or two... it was working well before that)

Versions

  • operating system and version: macOS Mojave 10.14.6
  • git-mob-vs-code version (can be found in the Extensions tab): 1.2.0
  • git-mob version (git-mob --version): 1.0.1
  • git version (git --version): 2.20.1 (Apple Git-117)

Additional Information

@chakeresa
Copy link
Author

Here are some screenshots:
git mob empty
git mob errors

@rkotze
Copy link
Owner

rkotze commented Oct 8, 2019

@chakeresa Thanks for reporting the issue.
Can you open the terminal and CD to the same project folder you open vs code in.
Run the commands git mob and after git mob --list. Do any of these commands give you an error?

  • Have you install any new vs code extensions in past two weeks?
  • Did you change your terminal shell?

@rkotze rkotze added the bug Something isn't working label Oct 8, 2019
@chakeresa
Copy link
Author

Yep, I did get an error when I ran git mob just now:

Warning: Missing information for the primary author. Set with:
$ git config --global user.name "Jane Doe"
$ git config --global user.email "[email protected]"

Running those (with my own GitHub details) solved the issue. 🎉

For others that may run into the same issue in the future, I'd recommend adding that to the "Setup" section of the extension details. Thanks @rkotze!

@rkotze
Copy link
Owner

rkotze commented Oct 8, 2019

@chakeresa glad you solved it. I'll update the setup section.

Just wondering, did you reinstall git?

@chakeresa
Copy link
Author

Nope, I’ve been using git on this laptop without any changes since before it randomly stopped working.

I’d actually tried installing the extension on a different laptop months ago and uninstalled it almost immediately there because the panel was showing up blank there too.

@rkotze
Copy link
Owner

rkotze commented Oct 8, 2019

Thanks for the feedback. I would be interested in why Git Mob extension failed to install on the other laptop.

I would like to reduce the frustrations of setup and get people started quicker.

In terms of this issue you created, I've added another issue #27. I don't think the extension should break cause there is no primary author, I would like to make that more obvious on what to do in the UI.

@chakeresa
Copy link
Author

It installed fine on the other laptop -- it just wasn't working as expected (also had the blank panel), so I removed it.

@rkotze
Copy link
Owner

rkotze commented Oct 8, 2019

Ah sorry, I mean what caused it to show a blank panel. Do you think its a similar issue as you had with the primary author not being set?

No worries if you're not sure why. :)

@chakeresa
Copy link
Author

chakeresa commented Oct 10, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants