sergiokas / Extensity

Quickly enable/disable Google Chrome extensions
http://sergiokas.github.com/Extensity
Other
390 stars 83 forks source link

Saved profiles disappeared #63

Open MagTun opened 4 years ago

MagTun commented 4 years ago

We are two people using your extension for a while now and we both set up several profiles. 2 days ago, our profiles disappeared.

On the page extension://jjmflmamggggndanpgfnpelongoepncg/profiles.html, the console gives this error:

DevTools failed to load SourceMap: Could not load content for chrome-extension://jjmflmamggggndanpgfnpelongoepncg/js/libs/underscore-min.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME

We both have Extensity version 1.11.0 and Microsoft Edge [chromium based] Version 85.0.564.44 (Official build) (64-bit)

I have about 20 extensions installed (but only about 5-10 are usually enabled).

sergiokas commented 4 years ago

@MagTun I'd like to follow up on this.

Edge is not officially supported, but we'll try to debug the issue if you're willing to.

DevTools failed to load SourceMap is not related. That's some warning from the DevTools itself, it's present in previous versions also (it's a warning, not an error).

My initial guess is that Edge wipes out an extension local storage when updating it, unlike Chrome that is able to keep it.

Fix attempt 1

Go to More -> Extensions -> Extensity -> Reload extension and check if profiles are back (assuming that you didn't "Save" any new ones)

Fix attempt 2

Run the following commands on the Profiles page's console.

chrome.storage.local.get("profiles", function(p) { console.log(p); });
chrome.storage.sync.get("profiles", function(p) { console.log(p); });

and let me know what the output is.

Thanks!

MagTun commented 4 years ago

Thanks a lot for taking the time to fix this.

So there are a few new things.

Doing fix attempt 1 wasn't an option because I saved new profile yesterday.

I thus tried fix attempt 2: I clicked on the extensity icon, and then, on the profile icon in the top right corner. But this gave me an error telling that the extension is corrupted. So I went to "edge://extensions/", scroll to extensity and I selected "repair" which apparently deletes the app and reinstalls it. I then went to the profile page and this time it was working (no "extension is corrupted" error this time) but once again my profiles disappeared probably because of the reinstallation [a couple of minute before doing this debug, I used switch my profiles so I know they were working right before the reinstallation]

Because I was back to where I was yesterday, I could try the fix attempt 1... but there is no "reload" button on Edge, just a slide button that turn the app on/off. I guess it's the same thing so I clicked it to turn it off then on but the profiles were not back.

So I am back to fix attempt 2. This is the result of the 2 commands:

image

I also saved a new profile and then re-run the 2 commands:

Annotation 2020-09-12 141845

MagTun commented 4 years ago

I try to recreate the "extension is corrupted" error by creating more profiles, switching between them and opening/closing Edge but I couldn't find a way to reproduce the error.

I also tried to recreate the "extension is corrupted" error on my friend's computer [the one who got the same bug than me yesterday]. I asked him to open the profile page via the icon and he also got something weird but different: at first the profiles were also gone (he also recreated new profiles yesterday) but when he tried to create a new profile, his two profiles from yesterday came back (we didn't run fix attempt 2 on his computer).

I hope this helps you a bit more, otherwise, feel free to ask me to run more debug steps. And again, thanks for you help!

sergiokas commented 4 years ago

@MagTun thanks, that's really useful.

I don't really know what Edge would mean with a "corrupted extension", but a quick Google search suggests it's a random issue that tends to block or wipe local storage access (which would explain the profiles being "gone" or temporarily not showing up).

I'll do some more research and get back to you.

farzadmf commented 4 years ago

I'm using the extension in Chrome and I had the same problem (my profiles being deleted), so I tried to re-create (some) of my profiles, but now switching profiles doesn't do anything.

Is there any way I can troubleshoot this, please?

sergiokas commented 3 years ago

@farzadmf that sounds like a separate issue.

Can you please:

  1. right-click on the Extensity icon
  2. select "Inspect popup"
  3. try switching profiles
  4. check if there's any errors and paste them here?
farzadmf commented 3 years ago

Thank you @sergiokas for your reply, I didn't know about this, so I took the route of removing/re-installing the extension, and after doing that and re-creating my profiles, changing profiles seem to work.

However, since I'm using my Google account on Chrome on multiple environments, I needed to do the same thing for the other environment too

If I'm not mistaken, profiles are synced between environments, so I'm not sure if doing this (remove/install/re-create profiles) will affect the other environments.

sergiokas commented 3 years ago

@farzadmf it should. Extensions are uniquely identified by Google, meaning that reinstalling just wipes out data, but upon reinstalling, whatever changes (e.g. creating new profiles) are overwriting any old data on Google's sync storage, and it's synchronized back to all Chrome instances.

farzadmf commented 3 years ago

Thank you @sergiokas , I'm back to my other machine now and things seem to be working fine.

Any idea what caused the original issue of profiles going away and things not working after creating the profiles?

sergiokas commented 3 years ago

@farzadmf

Nothing concrete yet.

Only lead I've found: It may have to do with certain Chrome versions (or derivatives like Brave or Edge) suffering from a Chromium bug that incorrectly flags extensions as "corrupted". Attempting repair (or getting a silent auto-repair from Chrome itself) apparently does a clean extension reinstall, which wipes out the local storage for it (which is where Profiles are stored).

It's fixed already, but it's a very recent issue, so it means that it probably affected everyone who's not on the latest Chrome version (Brave or Edge take a little more time to catch up, which means it probably affected everyone there). Fix was verified less than a month ago.

https://bugs.chromium.org/p/chromium/issues/detail?id=995436

farzadmf commented 3 years ago

Interesting @sergiokas , but for me, I was using the actual Google Chrome itself and this happened

I noticed it on my Linux machine; maybe because that was the first one I checked, but maybe it had something to do with Chrome on Linux

ryanbuening commented 3 years ago

I experienced this as well. I'm using Google Chrome and my saved profiles are no longer there.

MagTun commented 3 years ago

@sergiokas, just to let you know that I haven't had the bug since my last post (when I reinstalled the extension following the "extension is corrupted" error). My friend too haven't had the bug.

Also a side question: are the profiles saved in a local file? if yes is it possible to backup up this file and restore it in case the profile disappear again? if yes, which file should we save? [that way is quicker than to manually recreate the profile]

sergiokas commented 3 years ago

@MagTun that's good to know, though I'm holding further releases until I can figure out what the actual issue was. And if it's due to a Chrome bug (as pointed out above), at least I need make sure everyone is updated to a more recent version before pushing a new Extensity update.

Profiles aren't stored on a local file, but I'm working on a feature to backup them (and restore as needed) into one.

However to release that, first I need to make sure Profiles won't be lost again for some people each time I increment the Extensity version.

ColinLondon commented 3 years ago

+1

Using Edge 85.0.564.60 (think it happened on the last update). Same engine as Chrome, of course. All profiles gone.

MagTun commented 3 years ago

I am now on Edge version 85.0.564.51 (I was on 85.0.564.44 when my profiles were deleted).

@sergiokas I will tell you if my profile are deleted when I will be updated to the same version as @ColinLondon (Edge tells me that Microsoft Edge is up to date).