Last modified: 2014-11-19 10:47:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73331, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71331 - JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject
JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted t...
Status: RESOLVED FIXED
Product: Wikipedia App
Classification: Unclassified
Android App (Other open bugs)
Stable
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-25 20:29 UTC by Alex Monk
Modified: 2014-11-19 10:47 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Alex Monk 2014-09-25 20:29:09 UTC
Seen coming from edit preview & edit section:

https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7786983
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7752648

Maybe something to do with server error pages?
Comment 1 Bernd Sitzmann 2014-09-25 20:33:16 UTC
Yes, I think this happens when there's a server problem. I ran into this myself a couple of days ago. The client should handle these kinds of errors without crashing, of course.
Comment 3 Dmitry Brant 2014-10-23 16:47:46 UTC
https://gerrit.wikimedia.org/r/168313
Comment 4 Dmitry Brant 2014-10-23 16:51:34 UTC
So, when there's a server error (500), it returns an HTML response instead of a JSON response; that's why the response begins with "<!DOCTYPE..."

This condition is actually handled correctly in the java-mwapi layer, and is thrown as an ApiException.  There were simply some cases in the Editing workflow where ApiException was still not being caught properly.
Comment 5 Alex Monk 2014-10-26 14:52:51 UTC
Sounds like this is fixed then.
Comment 6 Alex Monk 2014-11-19 10:47:02 UTC
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=7966282 is a similar crash, from the alpha updater. I particularly like how the code that throws this JSONException as a RuntimeException says "// This never happens"

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links