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

JSON Error on Arch #640

Closed
sempervictus opened this issue Dec 30, 2020 · 2 comments
Closed

JSON Error on Arch #640

sempervictus opened this issue Dec 30, 2020 · 2 comments

Comments

@sempervictus
Copy link

When attempting to install an image from the Cockpit UI, this error message is thrown instead of deploying the image:

Danger alert:Failed to download image docker.io/bytemark/smtp:latest
Error message:Unexpected token { in JSON at position 64
@michael-c-hoffman
Copy link

I too am receiving this error:
cockpit-podman-26-1.module_el8.4.0+581+8bd31022.noarch
The image does infact download and am able to start and run a container using the downloaded image correctly, this seems to be more of a cosmetic issue than an actual error.

marusak added a commit to marusak/cockpit-podman that referenced this issue Jan 4, 2021
Reply from podman is somewhat like this:
```
$ sudo curl -X POST --unix-socket /run/podman/podman.sock http://d/v1.24/libpod/images/pull?reference=fedora
{"stream":"Resolved short name \"fedora\" to a recorded short-name alias (origin: /etc/containers/registries.conf.d/shortnames.conf)\n"}
{"stream":"Trying to pull registry.fedoraproject.org/fedora:latest...\n"}
{"stream":"Getting image source signatures\n"}
{"stream":"Copying blob sha256:8fde7942e775327f2d6ddaf08f45fda74201a7769951b0413860e21b59b4bf82\n"}
{"stream":"Copying config sha256:79fd58dc76113dac76a120f22cadecc3b2d1794b414f90ea368cf66096700053\n"}
{"stream":"Writing manifest to image destination\n"}
{"stream":"Storing signatures\n"}
{"images":["79fd58dc76113dac76a120f22cadecc3b2d1794b414f90ea368cf66096700053"]}
{"id":"79fd58dc76113dac76a120f22cadecc3b2d1794b414f90ea368cf66096700053"}
```
Since it is not a single JSON object we fail to parse it. But we don't really
care about any of it, so let's not parse it.

Fixes cockpit-project#640
@marusak
Copy link
Member

marusak commented Jan 4, 2021

Good catch, thanks! I sent #642 which fixes this.

marusak added a commit to marusak/cockpit-podman that referenced this issue Jan 4, 2021
We have shown error on every pull because we tried to parse the whole
response as one JSON, but in fact it is a group of JSONs. That meant we
failed to notice the fact that we were not showing any useful error when
downloading actually failed. (We always just shown that we could not
parse the response)

Fixes cockpit-project#640
@marusak marusak closed this as completed in d4cdfa7 Jan 4, 2021
KKoukiou pushed a commit to marusak/cockpit-podman that referenced this issue Feb 11, 2021
We have shown error on every pull because we tried to parse the whole
response as one JSON, but in fact it is a group of JSONs. That meant we
failed to notice the fact that we were not showing any useful error when
downloading actually failed. (We always just shown that we could not
parse the response)

Fixes cockpit-project#640
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