Cockpit: Usage pages broken in 210

Created on 10 Jan 2020  Â·  17Comments  Â·  Source: cockpit-project/cockpit

  • Cockpit Version: 210
  • OS: Ubuntu 18.04.3 LTS

Installed using bionic-backports:

sudo apt-get install -t bionic-backports cockpit

I have made no other changes.

Cockpit appears functional and allows me to login, reports most information about my system. However the Usage Graphs pages appear blank or with error.

Screenshot of Usage Page

I have tested this on both Firefox (72.0.1 x64) and Chrome.

(79.0.3945.117) My browser console shows errors:

Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self' https://ubuntu-vm:9090". Either the 'unsafe-inline' keyword, a hash ('sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback.

How can I resolve this issue?

Most helpful comment

So this is not ubuntu related, as I was guessing in one of my previous comments.
Fedora 31, cockpit-210-1.fc31.x86_64 (not development build, but from what we have in repos)
notubunturelated

All 17 comments

Cockpit Version: 210
OS: Ubuntu 18.04.3 LTS

I also get the same error
Everything worked fine in the previous version, I only do sudo apt-get upgrade.

image

Everything worked fine in the previous version

In 209? Because this change was introduced in 209 and there were no related changes in 210 (but it could get broken).

I have not tested 209, but I have verified 208 is working on my platform.

Yeah, 208 was before we redesigned the overview page.
If you could help and test 209, that would be awesome, but otherwise we will consider this being broken on 209 as well.
I noticed pattern between both reports being Ubuntu 18.04.3 LTS.

I also have the issue reported on the top of this report. Debian unstable x86, cockpit 210.
Tested with firefox, brave, chrome and opera on linux and with chromium and chrome on windows (latest and x64 version on all of them), and every single browser reports the same error on the js console.

I Can't find 209

image
image

image

209 was not packaged on ubuntu, as it was not packaged on debian too. They both "jumped" from 208 straight to 210.
http://changelogs.ubuntu.com/changelogs/pool/universe/c/cockpit/cockpit_210-1/changelog
https://metadata.ftp-master.debian.org/changelogs//main/c/cockpit/cockpit_210-1_changelog

I have this issue aswell.

So this is not ubuntu related, as I was guessing in one of my previous comments.
Fedora 31, cockpit-210-1.fc31.x86_64 (not development build, but from what we have in repos)
notubunturelated

Same issue here too.

Please advise how to install older versions of Cockpit-- not only to test 209 but to install 208 on systems I'd like to get up and running.

@onefourfive: On https://launchpad.net/ubuntu/+source/cockpit/+changelog you have all versions that ever got built. E. g. the latest 208 build for amd64 is https://launchpad.net/ubuntu/+source/cockpit/208-1~ubuntu18.04.1/+build/18206246, where you can download the debs. Just downgrading cockpit-system should be enough.

It does not seem to be fixed with 9f8ff73 unfortunately

@marusak: Hmkay, the layout is fine again for me. The CPU and memory page is still Oopsing, but that's #13290 (I'll look into that now).

Are you still able to reproduce this issue with current master? Which browser?

brroken
I built rpms (as this was never issue development builds). I also checked that changes from that commit are actually there. Happens on both firefox and chrome.

@marusak: Correct. This is a packaging issue. The appropriate JS & CSS is not being included. No amount of CSS changes will ever fix this, as it's a problem with the files being loaded in the first place (and not CSS).

If you have a local git checkout of Cockpit and build Cockpit yourself with the symlink for development, then you won't come across this issue, as the correct files will be built. Packages (some or all — not sure) aren't including the right files, it seems.

Hmm, /usr/share/cockpit/systemd/graphs.html.gz seems to correctly include it:

<link href="graphs.css" rel="stylesheet">

and /usr/share/cockpit/systemd/graphs.css.gz exists (shipped in cockpit-system.rpm) and looks reasonable. It's exactly the same structure as e. g. with logs.{html,css.gz}. I checked this on the real Fedora 31 RPMs for cockpit 210 (i. e. production build).

I built rpms from master and tested them in a VM (fedora-31). Same file structure, the graphs pages work (both overview and individual CPU and memory).

In short: I see nothing wrong, can't reproduce this issue with master (plus #13420), and thus have absolutely no idea what's wrong.. Let's look at @marusak's machine in Brno then?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gorgitko picture gorgitko  Â·  6Comments

kai4785 picture kai4785  Â·  4Comments

FireDrunk picture FireDrunk  Â·  6Comments

851d229 picture 851d229  Â·  6Comments

kxxoling picture kxxoling  Â·  5Comments