doctl icon indicating copy to clipboard operation
doctl copied to clipboard

"Unexpected end Of JSON input" error doing `doctl serverless deploy`.

Open gurleensethi opened this issue 2 years ago • 10 comments

Describe the Issue:

Getting the following error when trying to deploy to DigitialOcean functions using doctl.

$ doctl serverless deploy do-fn-go-playground --verbose  --verbose-build
Error: unexpected end of JSON input

Environment:

  • doctl version: doctl version 1.92.0-release
  • OS: macOS 13.0.1
  • Installation method: Homebrew

Additional Details:

I asked the same question on DigitialOcean Community Questions where you can find more details.

gurleensethi avatar Jan 24 '23 03:01 gurleensethi

Some additional details here from the question linked above:

Ok, so installing from source (via go install) works. I think there might be something buggy in the latest release. Tired running via the provided doctl Docker image and got the same error, whereas when I tried to set up an alpine Docker image and installed doctl from the source it worked. So there is something going on when you make the release binary.

bobbyiliev avatar Jan 28 '23 12:01 bobbyiliev

Similar issue here, doctl provides no details so it's very difficult to debug.

jackofsometrade avatar Mar 29 '23 22:03 jackofsometrade

@jackofsometrade Try installing by go install ... it should work.

Make sure to remove the installation from brew before that.

gurleensethi avatar Mar 30 '23 01:03 gurleensethi

I'm having the same issue. I'm on a 22.04 ubuntu docker container inside my Mac. I've installed the ARM version and still. How come there's no answer to this after a year?

mifraburneo avatar Mar 06 '24 23:03 mifraburneo

@mifraburneo what is the version that you are using?

I've tested this with the latest version on Mac and it works as expected:

doctl version     
doctl version 1.104.0-release

Also what is the exact Docker image that you are using?

bobbyiliev avatar Mar 08 '24 06:03 bobbyiliev

@bobbyiliev I used ubuntu:22.04 from Docker Hub. It did worked after installing golang and then building it with go install... though

mifraburneo avatar Mar 08 '24 07:03 mifraburneo

Any update here? I'm running into the same exact issue attempting to run doctl serverless deploy using the digitalocean/doctl image on Docker Hub.

CThaw90 avatar Apr 21 '24 14:04 CThaw90

@CThaw90 Can you confirm the exact OS that you are running the Docker container on?

bobbyiliev avatar Apr 21 '24 15:04 bobbyiliev

@bobbyiliev Running on both macOS Sonoma 14.4.1 and Ubuntu 22.04 yields same error result. I am actually running the ubuntu-22.04 from github actions runner.

CThaw90 avatar Apr 21 '24 15:04 CThaw90

@bobbyiliev Among further investigation this seems like it's an issue solely with the docker image. I just downloaded the doctl binary directly to the actions runner and was able to use ./doctl serverless deploy with no issues, same with directly downloading on macOS. It seems running the commands with https://hub.docker.com/r/digitalocean/doctl causes the errors.

CThaw90 avatar Apr 21 '24 17:04 CThaw90