Bug in Chrome on OSX: Stylish does not show installed styles

edited April 2018 in Stylish Chrome
Nothing appears in "Installed" tab for any site, even though the active style count shows there are multiple installed and active, and they're clearly being applied. Nothing appears in the "Manage All Styles" extension settings page either. I've tried restarting Chrome, removing and reinstalling the extension, enabling and disabling the extension, and uninstalling and reinstalling styles. I have the current version of Stylish extension: 2.0.1, and Chrome 66.0.3359.117

Here are the errors I see in console from "Inspect views", "manage.html":

manage.html:1 Error in event handler for (unknown): TypeError: Cannot read property 'localeCompare' of undefined
at chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/manage/manage.js:22:23
at showStyles (chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/manage/manage.js:21:12)
And from "Inspect views", "background page":

_generated_background_page.html:1 Error in event handler for runtime.onMessage: TypeError: Cannot read property 'filter' of undefined
at getApplicableSections (chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/storage.js:258:35)
at chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/storage.js:121:38
at filterStyles (chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/storage.js:120:25)
at getStyles (chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/storage.js:46:18)
at chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/background.js:273:26
background.js:242 Uncaught (in promise) TypeError: Cannot read property 'forEach' of undefined
at stpoc (chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/storage.js:332:32)
at chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/storage.js:435:17
at Array.forEach ()
at chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/storage.js:434:17
at getStyles (chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/storage.js:46:9)
at chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/storage.js:330:9
at new Promise ()
at getStylesData (chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/storage.js:322:12)
at chrome-extension://fjnbnpbmkenffdnngjfgmeleoegfcffe/src/background.js:242:9
at EventImpl.dispatchToListener (extensions::event_bindings:403:22)

Comments

  • edited April 2018 Chrome
    Note that I can't uninstall any styles individually because they're missing from the UI, so by "uninstalling and reinstalling styles" I mean reinstalling the extension, then adding one or two random styles.
  • Here's a really annoying work around for removing styles:
    Open stylish inspector console from chrome://extensions -> Stylish details -> Inspect views: background page
    Retrieve list of styles with `getStyles({}, x => window.styles = x)`
    Review list with `styles.map(s => [s.name, s.id])`
    Delete specific style with `deleteStyle(10)`
  • edited May 2018 Chrome
    Ahah, I figured out the bug, at least partially and enough to undo the problem, but don't know what caused it initially. There was a malformed style in the DB somehow, with only {enabled: false, id: 14} that was causing problems with the lack of a sections property. Simply manually deleted it with the above code and everything works now.
Sign In or Register to comment.