Enterprise sign-in: Cannot read property 'email' of undefined
See original GitHub issueDescription
When signing into an Enterprise GitHub account, an error displays with Cannot read property 'email' of undefined
.
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:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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).
@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:
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.