cockpit-docker icon indicating copy to clipboard operation
cockpit-docker copied to clipboard

After installing cockpit-docker I get an Ooops at the top for the plugin

Open MichaelData opened this issue 4 years ago • 2 comments

After installing cockpit-docker I get an error for cockpit-docker

When checking the error in the browser I get this

Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self' https://xxxx:9090". Either the 'unsafe-inline' keyword, a hash ('sha256-BMIkowAqVEI88ibUJ1NtYB8ByZOuS4MTi73eGoFo2+Q='), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback.

Uncaught TypeError: Cannot read property 'text' of null at SiteDialog.setupAdd (contentScriptSiteDialog.js:1) at SiteDialog.setSiteDialogMessage (contentScriptSiteDialog.js:1) at SiteDialog.setup (contentScriptSiteDialog.js:1) at dialog.js:1 at D (dialogs.js:1) at e (dialogs.js:1) at Object.success (dialogs.js:1) at c (jquery-3.6.0.min.js:2) at Object.fireWith [as resolveWith] (jquery-3.6.0.min.js:2) at l (jquery-3.6.0.min.js:2)

Uncaught ReferenceError: jQuery is not defined at Object.jquery (external "jQuery":1) at __webpack_require__ (bootstrap:19) at Module../pkg/docker/containers.js (docker.js:209491) at __webpack_require__ (bootstrap:19) at Object.0 (docker.js:216923) at __webpack_require__ (bootstrap:19) at bootstrap:83 at bootstrap:83 jquery @ external "jQuery":1 __webpack_require__ @ bootstrap:19 ./pkg/docker/containers.js @ docker.js:209491 __webpack_require__ @ bootstrap:19 0 @ docker.js:216923 __webpack_require__ @ bootstrap:19 (anonymous) @ bootstrap:83 (anonymous) @ bootstrap:83

I've got no idea what's wrong.

MichaelData avatar Aug 03 '21 10:08 MichaelData

I get the exact same thing, it appears something has changed which is breaking this :(

From what I can tell, jquery is being added by npm, but the browser is refusing to load it:

The resource from “https://pluto.thechubbypanda.net/cockpit/$f558c64056511a6a25bc5895457deb9008f02323fb8b98376a543ba88ba67250/base1/jquery.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

yottapanda avatar Aug 16 '21 16:08 yottapanda

See this PR #12 as a fix has been included.

mrevjd avatar Dec 10 '21 01:12 mrevjd