Mar 30, 2006 (11:03 AM EST)
Firefox Essentials: Fixing The Fox
Read the Original Article at InformationWeek
Editor's note: This is the third installment of InternetWeek's "Firefox Essentials" series. Be sure not to miss the earlier segments on must-have extensions and understanding and managing your profiles.
One of the secrets to making any software work well is knowing what to do when it won't work at all. Firefox is no different: If you know how to isolate, identify, and cure the most common problems, you can get back to surfing without missing a beat.
Using the options you'll find under the Update tab in the Advanced section of the Firefox Options menu, you can configure Firefox to download and install approved Mozilla updates automatically, or (the default option) instruct the browser simply to tell you when updates are available. The auto-update feature will even check for updates to your Firefox extensions, themes, and search engine plugins.
Troubleshooting Firefox: Where To Begin?
The first place you should look is the MozillaZine list of Firefox issues. If your problem matches one in this "greatest hits" collection, you can find out how to fix it (or why you should abandon all hope and start anew) without further ado.
If you don't find your answer there, it's time for phase two: Safe Mode.
Safety First: Using Firefox Safe Mode
Like most modern software, Firefox is a complex product. In theory, just one small error in a single line of code is enough to stop your browser in its tracks. In practice, however, you can trace almost every Firefox problem to the usual suspects: extensions, themes, and the configuration files in your Firefox profile folder. Firefox includes a sure-fire way to tell whether your problem is coming from one of these sources, simply by restarting the browser in its Safe Mode configuration.
Firefox Safe Mode works the same way: Your browser will run without any extensions, plugins, themes (except for the default theme), or any changes you might have made to the configuration files in your profile folder. Even your most basic personal Firefox settings, such as your bookmarks file and cookies, don't appear when the browser is running in Safe Mode.
No matter what type of problem you encounter in Firefox, one of your first moves should always be the same: Restart the browser in Safe Mode, and see what happens.
With Firefox 1.5, Mozilla has actually improved Safe Mode for the first time. The latest version of Safe Mode now includes a set of three startup options, allowing you to permanently reset your toolbars and controls to their original, default locations and settings; to reset your bookmarks.html file; or, if things get really weird, to reset all of your user-adjustable properties to their factory-fresh defaults. But don't reset these options right away -- first, click the Continue in Safe Mode button and see how Firefox behaves.
Before you restart Firefox in Safe Mode -- especially following a crash -- shut down Firefox and make sure it's shut down completely. Open Windows Task Manager (or the equivalent management utility on your Mac OS X or Linux system), and look for firefox.exe (or firefox.bin) under the Processes tab -- if you see it, select it and then click the End Process button, okaying any last-chance dialog boxes.
Now you can restart Firefox in Safe Mode. How you do this will depend on your operating system:
Windows: Plan A is easy: Select Start > Programs > Mozilla Firefox > Mozilla Firefox (Safe Mode).
If, for some reason, that link is missing, then go to Plan B: Click Start > Run, and on the command line enter:
"C:\Program Files\Mozilla Firefox\firefox.exe" -safe-mode
Linux and OS X: Linux and Mac OS X both require you to run Firefox in Safe Mode only from a Terminal window: From the command line, start the Firefox application (wherever it is located on your system), with the -safe-mode command attached. Here's an example, using Mac OS X with Firefox installed in its usual location:
Now it's time for a little guidance. That's where the Standard Diagnostic comes in.
Troubleshooting By The Numbers: Using The Standard Diagnostic
In Safe Mode, you have either a lame, totally non-customized browser that works okay or a lame, totally non-customized browser that's still broken. What now?
The Standard Diagnostic includes directions on how -- and, just as important, when -- to delete your extensions folder and other key files, such as the configuration files that govern how Firefox renders Web pages and displays its own user interface. Although most of these files are human-readable, in practice it doesn't make sense to spend hours (or days!) poring through them, looking for an error that may only reveal itself after hundreds of minor, trial-and-error changes. Sometimes the best solution is to throw a profile into the trash and get a fresh start.
Even if the best solution involves starting over with a new profile, however, don't despair: Many of your most important profile data files, including your bookmarks.html file, browsing history, cookies, saved usernames and password sets, almost certainly are not the culprits. It's an easy matter to copy these files into your new default profile -- and within minutes, have virtually everything except your extensions back at your fingertips. (See Firefox Essentials: Get To Know Your Profile for details.)
There are a few good reasons to follow Mozilla's support script, as opposed to following a hunch or simply reinstalling Firefox from scratch. First, the Standard Diagnostic is based on Mozilla's own considerable experience finding and fixing Firefox problems -- as opposed to your much more recent experience causing Firefox problems. This includes knowing which problems are more likely to occur than others and what order steps should be taken in.
Also, the Standard Diagnostic will keep you from stumbling around in circles. This is especially important if you're in a hurry, foaming at the mouth in a blind fit of computer rage, or otherwise distracted.
Actually, I do suggest deviating from Mozilla's official diagnostic procedure in one way: Rather than rebooting your computer first, clear your cache (Step Two) and restart in Safe Mode (Step Three) before you reboot. This is purely a practical matter: These steps combined will still take much less time than rebooting -- an action that could disrupt anything else you have open on your desktop at the moment. If either of these steps fixes the problem, then you can skip rebooting entirely, at least for now.
Finally, note that some of the steps in the Standard Diagnostic refer to something you need to start doing now, if you don't already do it: back up your Firefox profile. Making a backup of your profile is drop-dead easy, takes a matter of seconds, and will protect you from losing all of your profile data, with no hope of retrieving it.
A Fresher Fox: Performing A Clean Install
Sooner or later, the combined effect of small, often invisible errors in your Firefox configuration files may begin to cause trouble, and taking the time to do a "clean" install -- removing all traces of your existing copy of Firefox before installing a new copy -- can be the best way to fix the problem.
Here's how to do a clean install:
Fetch Your Fox. When you download a copy of Firefox, be sure to click the Save button in IE or the Save To Disk option in Firefox, and store the file on your desktop. Do not choose Run (in IE), Open With (in Firefox), or any similar option that will run the Firefox installer as soon as it finishes downloading.
Shut It Down. When you're finished downloading, shut down Firefox -- and make sure it isn't playing possum (see the instructions earlier in this article).
Go Hunting. The key to performing a clean Firefox installation is to uninstall and/or delete every piece of your current Firefox setup. Don't assume that the Firefox uninstaller will take care of this for you. While an uninstaller will do most of the job, it will also leave behind bits and pieces of your old Firefox setup -- some of them trivial, others capable of messing up your clean installation if you don't root them out and delete them.
Before you delete anything, make sure that your Firefox profile is backed up and safely stored in a non-Firefox folder. Remember: If you have not backed up your profile, you will lose it during this process.
If you use Windows, you're ready to run the Firefox uninstaller, which you'll find under the Add or Remove Programs option in the Control Panel. (Linux and OS X users: You don't need an uninstaller, since your Firefox installations are much less spread out and easier to delete manually.)
After you run the uninstaller, check the following locations on your system for files or folders that you will need to delete before proceeding:
Mac OS X:
One file in particular that you may find hanging around, even after running the uninstaller, is called profiles.ini, a configuration file that tells Firefox how to handle the contents of your Profiles folder. Your new version of Firefox will create this file automatically when you run it for the first time, with the proper settings -- but only if you delete the old version first.
Install, Restore, Run! Now that you have "sterilized" your PC, it's time to start fresh: Find your new Firefox installer and run it.
By default, the feedback agent does not report any personal data to Mozilla -- period! -- but rather sends technical data about running processes, memory addresses in use at the time, and so on. It asks you each time it runs whether it may send the data; if you're in a hurry or don't want to send anything, simply tell it to bug off until the next crash. The data you send just might help developers fix a bug or two, which means you're also helping yourself when you help Mozilla in this way.
Before you run your new copy of Firefox, you will need to restore your profile folder, following the instructions from our Firefox Essentials article on profiles. (You did back up your profile, right?)
Extensions From Hell -- And How To Avoid Them
When you read through the Standard Diagnostic, you'll come across a link to another document that you will find useful all by itself: Mozilla's updated list of troublesome extensions. You shouldn't necessarily uninstall or avoid the extensions on this list; many work fine with the right configuration tweaks or other minor changes.
Bookmark this page, and pay it a visit occasionally: It's important not just as a troubleshooting document, but also as a trouble prevention document -- simply check it for the latest conflict, bug-fix, and configuration updates before you install any new Firefox extensions. The few extra minutes you spend here will more than pay for themselves on the back-end, when you don't have to spend an hour or two breaking up a browser-extension brawl.
Extensions And Upgrades = Oil And Water?
According to Mozilla, those mysterious, now-they-work-and-now-they-don't extensions are part of a system that actually protects Firefox users from bad extension software. In order to keep extensions current and avoid possible browser meltdowns, Mozilla requires developers to check in and update their extensions with the correct version-control info. When you install a new extension -- or when you run an updated version of Firefox on your system for the first time -- Mozilla checks the extension's version-control code against the version of Firefox installed on your system. If they don't match, Firefox will "flunk" the extension and disable it until an updated version is available.
This isn't so much a troubleshooting issue as a "sit tight and suck it up" issue. You'll have a working extension again just as soon as the developer gets off his or her keister and plays Mozilla's update maze -- in most cases, this won't take more than a week or two after an update hits the street.
Incidentally, for the impatient, adventurous, or easily amused, there's another option: a clever workaround that will trick Firefox into thinking that your extensions are all up to date and ready to run. (Or simply use our old friend MR Tech Local Install to do the same thing, as shown below.) In most cases, they are -- and the "update" process is a formality you can safely ignore.
Before you try this, however, check around online to see if it's safe to force a particular extension to appear compatible with Firefox 1.5. And if you screw up the process without a backup of your profile, don't come crying to us: Backups are the geek version of an IQ test, and telling the world you just flunked miserably is a bad idea.
Help Is On The Way
The troubleshooting steps outlined in this article will get 99 people out of 100 precisely where they need to go: back on the Infobahn, riding Firefox to wherever they want it to take them.
Fortunately, you may not need to go very far at all: One of the very best Firefox support forums is at MozillaZine. The regulars here are a friendly bunch -- just as long as you do your homework and learn a little bit about how things work within the support forums.
One of the most important things you can do before asking a support question is to search for and review topics that may already contain an answer to your question. Better yet, there are a few key MozillaZine forum topics that you may want to review before you have trouble, simply because they're such good sources of information on popular (and often problematic) third-party software you're likely to run with Firefox:
Also, it's easy to overlook the MozillaZine forum on Firefox extensions, simply because it's much father down the main forums page than the primary Firefox support forum. Yet it's worth your time to browse both forums, especially as you get into more advanced Firefox tweaks and customizations.
Avoiding Trouble Of A Different Kind
Firefox enjoys a well-deserved reputation for raising far fewer security risks than Internet Explorer 6. But security is a two-way street: Your browser needs to keep external threats at bay, but it must also allow you to control and monitor your personal data at all times -- and, if you wish, remove it entirely.
Get familiar with the Privacy section of your Tools > Options menu, which includes settings to control and/or erase info that you've entered into online forms or your Search Bar (Saved Forms), where you spend your time online (History), or what you do when you get there (Cookies, Passwords, and Download History).
There's also a panic-button method of accessing the Clear Private Data tool: a link near the bottom of the Firefox Tools menu. This does pretty much the same thing as the first method, with one key difference: You can activate it instantly, using a hotkey (Ctrl+Shift+Del) sequence, rather than having to shut down Firefox to make it work.
Matt McKenzie is the editor of Linux Pipeline. Over the years, he has broken more PC hardware than most people will ever use -- and he's not done yet. Contact him at firstname.lastname@example.org with questions, comments, complaints, or cash.