freedomofpress / dangerzone

Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs
https://dangerzone.rocks/
GNU Affero General Public License v3.0
3.64k stars 172 forks source link

Invalid JSON return from container: See 'docker run --help' #253

Open deeplow opened 1 year ago

deeplow commented 1 year ago
    Unfortunately I have not been able to test Dangerzone because converting a PDF fails with the following error message: 
Screenshot 2022-11-17 at 2 51 42 PM

Any idea what may cause this? Docker installed fine. I'm running MacOS 13.0.1 with Docker Desktop 4.13.1 (90346).

Originally posted by @CR0CKER in https://github.com/freedomofpress/dangerzone/issues/243#issuecomment-1318120510

deeplow commented 1 year ago

@apyrgio said:

Interesting. It seems that the Docker daemon runs (else Dangerzone would have complained at startup), but the Dangerzone container does not start.

Can you please open a terminal, run the following commands, and provide the output here?

sudo docker info
sudo docker run hello-world

@CR0CKER replied:

Here's what I got:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.9.1)
  compose: Docker Compose (Docker Inc., v2.12.1)
  dev: Docker Dev Environments (Docker Inc., v0.0.3)
  extension: Manages Docker extensions (Docker Inc., v0.2.13)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.21.0)
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete 
Digest: sha256:faa03e786c97f07ef34423fccceeec2398ec8a5759259f94d99078f264e9d7af
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

@apyrgio

I see, thanks for the command outputs. It seems that you can run containers, so we've covered that.

Next thing I'd like to ask is if this happens with other file names. For instance, I see that this filename has spaces in it. I recall we've fixed some space issues in the upcoming 0.4.0 release. Could you create a copy of this document with no spaces and test again?

deeplow commented 1 year ago

Running Dangerzone in the terminal could provide some more insights. My suggestion would be to rename the file to something without spaces and seeing what it prints to the terminal. It should print the exact line it is telling docker to run (that line start with >.