deluminate icon indicating copy to clipboard operation
deluminate copied to clipboard

Version 1.0.0 completely broken on some systems (update: fix waiting on Google)

Open 0x0054 opened this issue 1 year ago • 37 comments

What version of Chrome are you using?

Vivaldi 6.8.3381.53 (Stable channel) (64-bit)

What version of Deluminate do you have installed?

1.0.0

What Operating System are you using?

Windows 10

What is the problem?

Newest Update broke pretty much everything:

  1. All my "Saved Site Customizations" are gone.
  2. When Deluminate is on and you click to change modes, i.e. from Smart Invert to Normal it actually doesn't change anything.
  3. When you click on the Deluminate icon the button showing if Deluminate is enabled or not is blank. image Clicking it works but you actually don't know if it's on or not until you click the button.

Loved and used this extension for years, hope the changes either get reverted or fixed. And the extension worked perfectly fine on Vivaldi before this update so it's not something to do with that.

0x0054 avatar Aug 21 '24 02:08 0x0054

I'm seeing the same issue on Chrome Version 127.0.6533.119 (Official Build) (64-bit), on Ubuntu 22.04.04.

ademuri avatar Aug 21 '24 03:08 ademuri

Sorry about that! This is one of those situations where Google forced me to update, and so a revert isn't going to be possible, but I'd really like to figure out what's going on here and fix it ASAP. For what it's worth, I've been using it on Vivaldi myself, so I do expect it to work there.

