32

I'm trying to ask a question on SO today, but whenever I click the 'Post Your Question' button, I get a red error box that says 'An error occurred submitting the question' with no explanation as to what the error was. Is there something wrong with the site today?

Obviously, meta isn't having this problem, since I was able to post this question.

Here's a screen cap:

can't post question

Here's a screen cap of the dev console error output:

dev tools error

I'm running FF 34.0.5 on 64-bit Windows 7 Enterprise in the metro Vancouver area.

Here's a screen cap of two new errors that showed up on the page after I successfully submitted the question from a private browsing window: enter image description here

16
  • 3
    do you have a screen cap? Commented Oct 19, 2015 at 18:31
  • Location, browser, platform, OS?
    – theB
    Commented Oct 19, 2015 at 18:35
  • 1
    If you hit F12, and retry, the dev console might show more detailed info. Can you share that as well?
    – rene
    Commented Oct 19, 2015 at 18:39
  • 25
    418 I'm a teapot
    – rene
    Commented Oct 19, 2015 at 18:44
  • Hmm, you seem to be hitting an CSRF/XSRF error on the ajax submit
    – rene
    Commented Oct 19, 2015 at 18:47
  • Are you using any browser plugins? Are you on a corperate network? Can you provide the info asked by @theb
    – rene
    Commented Oct 19, 2015 at 18:47
  • On the address bar you're also on http://stackoverflow and not on https?
    – rene
    Commented Oct 19, 2015 at 18:52
  • I do have some browser plugins, and I am on a corporate network; but this is the first time I've had any problems submitting a question on SO. I was successfully able to ask this question on Oct. 7; so the problem is only recent. Nothing in my browser or network configuration has changed since then.
    – RobH
    Commented Oct 19, 2015 at 18:54
  • I assume you already tried a refresh of that page (copy your text to notepad before you do just in case).
    – rene
    Commented Oct 19, 2015 at 18:56
  • @rene: The address showing in my address bar for the ask question page is 'stackoverflow.com/questions/ask'. As for platform, etc., I'm running FF 34.0.5 on 64-bit Windows 7 Enterprise. If, by location, you mean geographically, I'm in the metro Vancouver area.
    – RobH
    Commented Oct 19, 2015 at 19:01
  • OK, and you are still logged in on main, right? From the mse post I linked earlier this might also be caused by an invalid fkey and if you happened to be logged out (without noticing) I assume you can get into this state. Can you try with a private browsing session (ctrl+shift+p) to rule out plugin issues?
    – rene
    Commented Oct 19, 2015 at 19:07
  • @RobH - Yep I did mean geographic. In case one of the load balancers is having problems.
    – theB
    Commented Oct 19, 2015 at 19:29
  • @ren: Yes, I'm still logged in on the main site.
    – RobH
    Commented Oct 19, 2015 at 20:15
  • @rene: I just tried with a private browsing session and was successful. When I did, two new errors showed up on the console in my other section (which was still showing the ask question page). I'll edit the question and add a screen cap.
    – RobH
    Commented Oct 19, 2015 at 20:26
  • That needs a dev to look into. Those two errors seem to be near the lines where indeed the fkey is either fetched or stored so that might confirm my earlier assumption. Not sure what is causing this issue to happen In your case though. I pinged Balpha but this might not be his timezone at the moment.
    – rene
    Commented Oct 19, 2015 at 20:33

1 Answer 1

23

TL;DR: Fixed… sort of.

So you've uncovered a bunch of problems at once.

The underlying cause of all of this was that at some point between opening the Ask Question page and trying to submit your question, you got logged out of Stack Overflow. I don't yet know why that happened, and I can't promise we'll be able to find out, but we'll try.

When you then tried to submit your question, the server correctly responded with "You must log in to post a question", however there was a mismatch between the format in which the server sent this error message and the format in which the client expected an error message, and thus you only received a generic "an error occured" message. This bug is fixed in the next build (and because without this particular issue, you would've known what's going on and could have handled it easily, I consider this fix to make your bug report status-completed, despite there being more issues in place).

You then went to Meta (to ask this very question) and logged in. This also caused you to be logged in to Stack Overflow again. This in turn gave you a new CSRF token on Stack Overflow. There is a mechanism in place that causes already-open browser tabs to update their token in situations like this, but this requires an actual page view on Stack Overflow, and such a page view never happened because you logged via Meta. This is why you at this point started to receive the 418 response (which is a CSRF token mismatch – your Ask Question browser tab still had the old token). This is not yet fixed, but I have some ideas.

Finally, the two new errors that you received were completely unrelated to the rest; a plain old JavaScript bug in the cardiologist. This one is fixed in the next build as well.

1
  • Hmmm... It may be a coincidence, but I also got logged out yesterday on my work computer. This happened while browsing SO normally, and I noticed as I don't remember ever getting logged out like that before (I was logged out in one tab and logged in in another - and refreshing that one showed the logged out version). I'm still logged in on my home computer without issues. Commented Oct 20, 2015 at 22:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .