-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installed styles have been purged #278
Comments
That's where I looked, and it's completely empty. |
I don't know how to reproduce this bug so I'm not sure if it's caused by Stylus, and not by Chrome. |
Not sure either. Chrome hasn't updated overnight, but Stylus did. If it helps, I did not have any of my userstyles using the new |
The thing is, there's simply no code in Stylus that deletes the styles without explicit user action for one style at a time. The only guess I have, is that for some reason IndexedDB didn't work so Stylus saved all styles in chrome.storage.local.get(null, console.log) Click the output to expand it and see if the styles are there. |
Looks like something happened to the browser profile and corrupted IndexedDB. |
This just happened again. Latest Chrome and latest stable release (63, 1.1.8). Chrome open, editing my style as usual. Made a change to a line, go to save to see the results, but the button refuses to press. I try the keyboard shortcut. Still refuses to change. I open up the console on the Stylus page, no errors reported. I go to close the editing window, but the alert/popup saying I have unsaved changes pops up. I click Stay. I then try going back to manage. Same popup. I try deleting the line I had just changed, no luck. Still no errors or warnings in the console. I then just leave the page anyway and close the tab I was working on, just in case. I open it back up and everything seems normal, but I still can't make changes. I try creating a new userstyle and it never appears in the manage page. I close Chrome, open it up, and all my styles have been wiped again, but this time the userstyle I tried creating which wouldn't appear just earlier is there. I've checked the IndexedDB and it has the I know that doesn't reduce the test case, but this time it occurred while Chrome was still running and I attempted to save, but it refused to let me save. I'll muck around now and see if I can get it happening again. |
Still sounds like a bug in the browser or a broken user profile. Like I said, Stylus simply doesn't have code to mass-delete styles except when you manually import a json in the manager and then press the undo button to roll back the import, in which case the imported styles are deleted and the old styles are restored. P.S. I'm keeping this issue "open" only as a reminder to myself about the "timemachine" feature, not as an invitation to provide more details about the bug. There's nothing we can do about it because it's definitely not caused by our code. |
Another user found out the culprit was CCleaner. |
that's exactly why I'm not using CCleaner... a realy long time ago it corrupted my Windows registry so many times I had to do inplace upgrade every half year until I finally found out and ditched that bitch and I never had to reinstall Windows again ever since... nevertheless this kind of bug happened to me a few times as well and every time it was because the db in userprofile has been corrupted (probably by Chrome itself) in a way that Stylus was able to read from it but when trying to save - the data was never written despite the fact there was no exeption thrown both from Stylus and Chrome.. in fact Chrome sometimes does the completely same thing with its own settings... it trained me to export the Styles quite often but the rollback feature would be fine ;) |
I'm on Firefox 58.0.2 and Stylus 1.2.7 and I somehow lost all my styles after either clicking on Manage (and not really doing anything) or possibly after clearing parts of History that managed to wipe what Stylus had saved as well. Luckily I had a stylus.json file available to re-import. Perhaps I will try and re-create. Should going to History -> Clear all History wipe out Stylus if say everything is checked? |
I think Firefox may consider IndexedDB inside WebExtensions a part of "site history" when clearing the data. It certainly seems retarded to me but some other apps do that as well e.g. CCleaner so this confusion may be a common thing. |
Is this still an issue? I thought it was pretty well sorted out now. Been a while since I've seen it reported. Make sure you haven't hidden them on yourself before you reinstall: Otherwise, keep frequent backups. "Re-create" makes it sound much more dramatic than what the process actually is. Uninstall/reinstall/import, takes less than a minute. |
All those filters were unchecked. Anyway, already imported what I had saved. By re-create I meant making them all go poof again to see what actually caused it. Well, I tried to make it happen again be selecting everything in Clear Recent History but my styles remained intact. So, I dunno. |
I tried reproducing @MarkRH's FF losing styles issue last night. (Firefox 58.0.2/Stylus 1.2.7) Didn't appear to be having any luck but this morning when I opened the browser my styles were all gone. Haven't been able to reproduce again yet, but I'll keep playing with it some. |
I'll remind just in case that setting Firefox to "Never remember history" in its options will switch style storage in Stylus to chrome.storage API instead of IndexedDB i.e. the first time you enable that option all your previously saved styles will be inaccessible (effectively, gone) because Firefox won't allow Stylus to use IndexedDB. Subsequent toggling of the option won't switch the storage back to IndexedDB because Stylus will keep using chrome.storage API. |
Good to know. Thank you. |
I can also confirm I lost everything after running CCleaner to clean up HTML5 storage (in this case, for Firefox). After restoring the contents of my |
I just lost all my styles after a FF Nightly update, and I don't use CCleaner. Aaaand I just installed a style, it appeared in the open Stylus management tab, but didn't apply to the site. I reload the Stylus tab and the style disappeared. Hmm. This has happened repeatedly. I'd suspect a nightly bug, but no other addons have lost settings. It seems that Stylus is broken until reinstall in this version: http://forums.mozillazine.org/viewtopic.php?f=23&t=3040021 You need to restart Nightly after uninstalling Stylish. |
AFAIK there's nothing in Stylus that could possibly trigger this kind of bug in FF Nightly. I've seen many nonsensical bugs in FF Nightly over the last year so that must be just another one. |
Nightly, lost all styles today as well. |
Has the toggling behavior changed? My nightly didn't lose any styles with "Remember history", but when switching to "Never remember history" they were gone, as I guessed they would be. Installed a couple there. Switching back and forth, I have two sets of styles being accessed. |
i have had similar problems with other firefox addons for several times now. i assumed it is a file system problem because i am running my system from an usb stick with a lose connection and crash it several tiems a day usually. if it happens on both chrome and firefox it might be some javascript framework related issue |
I have a pretty similar problem. I'm using Firefox 60.0.1 on Windows 7 (in case this is somehow relevant) I hope there's some other way to fix that than installing every single style from scratch again. I've had quite a few of them. |
I just lost my styles as well :(. What happened to me:
|
@Zero3 This repo is for "Stylus", which is a fork of the original "Stylish" for Chrome. We are a completely different extension. You're either confusing the spelling, or more likely, you're in the wrong place. |
The WebExtension API in Firefox, and likely Waterfox, is not fully matured. So, comparing the history of a non-WebExtension version of Stylish with the WebExtension version of Stylus isn't valid. I don't know about Waterfox, but Firefox stores the extension database in the same place for all extensions. I can only tell you where it can be found in Windows 10:
The |
Thanks, Mottie, but the FAQ does just that - part of it refers to Stylus; part of it refers to Stylish. No part of it explains how to restore a backup of the database, as far as I can see. Apparently I now have Stylus 1.4.20. I don't see any indication of whether or not it's a web extension. I see three possible candidates for the folder, in C:\Users{me}\AppData\Roaming\Waterfox\Profiles{?}.default\storage\default but I don't know if that applies, or how to tell which. |
Only WebExtensions will work in Firefox v57+, I don't know what version of Waterfox that applies to. Open the Stylus manager and look for the ID in the URL. In Firefox it's |
Okay. Thanks, Mottie. I hadn't realised I was supposed to be looking for that in the URL. It seems I don't have a useful backup, and neither does Dropbox. I do still have the styles backed up from Stylish, in February, so I can at least go back to that. |
@Zero3 The flaw in those speculative stats is that they fail to take into account the severity of the issue. To stick with a "bug" analogy, the percentage of people who'll avoid going to the doctor for a common cold is probably comparable to the percentage of users who won't bother reporting minor bugs. Complete DB failure is more like organ failure, so baseline stats of normal bug reporting wouldn't really apply the same. @Andy2No The majority of reports here either have to do with external file-cleaners or FF in general, with a few unexplained Chromium failures. Only reason I'm chiming in, is that it might be worth mentioning that FF has a fallback DB due to the ongoing bug in FF where privacy settings are applied to WebExtension storage. IndexedDB is faster, so that's what is used, but if you change FF to "never remember history" or any other strict privacy settings/configs, it'll fall back to an inferior storage which isn't affected. Unfortunately, the two are completely independent, so you can't switch back and forth, it's either one or the other. Changing privacy settings could cause Stylus to use the fallback, making it appear that all styles have been purged, when in reality, simply undoing the strict privacy settings will allow Stylus to access the default DB again. |
That's interesting, narcolepticinsomniac, but I don't use any extreme privacy settings, and haven't changed them in quite a while. I've restored my styles from the database for Stylish (reverting back to February), by using this tool to convert them to a format Stylus could import from: https://www.jeffersonscher.com/res/stylishextract.html FWIW, if I'd been able to find anything useful in the FAQ, I wouldn't have reported the problem either. |
The FAQ is a wiki page, if you feel something is lacking, please help us out and update and/or share more detailed information. |
I can empathize with the frustration. I've lost many hours of coding before due to DB loss. In my case, it's always been user error, because I tend to constantly be testing different versions. I've "uninstalled" the wrong one more times than I care to admit. It's gotten to be second nature to click the export button most times I see it. FWIW, if you're sticking it out with FF 56, you should probably be using the legacy Stylish 2.1.1. One of the main reasons users stick with old versions of FF is so they can still use the much more powerful XUL based extensions. The legacy Stylish has much more control over the entire browser than any WebExtension ever could. If I was using any pre-v57 FF, I certainly wouldn't use a WebExtension like Stylus. |
@Mottie, I'll give some though to adding to the FAQ when I've recovered a bit from the frustration. I don't know how long the tool from https://www.jeffersonscher.com/res/stylishextract.html will stay available though, so I don't know whether to refer to that or not. It's the only way of doing it that I've found, other than reinstalling Stylish to export its database, which may or may not still work, due to version changes. @narcolepticinsomniac, I'm currently using Waterfox 56.0.4.1 (64-bit), but I'm not sure how the version numbers work. I assume that means it's based on FF 56, but I've never really looked into it. As I see it, I have to eventually put up with WebExtensions, or stop using FF based browsers all together. |
AFAIK, one of Waterfox's main objectives is to continue support for XUL based extensions. If you like it, and plan on sticking with it, you should really stick to the more powerful legacy Stylish. |
I'll give that some thought, narcolepticinsomniac. I can't remember why I switched to Stylus, though it made sense at the time. I have read that there are/were privacy concerns about Stylish - selling data about users. How much truth there is in that, I don't know. I don't think that was the reason I switched though. On the whole, Stylus seems to do enough, for what I need it for. |
Please read carefully and distinguish between Stylus, Stylish < 3.0.1 and Stylish >= 3.0.1. Your question "Restore Stylus database from old FF profile which already used Stylus" is a different one. Though the recommended way is to backup your styles regularly via the export function found on Stylus' manage page. Maybe we could add a weekly automatic export into the profile folder up to a limited number of backups? @tophf
Jefferson is a very reliable person. I don't think you have to worry about the page going offline soon. On the other hand it is licensed under
This makes no sense. Stylish 3.0.1 or higher doesn't even have a There is no info about reinstalling Stylish>=3.0.1 for export because no one tested yet if the styles are kept forever if you uninstall Stylish. If that is the case, I can add it. |
I'm not sure where to start, with all that, stonecrusher. As I said, I eventually restored my database from Stylish, from February, using Jefferson's tool. I appreciate that needing to do that is a minority interest. It works though. I'm not sure which version of Stylish I was using at the time. I also said I wasn't sure if reinstalling Stylish to get its contents would be practical. I'm not sure why that "makes no sense". It either works, or it doesn't. If I had the correct version of Stylish installed, I should be able to recover the styles somehow - e.g by copying and pasting. I suspect the FAQ seems clearer to you than it does to the people who feel the need to read it. I'm not sure how it helps to keep information there that relates to Stylish, or earlier versions. People reading an FAQ want to know things about the current version. Talking about older versions, or the ancestor of this extension, just makes it confusing to read. I was attempting to restore the database from a backup of my Waterfox profile, yes. To do that, I needed to know where it was. I now know from this discussion, but not from the FAQ. As it turned out, I didn't have a backup that was old enough, but otherwise, that would have worked. There was no "fiddling with databases" involved - I just wanted my database back, from a few days earlier. An automatic export seems like a really good idea, but documenting how to use a backup of a profile would be useful too. I back up folders, with SyncBackSE. I don't necessarily know everything about the contents - the FF/Waterfox profile contains a lot that's mysterious to me. I don't necessarily want to restore an entire folder from a backup, because I'd be overwriting something else that I might have needed. Getting back to Jefferson's import tool - it probably isn't still needed by many people, so arguably doesn't belong in the FAQ. It is a useful resource though, so it would be good if it could be preserved in more than one place. I used it to migrate to Stylus originally, and I've now used it again, to import the exact same data. There will be other people who find they need to, but yes, a fairly small minority. |
We can have a chat on discord if you want.
That's why an automatic Stylus backup would be helpful instead of restoring a whole IndexedDB which might also contain other information or may be easily deleted / corrupted by the browser.
There are people who come from older versions because they used ESR versions or browser forks where newer extension versions are not available. Or they simply liked the old Stylish much better for its power to change the browser UI, so stayed as long as possible. Another issue was that Stylish botched the change to webextensions so we have the need to fetch the user whereever he started.
So you were already coming from Stylus? Please be clear on that. Maybe something like |
Yes, I migrated from Stylish to Stylus in February, stonecrusher. My first post in this thread was about having lost my styles, in Stylus and wanting to know what I could do about it, after trying to find out from the FAQ... I thought that was fairly clear, but maybe not. As I see it, I was trying to get my lost styles back. If I'd exported them, importing them would have been an option, but I hadn't - and hadn't thought to, so I was looking to restore them from a backup. I guess you could see it as two different things. I see it as two different approaches to the same problem - winding the clock back to when I had it how I wanted it. I found myself trying to restore from a backup and having no information available to tell me how. I guess you could argue that situation isn't frequent enough to qualify as an FAQ, but it's a pretty short list, at the moment, and I really don't think I'm the only person who's ever going to want to know that. If I had exported them, I'd probably already know what to do about it to get them back (i.e., I personally would know, and probably so would most other people) so I wouldn't have been needing to look at the FAQ. I feel I've identified something that could usefully be added to the FAQ. Of course, it's up to you to decide whether or not it should be there. The information to do it has been given in this thread, and I feel I could now add it myself, if that helps, but maybe it would be better coming from someone who understands the whole picture better... on the other hand, there are a lot of good manual writers who know very little about the technicalities, they're just good at explaining how to use something, which is what the readers / users actually need. Good programmers aren't always the best communicators, in my experience. |
Nightly, lost everything including custom safety tools. |
Are there any files to recover? |
Maybe ssomething like this can help in cases like this or #528: |
It's happened to me a few times after recently switching from Stylish to Stylus. On a side note, is it supposed to take a long time to load my styles after a reboot? Usually 1-2 minutes and then my styles are loaded. |
Definitely not. You may want to open a new issue for it. |
I guess you just hit this bug: #528. You should be able to get your styles backup after another update (if you didn't reset your database). |
This issue is staled and reports are mixed with different browsers and different versions. I'm going to close this thread and open another one to discuss ironDB (or something similar). |
I've just installed on the weekend on chrome and I've lost my styles twice already, |
This issue's closed, and I'm locking it. It does no good to have a single, ancient catch-all issue for DB failure where users complain without bothering to provide any helpful details. @patrickdrd I would guess you're using Canary, because we've had reports recently through the last few versions. It's a browser bug which will supposedly be fixed in an upcoming update. If you are using Canary, feel free to respond in that issue, although it's closed because it's not a bug in Stylus. If your issue is something else, please open a new issue with all relevant details to repro.
In almost all cases, that isn't the way it works anymore. Chrome/Chromium and the vast majority of its forks haven't been truly portable in quite a while. Most so-called "portable" installs still have extension settings locked to the device they're installed on, so they aren't transferable to another computer.
So meta. Are you sick and tired of being sick and tired? =) |
Quoting myself:
|
Woke up this morning to find all my styles missing. Entering this into the console did not bring them back, and attempting to export/checking the IndexedDB, provided an empty
json
file.I can create a new style and it appears.
The text was updated successfully, but these errors were encountered: