2008/12/20

Gmail: Bad Request; Error 400

First time I've seen this: Tried to log in to gmail (via browser) and all I got was:

Bad Request
Error 400

I figured it was momentary, so went off to do other things. (So many other things to do...)


A few hours later, same thing. Next day, same thing.


This is unlike gmail. So tried a simple Google search... slow, but it did return.


Maybe Google is under a DoS attack? No news, and now Google is returning just fine, but still no gmail.


So I started searching around for anyone with a similar problem. Saw a few, though they were old.


Tried the gmail Google Group and went through what seemed to be the procedure to enter a new issue (after reviewing current open issues), but that did not give an opportunity, at the end, to open a new issue.


So, some more generic searching, using both Google and Yahoo, turned up the typical low-level support "decision tree" request to empty cache and delete cookies. Well, I'm certainly not going to delete all my cookies right away, however...


I tried a different browser and got right in - OK; we're on the right track.


I then saved my cookies (always have a backup) and looked for which cookies might be the culprit.


Got it in one: There were probably well over a hundred (!) separate cookies for the mail.google.com domain (both with and without a leading dot), that also used a path of "/mail". I deleted them, and gmail loaded right up on the next try!


Update 2009/03/20: Apparently there's a similar problem with Firefox.

36 comments:

Vaida Bogdan said...

Same problem here, fixed it in the same way. The thing is, it repeats itself.

Marcantonio Rendino said...

Interesting; first time I've seen it, so I wonder what triggers it - any theories?

Anonymous said...

Worked for me. Thanks for this.

I haven't had time for the problem to repeat itself. Hopefully Google will address this sooner or later.

Unknown said...

I have the same problem... I delete the cookies in: Safari preferences -> Security, Show Cookies.

But after closing the gmail tab, the problem appears again. It seems to me that this problem started with my 10.5.6 actualization, is that your case too?

I think that is not Google's fault, since I can work without this behavior with Firefox or Camino...

Anonymous said...

Okay, it's been happening over and over again. It seems like this has been happening since I updated to 10.5.6

Seems like others are experiencing something along the same lines here: http://discussions.apple.com/thread.jspa?messageID=8657457

The delete cookies thing is too temporary a solution. Hope you're managing well enough.

Oh yeah, forgot to add that the Google notifier appears to be unaffected though.

Marcantonio Rendino said...

Yep; only after upgrading to 10.5.6, for me too - although I've only seen it once.

I virtually always use Safari, so while I have seen it there, I wonder if I used another browser most of the time, would the problem show there as well?

Anonymous said...

After some frustration I simply launched Firefox, which I'm always reluctant to do as I use Safari pretty exclusively. The problem doesn't exist with Firefox, or at least it doesn't present itself.

Gmail's error page is now presenting a full page with codes to c+p and send to the folks at Google help pages. I imagine this being resolved within a week or so.

Marcantonio Rendino said...

> Gmail's error page is now presenting a full page with codes...

Cool; thanks for the update!

zo-Man said...

Same here!

Σικελια said...

You are a life saviour! What a Xmas present though... hahahha!

Lucinda said...

It is happening to me in safari on one of two macs - both using 10.5.6. Cleared cache and all gmail cookies as suggested and it got worse! (before I could get in sometimes, now it never works.) Not seeing the string of code, just "Bad Request Error 400." This is really irritating.

Marcantonio Rendino said...

Lucinda: Sorry what worked for some of us, isn't working for you - I have two suggestions:

1) Try to clear *everything* in Safari. (My Mac is down right now, so I can't remember the exact menu item.) NB: You may care about some of the info it clears, so tread carefully.

2) Try another browser like Camino, for the time being. :/

Anonymous said...

Had the same problem. Followed the advice here to reset safari - but I only cleared cookies. Not about to clear everything else :o)!!!!!!
Seems to have worked - for now.
Thanks!!!

Beta Mellin said...

Same problem. Just fixed.

A big tks from Brazil...

Dr.o said...

I had the same problem,
I emptied the Cache (under the Safari tab) and that solved the problem for a while. Then it came back.
But seems to have been solved since then. And appeared after upgrade to OS X 10.5.6

Dr.o said...

related issue: Mail cannot get the emails on gmail account anymore.

