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

Heroku Login Error: Cannot read property 'body' of undefined #880

Closed
RakelO opened this issue Jun 5, 2018 · 21 comments
Closed

Heroku Login Error: Cannot read property 'body' of undefined #880

RakelO opened this issue Jun 5, 2018 · 21 comments

Comments

@RakelO
Copy link

RakelO commented Jun 5, 2018

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

@jdx
Copy link
Contributor

jdx commented Jun 5, 2018

We're under a code freeze right now but this is likely an issue with npm installs. You'll need to use the standalone in the meantime

@jdx
Copy link
Contributor

jdx commented Jun 5, 2018

Because npm doesn't use the yarn lockfile there is some mismatch between transitive dependencies (I'm pretty sure at least)

@rmcfall17
Copy link

I am getting a similar error message on the standalone

@rmcfall17
Copy link

try typing this your terminal:
wget -qO- https://toolbelt.heroku.com/install.sh | sh
then login:
heroku login

I had a very similar error message and this solved the problem.

@wilharlley
Copy link

I have the same error:

(.venv) wilharlley@wilharlley:~/i9amazon/i9gestao$ wget -qO- https://toolbelt.heroku.com/install.sh | sh
This script requires superuser access.
You will be prompted for your password by sudo.
[sudo] senha para wilharlley:

  • [[ ! :/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin: == :/\u\s\r/\l\o\c\a\l/\b\i\n: ]]
    ++ uname
  • '[' Linux == Darwin ']'
    +++ uname -s
    ++ expr substr Linux 1 5
  • '[' Linux == Linux ']'
  • OS=linux
    ++ uname -m
  • ARCH=x86_64
  • '[' x86_64 == x86_64 ']'
  • ARCH=x64
  • mkdir -p /usr/local/lib
  • cd /usr/local/lib
  • rm -rf heroku
  • rm -rf /home/wilharlley/.local/share/heroku/client
  • curl https://cli-assets.heroku.com/heroku-linux-x64.tar.xz
  • tar xJ
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 16.0M 100 16.0M 0 0 216k 0 0:01:15 0:01:15 --:--:-- 185k
  • rm -f /usr/local/bin/heroku
  • ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku
  • '[' -f /usr/local/heroku/bin/heroku ']'
    heroku installed to /usr/local/bin/heroku
    heroku/7.0.86 linux-x64 node-v10.1.0
    (.venv) wilharlley@wilharlley:~/i9amazon/i9gestao$ heroku login
    heroku: Enter your login credentials
    Email [[email protected]]: TypeError: Cannot read property 'body' of undefined
    at new HerokuAPIError (/snap/heroku/2936/node_modules/@heroku-cli/command/lib/api_client.js:12:33)
    at Login.login (/snap/heroku/2936/node_modules/@heroku-cli/command/lib/login.js:78:19)

@AndreaPontrandolfo
Copy link

I'm having the same error. Windows 7 here.

@elreydetoda
Copy link

elreydetoda commented Jun 6, 2018

for linux only (i.e. cloud9, centos, ubuntu) - #881 (comment)

@wilharlley
Copy link

wilharlley commented Jun 7, 2018

My friend @jdxcode , I'm new to git and I'm trying to understand how to proceed so I can have my calls resolved. The 881 call, which opened and returned, was not resolved. I posted the contents of the terminal after running the script to try to help walk the solution. You have deleted it and would like to know if you are still working on the problem, or I have to look for other sources.
Please, I need an orientation on how to proceed.
Sorry, my english, I'm from Brazil.

@jdx
Copy link
Contributor

jdx commented Jun 7, 2018

We're aware of this issue. This issue is already tracking it. You keep posting the same information and that is not helpful. We're all at a company-wide conference this week so our availability is very spotty. This is our top priority right now though and as soon as I have some time I will resolve the issue.

@wilharlley
Copy link

@jdxcode
Now I understand. Excuse. Evolving, always. Thanks for the feedback.

@johnvross
Copy link

Just FYI I am having the same problem when I try to 'heroku login'. I have completely removed node and npm.

@Marciodm
Copy link

Marciodm commented Jun 8, 2018

I am facing the same problem in windows 10.

`heroku login
heroku: Enter your login credentials
Email: [email protected]: Cannot read property 'body' of undefined
at new HerokuAPIError (C:/Program Files/heroku/client/node_modules/@heroku- 
cli/command/lib/api_client.js:12:33)`
at Login.login (C:/Program Files/heroku/client/node_modules/@heroku- 
cli/command/lib/login.js:78:19)`

@johnvross
Copy link

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.

@Marciodm
Copy link

Marciodm commented Jun 8, 2018

Thank you @johnvross !
For now I'll use your tip. I hope they'll sort it out soon enough.

@AndreaPontrandolfo
Copy link

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!

@jdx
Copy link
Contributor

jdx commented Jun 9, 2018

I wasn't able to reproduce this at all. I did ship a beta just now though that forces some of the dependencies to be updated which I think may have been causing this.

Can someone try running heroku update beta to see if this fixes the issue? You'll need to be on an updatable version of the CLI for this to work. Run curl https://cli-assets.heroku.com/install.sh | sh to install standalone.

@Marciodm
Copy link

Marciodm commented Jun 10, 2018

Hello @jdxcode !
I just ran, but the error is now another.

´C:\Users\Marcio
λ heroku update beta
heroku: Updating CLI from 7.0.87 to 7.0.87-beta.5da7c01 (beta)... done
heroku: Updating CLI... done

´C:\Users\Marcio
λ heroku login
heroku: Enter your login credentials
Email: ######@gmailError: invalid error
    at new HerokuAPIError (C:/Users/Marcio/AppData/Local/heroku/client/7.0.87- 
beta.5da7c01/node_modules/@heroku-cli/command/lib/api_client.js:13:19)
    at Login.login (C:/Users/Marcio/AppData/Local/heroku/client/7.0.87- 
beta.5da7c01/node_modules/@heroku-cli/command/lib/login.js:78:19)´

@jdx
Copy link
Contributor

jdx commented Jun 10, 2018

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.

@jdx jdx closed this as completed Jun 10, 2018
@Marciodm
Copy link

Hello @jdxcode !
It's working perfectly now.
Thank you very much for the support.

@foxenn
Copy link

foxenn commented Jun 15, 2018

@johnvross thank you, worked

@madanedeepali
Copy link

madanedeepali commented May 19, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants