Jean-Tinland / simple-bar

A yabai status bar widget for Übersicht
https://www.jeantinland.com/toolbox/simple-bar
MIT License
1.21k stars 129 forks source link

Netstats without graph #416

Closed ai4bing closed 3 months ago

ai4bing commented 3 months ago

Describe the bug

When Display as graph is unchecked under Network stats, Übersicht debug console gives error on refresh, and simple-bar widget disappears.

By switching away and back to Show on Built-in Retina Display in Übersicht, widget comes back again.

Error in debug console (foreground)
[Error] The above error occurred in one of your React components:
    in Unknown
    in div
    in Inner (created by Widget)
    in div (created by Widget)
    in Widget
    in Unknown
    in div
    in div
    in SimpleBarContextProvider
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.
        (anonymous function) (client.js:1:573223)
        logError (client.js:1:573241)
        (anonymous function) (client.js:1:590956)
        (anonymous function) (client.js:1:425915)
        commitUpdateQueue (client.js:1:425925)
        commitLifeCycles (client.js:1:578825)
        commitLayoutEffects (client.js:1:631571)
        callCallback (client.js:1:230570)
        dispatchEvent
        invokeGuardedCallbackImpl (client.js:1:230657)
        invokeGuardedCallback (client.js:1:231854)
        (anonymous function) (client.js:1:625487)
        (anonymous function) (client.js:1:857894)
        commitRoot (client.js:1:622435)
        (anonymous function) (client.js:1:613110)
        performSyncWorkOnRoot (client.js:1:613117)
        (anonymous function) (client.js:1:400130)
        (anonymous function) (client.js:1:857894)
        flushSyncCallbackQueueImpl (client.js:1:400025)
        flushSyncCallbackQueue (client.js:1:399869)
        scheduleWork (client.js:1:601923)
        dispatchAction (client.js:1:487845)
        (anonymous function) (simple-bar-index-jsx:1788)

[Error] 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 a useEffect cleanup function.
    in Unknown
    in div
    in div
    in SimpleBarContextProvider
        printWarning (client.js:1:228280)
        error (client.js:1:227860)
        (anonymous function) (client.js:1:602889)
        scheduleWork (client.js:1:603210)
        dispatchAction (client.js:1:487845)
        (anonymous function) (simple-bar-index-jsx:1782)

Information (please complete the following information):

Jean-Tinland commented 3 months ago

It seems that I introduced a bug in a recent commit. Thank you for reporting this issue!

I just pushed a fix that should correct this behavior.

Please let me know if everything is working as expected on your end.

ai4bing commented 3 months ago

It now works, thank you for the really quick fix.