cli: Heroku Login Error: Cannot read property 'body' of undefined

Trying to login using to heroku using heroku cli with command heroku login

Getting error:

TypeError: Cannot read property 'body' of undefined
    at new HerokuAPIError (/usr/local/lib/node_modules/heroku/node_modules/@heroku-cli/command/lib/api_client.js:12:33)
    at Login.login (/usr/local/lib/node_modules/heroku/node_modules/@heroku-cli/command/lib/login.js:78:19)
    at <anonymous>

I’m using MacOs 10.12

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 21 (5 by maintainers)

Most upvoted comments

Marciodm I was able to resolve my issue by typing my email in a text editor, copying it to my clipboard, and then pasting it quickly before the error came up. That enabled me to login. I am on Windows 10 as well, using bash on windows.

I am facing the same problem in windows 10. heroku: Enter your login credentials Email: #######@gmail.com Password: ******** TypeError: Cannot read property ‘id’ of undefined at Login.interactive (C:/Program Files/heroku/client/node_modules/@heroku-cli/command/lib/login.js:183:30)

Marciodm I was able to resolve my issue by typing my email in a text editor, copying it to my clipboard, and then pasting it quickly before the error came up. That enabled me to login. I am on Windows 10 as well, using bash on windows.

This worked, thank you!

OK I figured it out, the latest update (7.0.88) should work now. The issue was because we added a prompt timeout feature but did not have it disabled by default.