9

Upon typing out this question on my Android device, I was greeted with the following screen when clicking to submit the question:

Screenshot

When clicking Cancel, I was taken back to the questions page with my question nowhere to be seen. Fortunately when checking here on my PC I could see the question, but if this had indeed failed to submit it offered me no way of getting back to the question I'd just typed out.

Could this be changed so that if the app thinks the question failed to submit it offers the ability to copy the content to the clipboard? I probably wouldn't have bothered to type it out again any time soon had it indeed failed to submit and been lost completely.

  • 1
    I believe the app does save draft of the question locally, the reason you didn't see it is because it was already submitted. – ShaWiz Dec 17 '14 at 15:13
  • @ShadowWizard I see. This is my first time using the app so I wasn't aware of that. I guess the message could be changed to clarify this. – James Donnelly Dec 17 '14 at 15:15
  • Your draft should have been saved. Click to ask the question again and choose not to discard the draft but continue writing the question (the confirmation dialog will popup). If this confirmation dialog doesn't appear, then it is really a bug. – nicael Dec 17 '14 at 15:17
  • @nicael I don't recall seeing any confirmation dialogue after clicking submit, but I may be wrong. – James Donnelly Dec 17 '14 at 15:18
  • @nicael the draft is deleted when the question is submitted. (probably the error happened while loading the question itself, not while submitting it :)) – ShaWiz Dec 17 '14 at 15:18
  • Nonono. What happens when you click to ask the question again? All the fields are blank? – nicael Dec 17 '14 at 15:19
  • Easy enough to prove @nicael's point: start typing new question. Close the app. Open again and go the Ask Question screen again. You should see what you typed in there. – ShaWiz Dec 17 '14 at 15:20
  • @nicael ah I see, that does indeed give the prompt to restore from draft. This didn't happen after receiving the message featured in this question though (because the question did submit successfully, I suppose). – James Donnelly Dec 17 '14 at 15:23
  • I am experiencing this as well, but had no connectivity issues while posting. The question shows in my profile but I can not load it on the app. Issue was temporary (a few minutes) but still a bit annoying – Air Dec 27 '14 at 3:11
5

This will be fixed in 1.0.85.

The problem is an unhealthy mix of a a race condition and caching.

When a question is created, it is first written to the readwrite database, then moments later replicated to the readonly databases. When a question is fetched from /questions/{id}, it is looked up in a readonly database.[1] This means that if we call /questions/add and immediately follow it up with /questions/{id} we have an unacceptably high risk of failure. This is why you got a question not found error.

Making matters all the worse is how caching reacts in this situation. When we created the question, we set up a cache breaker for that ID when checking cached data. When we first loaded the missing question, we cache the fact that the request to /questions/{id} returns zero responses. If you try loading the question again, we'll get the list of zero items from the cache see that none of those zero items have a cache broken ID and return the empty list again and again until the cache expires.

Right now the cache is not privy to the fact that the ID in the request is something to break on, and we could either share that information with the cache breaker or simply say that all calls to /questions/{id} should be cache broken for an account after asking for X minutes. (This is what we now to for tag preferences, accounts, and favorite questions.)

For now, though, there's one simple client side fix that will address both issues. When calling /questions/add, the response returns the newly created question in its entirety. We can simply pass that question to the question activity and have it render it. This lets you see the question sooner and gives the readonly database a change to get the data before a call to /questions/{id} is made, if it is made at all.

[1] This is just to the best of my knowledge as it was explained to me a long time ago.

5

Reproduced on my HTC One E8, Hong Kong edition, running lollipop 5.0.2 and the latest version of the app. I did not have any internet connection issues. Here's my workflow:

  • Write up a question
  • Preview the post
  • Decide to edit
  • Submit
  • Receive the error
  • Use the back button, hoping to recover my question's text
  • End up on the MSE home page (I was posting here)

My question was successfully posted in spite of the error message. I suspect the error is caused by the app attempting to return the user to the draft activity after submission, but the activity has already been destroyed because the post was submitted.

0

Reproduced on my Nexus 5 running android 4.4.4 and the SE app version 1.0.68. I did not lose my internet connection whilst posting though. All I had to do was post a new question and I got the error message upon submission. The question does exist on the site and usually becomes accessible via the app after a certain amount of time (caching involved here maybe?).

Q submit failed

Clicking on Retry doesn't work as the app answers with the same error message.

I think this is a bug which should be tagged as urgent since it's effectively hindering the app usability.

You must log in to answer this question.

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