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

Host toggle(ct-switcher) not available anymore #21453

Closed
BrotherPatrix opened this issue Dec 19, 2024 · 1 comment
Closed

Host toggle(ct-switcher) not available anymore #21453

BrotherPatrix opened this issue Dec 19, 2024 · 1 comment
Labels

Comments

@BrotherPatrix
Copy link

Explain what happens

Upgraded from Fedora 40 to Fedora 41, and the version from cockpit changed from cockpit-329.1-1.fc40.src.rpm to cockpit-330-1.fc41.src.rpm. This results in the hosts toggle not being displayed anymore.
Before:
image

<div class="ct-switcher">
  <div class="pf-v5-c-select pf-m-dark">
    <button
      id="host-toggle"
      aria-labelledby="host-toggle"
      aria-expanded="false"
      aria-haspopup="listbox"
      type="button"
      class="ct-nav-toggle pf-v5-c-select__toggle pf-m-plain"
    >
      <span class="pf-v5-c-select__toggle-wrapper desktop_v">
        <span class="pf-v5-c-select__toggle-text"
          ><span id="current-username" class="username">username</span
          ><span class="at">@</span
          ><span class="hostname">hostname</span></span
        ></span
      ><svg
        class="pf-v5-svg pf-v5-c-select__toggle-arrow mobile_v pf-v5-c-icon pf-m-lg"
        viewBox="0 0 320 512"
        fill="currentColor"
        aria-hidden="true"
        role="img"
        width="1em"
        height="1em"
      >
        <path
          d="M288.662 352H31.338c-17.818 0-26.741-21.543-14.142-34.142l128.662-128.662c7.81-7.81 20.474-7.81 28.284 0l128.662 128.662c12.6 12.599 3.676 34.142-14.142 34.142z"
        ></path></svg
      ><span class="pf-v5-c-select__toggle-wrapper mobile_v">Host</span
      ><svg
        class="pf-v5-svg pf-v5-c-select__toggle-arrow desktop_v pf-v5-c-icon"
        viewBox="0 0 320 512"
        fill="currentColor"
        aria-hidden="true"
        role="img"
        width="1em"
        height="1em"
      >
        <path
          d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
        ></path>
      </svg>
    </button>
  </div>
</div>

After:
image

<div class="ct-switcher ct-switcher-localonly pf-m-dark">
  <span id="current-username" class="username">username</span
  ><span class="at">@</span><span class="hostname">hostname</span>
</div>

I also tried to access the other machines present on /etc/cockpit/machines.d/99-webui.json using the normal URL https://192.168.1.10:9090/@192.168.1.11/system and it just redirects back to the main machine.

Version of Cockpit

330

Where is the problem in Cockpit?

Navigation & Shell

Server operating system

Fedora

Server operating system version

Fedora 41

What browsers are you using?

Firefox, Chrome, Brave, Other

System log

Chromium:
system:14 
        
        
       GET https://192.168.1.10:9090/cockpit/@localhost/*/po.manifest.js net::ERR_ABORTED 404 (ERROR)
system:15 
        
        
       GET https://192.168.1.10:9090/cockpit/@localhost/*/po.js net::ERR_ABORTED 404 (ERROR)
system:1 Refused to execute script from 'https://192.168.1.10:9090/cockpit/@localhost/*/po.manifest.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
system:1 Refused to execute script from 'https://192.168.1.10:9090/cockpit/@localhost/*/po.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
overview.js:213 failed to fetch lastlog2: M {problem: null, exit_status: 1, exit_signal: null, message: '/var/lib/lastlog/lastlog2.db does not exist', toString: ƒ}
cockpit.js:6 cockpit.format_{bytes,bits}[_per_sec](..., GiB, [object Object]) is deprecated.
o @ cockpit.js:6
Fn.e.format_bytes @ cockpit.js:6
onMetricsUpdate @ overview.js:213
Ae @ cockpit.js:1
value @ cockpit.js:1
$e @ cockpit.js:6
kn @ cockpit.js:6
dispatch_data @ cockpit.js:4
B.onmessage @ cockpit.js:3
(anonymous) @ cockpit.js:1
postMessage
(anonymous) @ shell.js:104
dispatch_data @ cockpit.js:4
B.onmessage @ cockpit.js:3


Firefox:

Navigated to https://192.168.1.10:9090/system
Content-Security-Policy: Ignoring ‘block-all-mixed-content’ because mixed content display upgrading makes block-all-mixed-content obsolete. system
Content-Security-Policy: The page’s settings blocked an inline script (script-src-elem) from being executed because it violates the following directive: “default-src 'self'” single-file-extension-frames.js:1:295
Content-Security-Policy: The page’s settings blocked an inline script (script-src-elem) from being executed because it violates the following directive: “default-src 'self'” utils.js:42:10
GET
https://192.168.1.10:9090/cockpit/@localhost/*/po.manifest.js
NS_ERROR_CORRUPTED_CONTENT

GET
https://192.168.1.10:9090/cockpit/@localhost/*/po.js
NS_ERROR_CORRUPTED_CONTENT

The resource from “https://192.168.1.10:9090/cockpit/@localhost/*/po.manifest.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). system
The resource from “https://192.168.1.10:9090/cockpit/@localhost/*/po.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). system
GET
https://192.168.1.10:9090/cockpit/@localhost/*/po.manifest.js
NS_ERROR_CORRUPTED_CONTENT

The resource from “https://192.168.1.10:9090/cockpit/@localhost/*/po.manifest.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). system
Loading failed for the <script> with source “https://192.168.1.10:9090/cockpit/@localhost/*/po.manifest.js”. system:14:39
GET
https://192.168.1.10:9090/cockpit/@localhost/*/po.js
NS_ERROR_CORRUPTED_CONTENT

The resource from “https://192.168.1.10:9090/cockpit/@localhost/*/po.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). system
Loading failed for the <script> with source “https://192.168.1.10:9090/cockpit/@localhost/*/po.js”. system:15:30
Content-Security-Policy: Ignoring ‘block-all-mixed-content’ because mixed content display upgrading makes block-all-mixed-content obsolete. index.html
Content-Security-Policy: Ignoring ‘block-all-mixed-content’ because mixed content display upgrading makes block-all-mixed-content obsolete. index.html
Content-Security-Policy: Ignoring ‘block-all-mixed-content’ because mixed content display upgrading makes block-all-mixed-content obsolete. services.html
Content-Security-Policy: The page’s settings blocked an inline script (script-src-elem) from being executed because it violates the following directive: “default-src 'self'” single-file-extension-frames.js:1:295
Content-Security-Policy: The page’s settings blocked an inline script (script-src-elem) from being executed because it violates the following directive: “default-src 'self'” utils.js:42:10
Content-Security-Policy: The page’s settings blocked an inline script (script-src-elem) from being executed because it violates the following directive: “default-src 'self'” single-file-extension-frames.js:1:295
Content-Security-Policy: The page’s settings blocked an inline script (script-src-elem) from being executed because it violates the following directive: “default-src 'self'” single-file-extension-frames.js:1:295
Content-Security-Policy: The page’s settings blocked an inline script (script-src-elem) from being executed because it violates the following directive: “default-src 'self'” utils.js:42:10
Content-Security-Policy: The page’s settings blocked an inline script (script-src-elem) from being executed because it violates the following directive: “default-src 'self'” utils.js:42:10
failed to fetch lastlog2: 
Object { problem: null, exit_status: 1, exit_signal: null, message: "/var/lib/lastlog/lastlog2.db does not exist", toString: toString() }
overview.js:213:914
cockpit.format_{bytes,bits}[_per_sec](..., GiB, [object Object]) is deprecated. cockpit.js:6:9383
@martinpitt
Copy link
Member

Hello @BrotherPatrix ! Please see https://cockpit-project.org/blog/cockpit-322.html for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants