Why Is Social Fixer Broken? What’s Wrong?
Social Fixer has had a few problems recently. Not for everyone, but for some users, and in different ways. I’d like to take a few minutes to explain why.
First of all, Social Fixer continues to work correctly for most users. If you’re having problems, it’s unfortunate, but you’re in the minority. I work hard to support all the users I can, but as a single developer, it’s difficult.
A number of things changed recently, and I have been trying hard to keep up with everything. Below are some of the things that have caused problems and why. This is a long post, because the issues are complex and can’t be easily summarized without some detail. There is no TL;DR.
Facebook Started Aggressively Clearing Your Storage Space
Browsers have a built-in capability to store data called localStorage, which is invisible to the user. Web sites can request that the browser store some data, and they can then retrieve it later. Each web site has its own storage space, and no other web sites can write to a different site’s space.
Browser extensions can also use this space, and this is where Social Fixer was storing its user preferences in some browsers. Well, Facebook made a code change recently which actually goes in and aggressively removes all stored data which it did not put there. So when this happens, all user preferences are wiped out, and the setup wizard would run again because Social Fixer thinks it’s the first time you’ve installed it. Other extension developers have had the same problem.
Unfortunately there is no way to get around this code from Facebook, so I had to find a completely different way to store data in Chrome, Safari, and Opera. In order to do so, I had to use each browser’s native extension API, which took considerable time to research, implement, and test.
Chrome Prevents Extension Installs From Sites
A recent change from Google has changed Chrome’s security policy with regards to installing extensions. It used to be that Chrome could install extensions from any web site, including SocialFixer.com. But they changed that, so now Chrome (by default) will not install from anywhere but their official Web Store.
Although I have always had a version of Social Fixer in the web store, the version there and the version I distributed directly from my site had different internal id’s. Why is that a problem?
Because when users of the locally-distributed version installed from the web store with the release of Version 7, it didn’t upgrade their previous release – it added a new one! Also, extensions store data specific to an extension id, so any preferences or data stored from the locally-installed version of Social Fixer were no longer visible to the new install, causing some people to lose their preferences.
This was hopefully a temporary hiccup that only affected some users. From now on, the only version of Social Fixer for Chrome will be the one in the Web Store.
Chrome’s Storage API And Manifest 2
While moving to a better storage mechanism in Chrome, I discovered Chrome’s new storage API. This is a much better way to store data in browsers, and it will keep the stored data much more secure from outside corruption. Previously, in Chrome, since the preferences were stored in localStorage, clearing your browser cache and clearing browsing data would also clear your preferences. Now, using the storage API, that won’t happen.
Unfortunately, localStorage and the new storage API keep data in different places. So users who had their prefs stored in localStorage before were upgraded to the new version of Social Fixer, which started looking for its prefs in the storage API and couldn’t find them. So it acted like a brand new install, and all previous preferences were lost.
I tried to warn users to back up their settings, but I hadn’t considered that Chrome would auto-update users so quickly – before they had a chance to backup their settings from localStorage. This was really a mistake by me, as I hadn’t considered every angle. I apologized for this, and I tried to offer several ways to go in and find your old settings to restore them.
Also, along with using the new storage API, I needed to upgrade my extension to use “Manifest 2”. The manifest is basically the meta-data about the extension. Google recently did an overhaul to the syntax of this meta-data file. In order to use the new storage API, and in order to be in compliance with new rules for distributing extensions in their Web Store, I needed to upgrade from Manifest 1 to Manifest 2.
Unfortunately, this wasn’t such a smooth process, as other developers have discovered. Only newer versions of Chrome can understand Manifest 2, so by moving to this new version, I would be breaking the extension for users of older versions of Chrome. And yet, Google offered no alternative or any way to maintain compatibility with older versions of Chrome!
Rockmelt, CoolNovo, Old Chrome Versions Break!
Some browsers like RockMelt and CoolNovo are built off Chrome, but they use an older version as their base. Also, some operating systems don’t have builds of the latest version of Chrome (like Ubuntu, which is stuck on Chrome 18), so these users have no option to upgrade. So these browsers couldn’t use the new Manifest 2, or the new storage API. I hadn’t thought enough about this, so users with these browsers had their extension break. (Although I don’t explicitly support these browsers, I try to be a good little developer and have them work anyway!).
Because of the number of complaints I received from users of these browsers, I had to build a whole new branch of code to support a legacy Chrome API that these browsers can understand, and add code to my packaging system which could build an extension version specifically for these older browsers. As it turned out, this was not a simple process. This new build version will be available with the next release.
More Facebook Code Changes
Many users who upgraded to version 7 of Social Fixer also noticed that they no longer had a “reply” link next to comments, and the “Enter” key started submitting comments instead of going to a new line. They assumed this was caused by the new version of Social Fixer. It was not.
Facebook has been beta testing some code changes which are only visible to a small number of users. For these users, these two features break. The code that Social Fixer expects to see is no longer there, and instead has been replaced by a whole new kind of code.
I’ve tried to look at the changes to see how to fix these features, but my account is not part of the testing group, so I can’t reproduce the problem. I’ve been sent code snippets by others which give me a clue about what is changing, but unless I can actually see and test the code changes myself, I can’t write and test code to change it.
Further, based on the code that I have seen, it looks like a simple fix won’t even be possible. It looks like Facebook is trying to prevent this kind of functionality entirely, so it is impossible for Social Fixer to fix this huge annoyance. I’m still looking into it, but it is not an easy problem to solve.
Mozilla Rejects Social Fixer Updates
The version of Social Fixer in the official Mozilla Add-On Directory is very out of date. The reason is that Mozilla is rejecting my updates. They are giving two reasons:
- My code retrieves content from other sites (SocialFixer.com, for things like the setup wizard, etc) and injects the HTML directly into the user’s browser. They claim that this is a security risk, and won’t allow my extension to do it. Since much of the code is based on this, I can’t simply take it out.
- My extension is based on an old framework called the User Script Compiler which converted Greasemonkey scripts to native Firefox add-ons. This method of conversion is now deprecated, and I need to convert to a whole new framework.
For those reasons, I haven’t been able to update my extension into the add-on directory, even though there are thousands of users there who are stuck on an old version that is surely causing them problems.
I am working on updating my code to comply with their requirements, but it is a lot of complex work. With all the things that I need to keep track of and work on, I haven’t been able to finish this one yet.
Firefox Aurora/Nightly Breaks Code
The very latest builds of Firefox are also causing Social Fixer to break. Apparently, there is some javascript problem with the evalInSandbox method, which is used in the User Script Compiler framework as described above. Although I try to support the latest bleeding-edge builds of Firefox, right now it’s broken and I don’t know why.
Since these versions will eventually become the live production versions, I hope to be able to resolve this soon. In turn, it may also resolve problem #2 with the Mozilla Add-On Directory as described above.
Oddly, the Greasemonkey version of Social Fixer also doesn’t work correctly in these versions of Firefox, even though they aren’t dependent on the evalInSandbox method. I’m still not sure why. Resolving this will probably require quite a few hours of research and coding.
Opera Changes Installation Requirements
Opera is kind of a niche browser, and few people actually use it. But I like to support it, because I appreciate the Opera audience, and because many of the users who seek out Opera to customize their web experience may also be the kinds of users who would appreciate what Social Fixer has to offer.
This is a minor concern, really, but Opera has also decided to go the route of Google, and require that extensions only be installed from their directory. This means that I need to update my code and packaging, and submit Social Fixer to their extension directory. I haven’t yet explored the implications of this, but I need to do it soon, otherwise Opera users won’t be able to install or update Social Fixer.
Conclusion – I Have A Lot Of Work To Do!
I wish I could put on my cape and save the world. Well, at least save users from Facebook’s constant attempt to annoy them with stupid features and annoying interfaces. But alas, I am human. I have a normal full-time job, a family, volleyball games to go to and lots of other things to take care of.
I put as much time into Social Fixer as I can, but as you can see above, it gets really, really complicated. There are so many complex things to consider, and so many ways that it can break. Browser makers continue to change their requirements, API’s, and packaging requirements. It’s hard enough to stay current with an extension in just one browser. Supporting 6 different browsers – each with their own extension frameworks – is kind of insane!
I do the best I can, and most users understand that, which I appreciate. There are some people who the ignorant but vocal minority, who leave rude messages on the support page, or send me hate-filled emails because their preferences are lost. Yes, that really happens. More frequently than you might imagine. Luckily, the vast majority of users are awesome, so I can ignore the trouble-makers.
I hope this post gives some clarity to the issues I’m facing, and why Social Fixer has hit some road bumps in the last few weeks. And perhaps it gave a peek into the complexities of building this kind of extension, for developers who are interested in the internals.
I will continue working as hard as I can to resolve all these issues, and continue making Social Fixer robust, efficient, and a great way to improve your Facebook experience.
– Matt Kruse, Social Fixer author.