cockpit-project / cockpit-podman

Cockpit UI for podman containers
GNU Lesser General Public License v2.1
447 stars 90 forks source link

UI Crash While Loading Podman View #778

Closed ravindk89 closed 3 years ago

ravindk89 commented 3 years ago

So there's a lot here that could be user error, so I'll try to make this as straightforward as possible. Hardware is an R710, nothing too extraordinary hardware-wise. Install is fresh as of this afternoon, so there shouldn't be too much cruft in the way here.

1) Running on Ubuntu 20.04, using the instructions from Hitesh Jethva to install Podman 3.3.1

2) Installed Cockpit via apt, everything appears to be running fine

3) Cloned cockpit-podman, installed npm 6.14.4 and node 10.19.0 from apt

4) ran make install - installer throws warnings about babel, but otherwise works

5) Podman shows up in Cockpit. Clicking it results in the following errors:

GEThttps://192.168.1.14:9090/cockpit/$7159fc7e80a540357e0a77cbd636824d3e92e3fc517f6be835b21c4c992c43a6/podman/po.js
[HTTP/1.1 404 Not Found 18ms]

The resource from “https://192.168.1.14:9090/cockpit/$7159fc7e80a540357e0a77cbd636824d3e92e3fc517f6be835b21c4c992c43a6/podman/po.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
index.html
GEThttps://192.168.1.14:9090/cockpit/$7159fc7e80a540357e0a77cbd636824d3e92e3fc517f6be835b21c4c992c43a6/podman/po.js
[HTTP/1.1 404 Not Found 23ms]

The resource from “https://192.168.1.14:9090/cockpit/$7159fc7e80a540357e0a77cbd636824d3e92e3fc517f6be835b21c4c992c43a6/podman/po.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
index.html
...

Uncaught TypeError: cockpit__WEBPACK_IMPORTED_MODULE_2___default().language is undefined
... (Long stacktrace of minified code, no idea if it would be helpful to include)

The above error occurred in the <Images> component:
    in Images (created by Application)
    in div (created by Gallery)
    in Gallery (created by Application)
    in section (created by PageSection)
    in PageSection (created by Application)
    in main (created by Page)
    in div (created by Page)
    in Page (created by Application)
    in Application

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.

...

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
    in Application

I hit this in both latest build and from the tag for latest stable. Not sure how to proceed from here, so any advice would be appreciated. All other cockpit functions appear to be stable.

marusak commented 3 years ago

What's the version of cockpit packages that you are using?

The page is blank and you see Oops on top right?

ravindk89 commented 3 years ago

The page is blank and you see Oops on top right?

Yes. I tried this with both latest master and from checkout of the last stable tag. I'm just using make install, but if there's a better or more reliable way to install the plugin, I'd be happy to learn. My googling didn't add much clarity on how to install plugins otherwise.

martinpitt commented 3 years ago

Can you please check dpkg -l cockpit-system? My suspicion is that you are using the version from 20.04 final, i. e. 215. Could you try upgrading to the latest 252 version from backports?

ravindk89 commented 3 years ago

My suspicion is that you are using the version from 20.04 final, i. e. 215

That's almost certainly the case. Backports does appear to have 252, so I'll install that this evening and see what happens. Thank you for the guidance.

Is there something between 215 and 252 that is necessary for cockpit-podman ? If so, assuming this works, I'd be happy to open a PR to update the readme to make that guidance explicit for others using Ubuntu LTS

ravindk89 commented 3 years ago

@martinpitt bingo. Upgrading to 252~1 fixed the issue.

If there are no objections I can note this in the readme for other Ubuntu 20.04 LTS users.