Results 1 to 3 of 3

Thread: Android 2.3.3. JSON bug (JSON string twice in responseText)

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    5
    Vote Rating
    0
      0  

    Default Android 2.3.3. JSON bug (JSON string twice in responseText)

    Hi all,

    we bumped in a very strange bug on Android 2.3.3.
    All ajax calls that expect a JSON object fail with "Unable to parse the JSON returned by the server.." due to a doubled JSON string. So instead of
    Code:
    {"key":"value"}
    the reponseText contains
    Code:
    {"key":"value"}{"key":"value"}
    On Android 2.1 and Android 3.1 this problem does not occur.

    Can anybody confirm this behavior?

    Best Regards
    Sebastian

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    The response has the double object? If so then that is not valid JSON and therefor not consumable.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    5
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    The response has the double object? If so then that is not valid JSON and therefor not consumable.
    Yes, correct. The bug occurs due to an OPTION request sent in chrome browsers. We fixed this by
    Code:
    Ext.Ajax.useDefaultXhrHeader = false;
    and responding only to POST and GET on ther server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •