Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku login - JSONError: Unexpected end of JSON input while parsing near ' '

I am trying to login to my Heroku account in my terminal. But, when I type heroku login, a message appears saying press a key to open up my browser but the browser does not open and the login fails then, this message appears.

JSONError: Unexpected end of JSON input while parsing near ' '
at module.exports (/usr/lib/heroku/node_modules/parse-json/index.js:26:19)
at HTTP._parse (/usr/lib/heroku/node_modules/@heroku-cli/plugin-auth/node_modules/http-call/lib/http.js:343:25)

Note that, I am using virtual machine vagrant if it is important !. Also, I am using Ubuntu OS.

enter image description here

Update: I tired to login without using a virtual machine and I successfully logged in So, I suspect Vagrant is the problem !.

like image 975
Omar Elewa Avatar asked Apr 26 '19 20:04

Omar Elewa


1 Answers

I found the solution to this problem Along with the heroku login use --interactive flag.

heroku login --interactive

here is the link where you can read about it

like image 103
Md.Shahazad Uddin Avatar answered Nov 01 '22 14:11

Md.Shahazad Uddin