Happened at the same time as the Safari problem. I cleared the cookies but doesn't change anything.

Console error reads:
11/01/09 17:26:21 Mail[16010] -[POP3Connection fetchMessages:] failed: Error Domain=NSPOSIXErrorDomain Code=54 UserInfo=0x204d6e20 "The attempt to send data to the server “(null)” failed."

Of course the incoming mail server is set to: pop.gmail.com

Thanks.

Marcantonio Rendino said...

Dr. O said:

> related issue: Mail cannot get the emails on gmail...

That sounds like a lower-level failure; like perhaps DNS. Tried restarting?

Tom Coady said...

To delete cookies in safari: preferences > security > show cookies > enter mail in search > delete selected google mail cookies.

Anonymous said...

Looks the issue has been resolved now.

Anonymous said...

Spoke too soon.

Though it worked for what seems like a week, it's decided to give me the error page again.

Marcantonio Rendino said...

Drat!

Well, for what it's worth, I haven't seen the problem again. :/

Perhaps there's an additional component as yet unidentified.

Anonymous said...

having the same problem after upgraded. clearing cookies is only a temporary remedy. if i'm signed in for a length of time, the connection will time out when trying to refresh to the server, and will get caught in a loop at the countdown. this is clearly an issue between apple-google, nothing to do with our individual set ups, cookies, etc.

i'm now having issues with firefox as well, which initially worked, even though it wouldn't sign me into gchat.

Marcantonio Rendino said...

Yet it plagues some of us worse than others, so there are some variables; it isn't as simple as a Mac using Gmail.

Personally, I haven't seen it at all since I first cleared gmail cookies.

That was the only thing that changed about my setup for awhile, however, recently, I've also been using dialup more frequently (don't ask) and (necessarily) using one of the older gmail interfaces, such as the old UI:

[https://mail.google.com/mail/?ui=1]

and even Basic HTML:

[https://mail.google.com/mail/?ui=html&zy=e]

The new UI generally fails to even load, over my low-bandwidth dialup connection. The old UI generally will load, though sometimes I must revert to Basic HTML.

Anyone still plagued by the errors, may want to give either of the above a shot.

Unknown said...

I've got the same. I have to clear all Gmail cookies several times a day. Running 10.5.6 and Safari 3.2.1.

This is super-irritating.

Σικελια said...

Hey guys! I had the same problem, but the solution was quite easy. Just used Firefox. No probs since then! Good luck!

Elio said...

Still no solution for this? I want to comeback to Safari.

Marcantonio Rendino said...

I don't know why it isn't working for some people, however my solution was simply to clear gmail cookies. :/

You might also try the older UI as mentioned above.

Elio said...

Im unable to do that because I use Google for my domain and I cant back to the older UI becasue is a special UI for my domain.

Marcantonio Rendino said...

I don't have any experience with "Google for my domain", though you may be able to simply append "?ui=1" to the URL, even if there's no button for the old UI. (Or "&ui=1" if there's already a "?something" in the URL.)

Anonymous said...

thanks for the advice, it worked!

Marcantonio Rendino said...

> thanks for the advice, it worked!

Glad to! :)

Anonymous said...

Thank you! Deleting my cookies worked like a charm :) If you were in my vicinity, I would bake you a plate of vegan chocolate chip cookies to express my appreciation; maybe next time, huh?

Marcantonio Rendino said...

I fell off the vegan wagon - my wife was going to murder me in my sleep :) - but I do appreciate the thought. :)

Unknown said...

I hate to say it, but that "fix" really isn't a fix. I'm having to delete cookies so often (6 times a day?) that I leave the preferences open with the search term "gmail" left in there.

I tried to find some way to actually contact Google about this, but it's nearly impossible to actually get to them.

Marcantonio Rendino said...

There does appear to be a small subset of circumstances in which people need to repeatedly delete cookies; unfortunately I haven't seen it, so I don't know how to debug it. :/

Perhaps it might help to:
-make sure all Safari windows are closed before opening its Preferences
-delete the gmail cookies
-quit Safari

As for reaching Google directly, though I haven't done it myself, check this Google Help page, especially the last item.

Elio said...

Hombre3000, you can try to contact Google through his Twiiter account: http://twitter.com/google