Could you do me a favor: go to the extensions page in your browser (chrome://extensions) and click the "service worker" link, then copy/paste everything in a reply here?

After that, try closing all your browser windows and starting up again and see if that helps.

abstiles avatar Aug 21 '24 03:08 abstiles

The manifest v3 migration has been a huge pain. Thanks for maintaining Deluminate, it makes a big difference for me.

On the "Console" tab of the service worker, I see one error near the top:

Uncaught (in promise) TypeError: undefined is not a valid value in low_contrast,killbg,forceinput,dynamic,ignorebg
    at get (utils.js:34:11)
    at new SiteSettings (utils.js:370:5)
    at migrateV1toV2 (common.js:100:26)
    at common.js:42:41
    at async migrateFromLocalStorage (common.js:53:3)
    at async syncStore (common.js:116:3)
    at async background.js:215:7

And a whole bunch of this warning:

background.js:98
Failed to communicate with tab {"active":true,"audible":false,"autoDiscardable":true,"discarded":false,"favIconUrl":"https://ssl.gstatic.com/android-messages-web/images/fi/branding_v2/fi-favicon-default.png","groupId":-1,"height":1212,"highlighted":true,"id":1060777747,"incognito":false,"index":0,"lastAccessed":1724194173596.204,"mutedInfo":{"muted":false},"pinned":false,"selected":true,"status":"complete","title":"Messages","url":"https://messages.google.com/web/conversations","width":1396,"windowId":1060777746}: {"message":"Could not establish connection. Receiving end does not exist."}

ademuri avatar Aug 21 '24 03:08 ademuri

I am using Vivaldi and it's completely broke here, too.

For what it's worth, I clicked on "service worker" as you requested by that just opens an empty console.

Lieutenant-L-T-Smash avatar Aug 21 '24 03:08 Lieutenant-L-T-Smash

Restarting chrome didn't help, I'm seeing the same issue.

ademuri avatar Aug 21 '24 03:08 ademuri

I see the same error as @ademuri and also tried restarting and that doesn't work either.

0x0054 avatar Aug 21 '24 03:08 0x0054

That's helpful, thank you. I suspect I know what's happening, and I'll get to work on a fix right away.

abstiles avatar Aug 21 '24 04:08 abstiles

Oh, one more thing. If you don't mind, could you open the settings page (that "gear" icon") open the devtools, then type localStorage in the console and paste the output? That should only give you the storage for Deluminate itself, not anything else, but if you have any saved site customizations for domains you'd consider sensitive, feel free to decline.

abstiles avatar Aug 21 '24 04:08 abstiles

I truncated siteschemes to avoid leaking which domains I've configured.

{
    "enabled": "true",
    "keyaction": "global",
    "kill_background": "false",
    "low_contrast": "false",
    "siteschemes": "{\"keep.google.com\":\"normal\",\"www.example.com\":\"delumine-smart\",\"www.reddit.com\":\"normal\",\"easel.inventables.com\":\"normal\",\"camlab.sienci.com\":\"normal\",\"app.slack.com\":\"delumine-noimg\",\"hackaday.com\":\"normal\"}",
    "force_text": "false",
    "settings_viewed": "false",
    "scheme": "delumine-smart"
}

ademuri avatar Aug 21 '24 04:08 ademuri

That's surprising. The error message suggests a problem with the site modifiers, and you don't have any configured there.

Still, I've pushed a change that I hope resolves the error. Unfortunately, with Google's current review policies, it takes a matter of days for a change to get approved. The "dev" version of the extension tends to get approved much faster (maybe just because it has way fewer users?), and since you likely haven't used it before, it will probably be "clean" and therefore more likely to work. Try installing it as a workaround for now: Deluminate-dev

abstiles avatar Aug 21 '24 05:08 abstiles

The dev version works!

Vivaldi 6.8.3381.53 (Stable)

Lieutenant-L-T-Smash avatar Aug 21 '24 05:08 Lieutenant-L-T-Smash

My localStorage, anonymized by doing a few find-and-replace operations on the domains:

{
    "sitemodifiers": "{\"www.example.com\":\"\",\"en.wikipedia.org\":{\"low-contrast\":true},\"www.amazon.ca\":{},\"www.apple.org\":{\"low-contrast\":true},\"www.windows.org\":{\"low-contrast\":true}}",
    "enabled": "true",
    "keyaction": "global",
    "kill_background": "false",
    "low_contrast": "false",
    "siteschemes": "{\"chrome.google.com\":\"normal\",\"www.example.com\":\"normal\",\"www.github.com\":\"delumine-noimg\",\"yahoo.com\":\"delumine-noimg\",\"en.wikipedia.org\":\"normal\",\"www.amazon.ca\":\"normal\",\"arstechnica.com\":\"delumine-noimg\",\"www.apple.org\":\"delumine-noimg\",\"www.windows.org\":\"delumine-smart\"}",
    "force_text": "false",
    "settings_viewed": "false",
    "scheme": "normal"
}

Lieutenant-L-T-Smash avatar Aug 21 '24 05:08 Lieutenant-L-T-Smash

Reasonably sure I've tracked this down to sitemodifier entries in an older format. Specifically, empty strings as the old way of indicating "no modifiers". I think you should be able to fix this by opening the settings page and running the following line in your console:

localStorage.sitemodifiers = JSON.stringify(Object.fromEntries(Object.entries(JSON.parse(localStorage.sitemodifiers ?? "{}")).filter(([k, v]) => Boolean(v))))

abstiles avatar Aug 21 '24 05:08 abstiles

The fix I just pushed should also resolve this issue. It'll just take a few days to hit the store, unfortunately. You can try working around it with the above command, or by running on the previously linked Deluminate-dev version.

I'll beg Google to fast-track this fix, but I don't have high hopes. I'm terribly sorry, everyone.

abstiles avatar Aug 21 '24 05:08 abstiles

...I think I completely unpublished the thing while trying to get it to abort the already in-flight review for an updated one with this fix. This is a nightmare. The extension has been "under review" because I uploaded a new screenshot, and I guess I can't have them prioritize the new code version.

abstiles avatar Aug 21 '24 05:08 abstiles

Version 1.0.1 will be going out literally the moment I can make it happen.

abstiles avatar Aug 21 '24 06:08 abstiles

The manual fix above works, though it's missing a closing bracket.

Please don't stress. This is very much an example of "first world problems". Your effort is appreciated.

Lieutenant-L-T-Smash avatar Aug 21 '24 06:08 Lieutenant-L-T-Smash

Ehi ab, installed deluminate dev and it works for websites but for some reason the youtube embeds appear inverted no matter what you choose (other than normal and dimmed of course). Just wanted to let you know maybe it's already fixed in the version you're working on. Thank you for all your work as always deluminate is amazing

EDIT: This seems to be fixed by removing the "avoid inverting dark sites", but on the next reload you've to press "avoid inverting dark sites" again even if it's turned off for it to work? It's happening on old.reddit.com with RES

Galexlol avatar Aug 21 '24 13:08 Galexlol

I have the same issue chrome for mac

nikitakieffer avatar Aug 21 '24 15:08 nikitakieffer

@Galexlol The issue with Youtube embeds sounds like the regression in iframe behavior I've noticed myself, but having to toggle it again sounds like a different thing. I'll take a look, but could you please file that as a separate issue?

abstiles avatar Aug 21 '24 15:08 abstiles

Just came here to say thank you for what you're doing. I know nothing about coding or programming so I'm of no help here but I appreciate everything you do and I love this extension. Wishing speed to the update

BleedingRaindrops avatar Aug 21 '24 15:08 BleedingRaindrops

@Galexlol The issue with Youtube embeds sounds like the regression in iframe behavior I've noticed myself, but having to toggle it again sounds like a different thing. I'll take a look, but could you please file that as a separate issue?

done don't go crazy over this ab lol

Galexlol avatar Aug 21 '24 16:08 Galexlol

will we keep our settings (on/off on certain websites) when we update to 1.0.1?

ctrlalt-666 avatar Aug 21 '24 16:08 ctrlalt-666

I just want to emphasize, since it's easily lost in the thread, that the manual fix works.

  • In Deluminate, click the gear icon to open the settings page.
  • While on the settings page, open Developer Tools
  • In the console, paste the following code: localStorage.sitemodifiers = JSON.stringify(Object.fromEntries(Object.entries(JSON.parse(localStorage.sitemodifiers ?? "{}")).filter(([k, v]) => Boolean(v))));
  • Hit Enter to run it

All this does is delete Deluminate per-site settings that have a blank string as their value, which don't do anything anyway (blank string = default; but it causes a parsing error in the new version)

Lieutenant-L-T-Smash avatar Aug 21 '24 16:08 Lieutenant-L-T-Smash

@Annachen3d Yes. You will be able to keep your settings in 1.0.1. The problem right now is that there's a bug in converting the old settings format to the new one, but once that's fixed, everything should migrate over.

abstiles avatar Aug 21 '24 18:08 abstiles

THANK YOU, I was freaking out! I have light sensitivity and even with my monitor brightness as low as it goes, websites are still headache inducing...

Like others said, I have been using this for years,

D00MMARINE avatar Aug 21 '24 20:08 D00MMARINE

I have the same issue, but a different cause. Uncaught (in promise) options.js:96 Error: QUOTA_BYTES_PER_ITEM quota exceeded load (anonymous) @ options.js:98 I'm assuming i have too many entries in my siteschemes config

doctadre avatar Aug 21 '24 22:08 doctadre

@doctadre Yikes, I had no idea anyone might have enough site settings to exceed that. I might have to figure out something new for cloud syncing, then.

abstiles avatar Aug 21 '24 22:08 abstiles

I just want to emphasize, since it's easily lost in the thread, that the manual fix works.

  • In Deluminate, click the gear icon to open the settings page.
  • While on the settings page, open Developer Tools
  • In the console, paste the following code: localStorage.sitemodifiers = JSON.stringify(Object.fromEntries(Object.entries(JSON.parse(localStorage.sitemodifiers ?? "{}")).filter(([k, v]) => Boolean(v))));
  • Hit Enter to run it

All this does is delete Deluminate per-site settings that have a blank string as their value, which don't do anything anyway (blank string = default; but it causes a parsing error in the new version)

Thank you this really solve it you saved me. Good work!

nikitakieffer avatar Aug 22 '24 12:08 nikitakieffer

Can you be more specific as to what particular piece of functionality starts working when you run that javascript? It doesn't seem to solve any of my issues (saved site customisations still isn't populated, google searches still aren't being inverted, none of the deluminate options seem to have any effect, TypeError when pressing shift+f12, "failed to communicate with tab" when pressing shift+f11)

PJBoy avatar Aug 22 '24 12:08 PJBoy