Hot Koehls

The more you know, the more you don’t know

This content is a little crusty, having been with me through 3 separate platform changes. Formatting may be rough, and I am slightly less stupid today than when I wrote it.
07 Apr 2009

Fixing Firefox Gmail 400 Bad request

I posted a few weeks back describing an issue I was experiencing with logging into Gmail from Firefox. Firefox was corrupting Gmail cookies whenever the browser started, so I had to clear cookies each time I started up in order to use Gmail. Today I found the full solution, and it ain’t pretty. The problem is somewhere in the Firefox profile, and you have to blow the whole thing away to get it running normal again. Unfortunately, that means extensions and bookmarks go bye-bye as well, so you essentially have to approach the process as if you were restoring your browser after a reformat. No worries, here’s what you do… Back up your bookmarks

We could yank the bookmarks.htm out of the profile folder, but again with a corruption specific to the profile, it’s far better to export them cleanly. From the menu bar choose <em>Bookmarks > Organize Bookmarks</em>. Click the <em>Import and Backup</em> button along the top, and chose <em>Backup...</em>. Follow the save file prompt, tucking the file away for safe keeping. You can do the same for passwords if you’d like, though I don’t recommend it for security reasons. Even if you save passwords, wiping them out from time to time will clear out any old data you haven’t accessed in a while. The less secure data you have floating on your computer, the better. Get a list of your extensions

For the same reason as bookmarks, we are not going to save the extensions. Fortunately, it’s super-easy to make a list of installed extensions. Install another extension called Extension List Dumper. This simple add on outputs a list of all your extensions in text, html, or CSV format. It can even include links to the author pages. I really only install from the Firefox add-ons site, so all I needed were the names. Use it to save a copy of the add-ons somewhere safe. Remove that profile

You should never delete something outright until you are sure you no longer need it, so we are going to move the necessary files out of their usual place to make Firefox think they are gone. My problem and solution were in Windows XP, so Vista and Mac users will have to find their equivalent directories. This MozillaZine article will tell you where to find Firefox’s profile folder on just about any system. Close Firefox, then open Windows Explorer (i.e. My Computer), and browse here (or your system’s equivalent)… C:\Documents and Settings\[USER NAME]\Application Data\Mozilla\Firefox [USERNAME] will usually correspond with your Windows user name. Once you have found the directory, move the <em>profiles.ini</em> file to the desktop - make sure you don’t just make a copy! Then go into the <em>profiles</em> folder, and you’ll find a folder with a gobbledygook name ending in <em>.default</em>. For instance, mine was called <em>572p4a0j.default</em>. Grab that entire folder and move it to the desktop. Again, make sure you don’t just make a copy; we want the original location to be empty. Now restart Firefox, and it should behave as if you did a fresh install. This is what we want. Restore your bookmarks — Bookmarks > Organize Bookmarks > Import and Backup > Restore > Choose File...</em> — and then hit up the Firefox Add-Ons page armed with your list of extensions you made earlier and reload those suckers. Enjoy no more bad requests! Make sure you mention your experiences in the Mozilla Support Forums to ensure this gets fixed in the future — I’ve responded to threads on the matter here and here. Feel free to post success stories or additional issues in the comments.

comments powered by Disqus