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

Handle logged out users with grace #174

Closed
codigoconjuan opened this issue Nov 4, 2018 · 8 comments
Closed

Handle logged out users with grace #174

codigoconjuan opened this issue Nov 4, 2018 · 8 comments
Labels
area: command: login area: dx type: bug code to address defects in shipped code

Comments

@codigoconjuan
Copy link

Everything stopped from working 2 hours ago

when i try to deploy a new site i have:

netlify status
──────────────────────┐
Current Netlify User │
──────────────────────┘
FetchError: invalid json response body at https://api.netlify.com/api/v1/accounts reason: Unexpected end of JSON input
at /usr/local/lib/node_modules/netlify-cli/node_modules/node-fetch/lib/index.js:239:32
at

same when i add netlify deploy

when i type : netlify login i have:

netlify login
Already logged in!

I'm using a Mac, Node JS version 8.11.3 and npm 5.6

@codigoconjuan
Copy link
Author

ok so i dig it into my files, in mac by default all the files that begin with . will be hidden, so you need to make them visible, then navigate to your user folder, and remove the .netlify folder, then type

netlify login

this will generate new credentials

@bcomnes
Copy link
Contributor

bcomnes commented Dec 5, 2018

Thanks for the report, sounds like we aren't handling a loading error.

@bcomnes bcomnes added the bug label Dec 5, 2018
@shiling
Copy link

shiling commented Jan 15, 2019

ok so i dig it into my files, in mac by default all the files that begin with . will be hidden, so you need to make them visible, then navigate to your user folder, and remove the .netlify folder, then type

netlify login

this will generate new credentials

Ran in the same problem, this fixed it for me. Not sure if this problem occured because I changed my password, so the credentials stored under .netlify was invalidated?

@j0b0sapi3n
Copy link

Just ran into this same problem. I fixed it by just doing netlify logout and then netlify login. I think it was because I changed my password recently, which makes sense why it wasn't working from a security standpoint but ya this error should probably be handled better.

@mrlubos
Copy link

mrlubos commented Sep 22, 2019

Still an issue!

@kalinchernev
Copy link

Re-create credentials, or simply double-check correctly used such.

@RaeesBhatti RaeesBhatti changed the title Unexpected end of JSON input when netlify deploy or netlify status Handle logged out users with grace Apr 19, 2020
@RaeesBhatti RaeesBhatti added type: bug code to address defects in shipped code and removed bug labels May 6, 2020
@erezrokah
Copy link
Contributor

erezrokah commented Aug 19, 2020

For a quick reproduction you could revoke the Netlify CLI permissions under:
https://app.netlify.com/user/applications

or NETLIFY_AUTH_TOKEN=1 netlify status

@sarahetter
Copy link
Contributor

Closing as stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: command: login area: dx type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

9 participants