cockpit
cockpit copied to clipboard
packagekit: Minified React error #300 after applying updates
This happens every single time I do a software update. Soon as the update completes this is what I see:
ii cockpit-bridge 292-1~bpo22.04.1
ii cockpit-machines 283-1~bpo22.04.1
ii cockpit-networkmanager 292-1~bpo22.04.1
ii cockpit-packagekit 292-1~bpo22.04.1
ii cockpit-pcp 292-1~bpo22.04.1
ii cockpit-storaged 292-1~bpo22.04.1
ii cockpit-system 292-1~bpo22.04.1
ii cockpit-ws 292-1~bpo22.04.1
I tried to decode the error message from your screenshot, but I'm afraid it's too obfuscated to make sense of it. I prepared a build with proper debug information. Can you please download packagekit-debug.tar.gz, and extract it either as user in your ~/.local/share/cockpit/, or as root in /usr/local/share/cockpit/ ? Then please try doing a software update again. You should then get an useful error message. Thank you!
Latest error
index.js:8 You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) to ensure you have the correct code for your production build.
p @ index.js:8
index.js:581 Scrollbar test exception: TypeError: Cannot read properties of null (reading 'appendChild')
(anonymous) @ index.js:581
updates.jsx:1078 Tracer failed: "{"problem":null,"exit_status":1,"exit_signal":null,"message":"Traceback (most recent call last):\n File \"<string>\", line 3, in <module>\nModuleNotFoundError: No module named 'tracer'"}", data: """"
(anonymous) @ updates.jsx:1078
69Progress.tsx:116 One of aria-label or aria-labelledby properties should be passed when using the progress component without a title.
render @ Progress.tsx:116
2react-dom.development.js:16381 Uncaught Error: Rendered fewer hooks than expected. This may be caused by an accidental early return statement.
at renderWithHooks (react-dom.development.js:16381:11)
at updateFunctionComponent (react-dom.development.js:19588:20)
at beginWork (react-dom.development.js:21601:16)
at HTMLUnknownElement.callCallback2 (react-dom.development.js:4164:14)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:16)
at invokeGuardedCallback (react-dom.development.js:4277:31)
at beginWork$1 (react-dom.development.js:27451:7)
at performUnitOfWork (react-dom.development.js:26560:12)
at workLoopSync (react-dom.development.js:26466:5)
at renderRootSync (react-dom.development.js:26434:7)
react-dom.development.js:18687 The above error occurred in the <PackageList> component:
at PackageList (https://HOST/cockpit/$a0303e39fd1625b6db0c0360f2124cc650b0c941271d368e8be55de50ea6cbe8/updates/updates.js:115602:24)
at div
at div
at ExpandableSection (https://HOST/cockpit/$a0303e39fd1625b6db0c0360f2124cc650b0c941271d368e8be55de50ea6cbe8/updates/updates.js:93939:7)
at div
at UpdateSuccess (https://HOST/cockpit/$a0303e39fd1625b6db0c0360f2124cc650b0c941271d368e8be55de50ea6cbe8/updates/updates.js:116815:26)
at section
at PageSection (https://HOST/cockpit/$a0303e39fd1625b6db0c0360f2124cc650b0c941271d368e8be55de50ea6cbe8/updates/updates.js:95163:11)
at main
at div
at Page (https://HOST/cockpit/$a0303e39fd1625b6db0c0360f2124cc650b0c941271d368e8be55de50ea6cbe8/updates/updates.js:94886:7)
at WithDialogs (https://HOST/cockpit/$a0303e39fd1625b6db0c0360f2124cc650b0c941271d368e8be55de50ea6cbe8/updates/updates.js:114579:24)
at OsUpdates (https://HOST/cockpit/$a0303e39fd1625b6db0c0360f2124cc650b0c941271d368e8be55de50ea6cbe8/updates/updates.js:117059:7)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
logCapturedError @ react-dom.development.js:18687
react-dom.development.js:26923 Uncaught Error: Rendered fewer hooks than expected. This may be caused by an accidental early return statement.
at renderWithHooks (react-dom.development.js:16381:11)
at updateFunctionComponent (react-dom.development.js:19588:20)
at beginWork (react-dom.development.js:21601:16)
at beginWork$1 (react-dom.development.js:27426:14)
at performUnitOfWork (react-dom.development.js:26560:12)
at workLoopSync (react-dom.development.js:26466:5)
at renderRootSync (react-dom.development.js:26434:7)
at recoverFromConcurrentError (react-dom.development.js:25850:20)
at performConcurrentWorkOnRoot (react-dom.development.js:25750:22)
at workLoop (scheduler.development.js:266:34)
Any plans for a fix for this?
Thanks for the symbolic trace. I'm afraid it still doesn't tell me anything. The PackageList component is fairly small and purely functional; no state, no conditions. The only "magic" think is the tooltipRef.
@KKoukiou , @jelly , does this ring a bell for you?
@martinpitt no, I can't really see what can fail here. An interesting question is maybe if there are additional repositories configured with which we might be able to reproduce the issue?
@tgwaste do you use any browser plugin that would watch out for React errors and make them fatal, or so? react-dom.development.js
sounds like that. "Rendered fewer hooks than expected" sounds like the kind of error message that we should see in our NODE_ENV=development
test run (but we don't), but that's not the kind of error that normally goes into a production build / distro package.
If this can be reproduced with a plugin, that'd be interesting. But so far it's not reproducible.
these are all the plugs in use
Hi,
I have been encountering the same problem for a long time on Edge(chromium) and Firefox. All I can add here is that I have an entirely different set of browser plugins installed.
Encountered this error and my issue was that I had a return
statement before a useEffect
. Moving the return
statement after the useEffect
fixed my issue.