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

unexpected end of JSON input #337

Closed
Hades32 opened this issue Apr 6, 2016 · 8 comments
Closed

unexpected end of JSON input #337

Hades32 opened this issue Apr 6, 2016 · 8 comments
Assignees
Milestone

Comments

@Hades32
Copy link

Hades32 commented Apr 6, 2016

OS: Windows 10
Shell: Msys2, Part of Git 2.7.0.windows.1
Logged in with token and organisation.

marti@WIN-SJ0A7GO32DV /d/Temp
$ scw images
time="2016-04-06T23:26:42+02:00" level=fatal msg="cannot execute 'images': unable to fetch images from the Scaleway API: unexpected end of JSON input"

@QuentinPerez
Copy link
Contributor

Hi @Hades32, thank you for your feedback ☺️

Do you have the last version of scw ?

@Hades32
Copy link
Author

Hades32 commented Apr 6, 2016

Ah sorry, of course THAT I forgot :)

I downloaded the newest release 1.9

@moul
Copy link
Contributor

moul commented Apr 7, 2016

@Hades32 can you run scw -D images (-D is for debug)

@moul moul added the bug label Apr 7, 2016
@moul moul modified the milestone: 1.10.0 Apr 7, 2016
@Hades32
Copy link
Author

Hades32 commented Apr 7, 2016

Hmm, looks like I was not supposed to enter the name of the organisation...

$ scw -D images
time="2016-04-07T22:28:48+02:00" level=debug msg="curl -X GET -H \"Content-Type: application/json\" -H \"User-Agent: scw/v1.9.0\" -H \"X-Auth-Token: 00000000-0000-1000-0000-000000000000\" https://api-marketplace.scaleway.com/images/"
time="2016-04-07T22:28:49+02:00" level=debug msg="curl -X GET -H \"Content-Type: application/json\" -H \"User-Agent: scw/v1.9.0\" -H \"X-Auth-Token: 00000000-0000-1000-0000-000000000000\" \"https://api.scaleway.com/images?organization=invaliduuid\""
time="2016-04-07T22:28:50+02:00" level=debug msg="Validation Error" Message= StatusCode=400 Type="invalid_request_error"
time="2016-04-07T22:28:50+02:00" level=debug msg="  organization:                  [Martin Rauscher is not a valid UUID.]"
time="2016-04-07T22:28:50+02:00" level=fatal msg="cannot execute 'images': unable to fetch images from the Scaleway API: unexpected end of JSON input"

@Hades32
Copy link
Author

Hades32 commented Apr 7, 2016

So I guess the bug is just a bad error message...

@QuentinPerez
Copy link
Contributor

Today, I tested scw on windows and it doesn't work as excepted 😑, I will try to investigate and fix the compatibility

@moul
Copy link
Contributor

moul commented Apr 8, 2016

#343 should (at least partially) fix this

@QuentinPerez
Copy link
Contributor

Hi @Hades32 the commit e8b714e seems to patch the bad error message

DEBU[0000] curl -X GET -H "Content-Type: application/json" -H "User-Agent: scw/v1.9.0+dev" -H "X-Auth-Token: 00000000-0000-1000-0000-000000000000" https://api-marketplace.scaleway.com/images/
DEBU[0000] curl -X GET -H "Content-Type: application/json" -H "User-Agent: scw/v1.9.0+dev" -H "X-Auth-Token: 00000000-0000-1000-0000-000000000000" https://api.scaleway.com/images?organization=invaliduuid
DEBU[0000] Validation Error                              Message= StatusCode=400 Type=invalid_request_error
DEBU[0000]   organization:                  [woiejoiwej is not a valid UUID.]
FATA[0000] cannot execute 'images': unable to fetch images from the Scaleway API: Validation Error

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

3 participants