question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enterprise sign-in: Cannot read property 'email' of undefined

See original GitHub issue

Description

When signing into an Enterprise GitHub account, an error displays with Cannot read property 'email' of undefined.

image

Version

  • GitHub Desktop: 1.3.5
  • Operating system: Microsoft Windows [Version 10.0.15063]

Steps to Reproduce

  • Set default web browser to Chrome (since experiencing issues with Internet Explorer / Edge when it continues to browser to authenticate)
  • Download and install fresh version of GitHub Desktop (tested on 1.3.4)
  • Authenticate with Enterprise credentials either during initial setup, or “skip” and then attempt to clone a repository

Expected Behavior

Expect “Continue with browser” to lead to a browser, authenticate, and then return to GitHub Desktop having signed into that user’s account.

Actual Behavior

“Continue with browser” opens new browser window, authenticates, but then when returning to GitHub Desktop the Cannot read property 'email' of undefined error is shown.

Additional Information

Logs

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mkudijacommented, Sep 11, 2018

@shiftkey thanks for the info and fix. We got it working by adding email address for the users impacted (Profile > Settings > Emails > Add email address).

0reactions
shiftkeycommented, Sep 11, 2018

@mkudija thanks for the log file, this shows you’ve been able to trip a bug that we didn’t notice before. Here’s the code on that line:

    const defaultEmail = emails[0].email || ''

Somehow, your GHE account doesn’t have any emails set, so emails[0] will be undefined. That’s The Bug™. As a workaround you may be able to add an email address to your GHE account, but we should definitely handle that better within the app.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
node.js - "TypeError: Cannot read property 'email' of undefined ...
This means that your variable sess is undefined. Your req.session variable does not have any value inside it. You need to check why...
Read more >
Common Issues with GitKraken Client | Integration Error ...
When trying to log in, you may see the following error: Cannot read property 'email' of null . This is commonly related to...
Read more >
Cannot read property 'email' of undefined - Google Groups
i am trying to link my model account which has as a base 'User'. and then call the User.login function etc. but it...
Read more >
Uncaught TypeError: Cannot read properties of undefined
I've installed an SMTP plugin, and test emails go through fine, for what it's worth. And I can provide credentials to test if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found