App occasionally gets ERROR: System Error DETAILS: failed inside handle_json_callback

I only see this on the watch (Vivoactive HR) and never on the simulator. A user has also reported the same.
My device is at SW Version 3.90 (latest update I get from the latest Android Connect IQ app).
I have built a debug version of my app with the latest release SDK 2.3.1 and it still shows this error (there was some indication in another thread that something similar was fixed at this version).
Unfortunately I have no way to capture the web data that is loaded when the error occurs (at least no way I know of), and it happens only every hour or so (which makes for a pretty lousy watch app).

I will send in email the web url needed in the settings for my app currently in the store that will let you see the error, but it is a private web address.



ERROR: System Error
DETAILS: failed inside handle_json_callback
STORE_ID: 00000000000000000000000000000000
CALLSTACK:

<there is no callstack - that is the extent of the CIQ_LOG.TXT>
  • Sorry, but this is just "me too" support.
    I also have a long-running app that occasionally crashes for my users with
    DETAILS: failed inside handle_json_callback
    And there's no json involved.
  • Hello,

    There have been a few reports of some issues lately with GCMA using JSON. I'm not sure if it's related to the main issue we are having where GCMA is sending json numbers as longs. It's possible that this is pushing the memory, but it's not totally clear from the CIQ_log. I know that RaceQs is sending a lot of data through json. How are you using json? If you can send us the rest of the info so we can try and reproduce it in house that would be great. Email @ [email][email protected][/email]

    Thanks,
    -Coleman
  • bit more info to original post

    the call used in my app is
    Communications.makeWebRequest(url, {"format" => "json"}, {}, method(:onReceive));
    where url = base_url + "/api/v2/properties/basal,bgnow,iob,cob,loop,pump,delta";
    i sent the (private) base_url (set in app settings) in my email to connect iq support referencing this post.

    i've also tried using try-catch to catch the error but it appears to be just a fatal error not an exception - if its simply out of memory due to a large web response it would be great if you could just free the memory and return an error/exception...
  • Hello,

    There have been a few reports of some issues lately with GCMA using JSON. I'm not sure if it's related to the main issue we are having where GCMA is sending json numbers as longs. It's possible that this is pushing the memory, but it's not totally clear from the CIQ_log. I know that RaceQs is sending a lot of data through json.


    I don't think that's the right path because of two points:
    • my crashes are happening with GCM - iOS not Android and
    • I'm not reading very much JSON, certainly not enough for the longs issue to push memory. My JSON load is in writing, not reading as I'm packaging and sending extensive activity details for debug purposes - one "packet" every minute.
  • fwiw, my app is using json on the web get request (as per the call mentioned in my earlier comment)... sounds like RaceQs's scenario is somewhat different.
    and I am using Android... i'm reaching out to the user that reported this to see what OS they are using.

    [Edit:]
    and the user has reported back that they are also using Android.
    both of us think that this crash may have started with a recent update, i know at least that it was working better several weeks ago.
  • I'm thinking that this error may not be related to the the changes in GCM. If the hotfix they released for the long/number issue yesterday happens to fix things, great, but I'd like to figure out what's going on. It is possible
    to have you send in your project to [email][email protected][/email]? We can try and figure out what is unique about your JSON response that is causing an error.

    Thanks,
    -Coleman
  • I tried with yesterday's Android Connect app update (version 3.19.1) and the watch app still dies with the same error. The app update didn't trigger any update on the watch fwiw.

    I can/will send you the entire app source if you like, it is open source - but the key is the app setting base URL (a private site address) that i already sent to that email address referencing this post.
    [Edit: app source sent via email]
  • still seeing these crashes regularly - let me know if you need any further help repro'ing.
  • Are older versions of the android connect IQ app available for side loading so I can test at what point this started failing?
  • Are older versions of the android connect IQ app available for side loading so I can test at what point this started failing?


    well, i found APKs on apkmirror.com and tried several. v 3.16.1, v3.15, and v3.10 all still show the handle_json_callback system crash. The latter (3.10) goes back to August 2016, and i'm sure i wasn't seeing this issue back then. Other things that could have changed are the website and the watch firmware... I don't know how to rollback the watch firmware, but i'll give a quick go at using an older website with the old phone app and see if that still shows the issue (it did on the latest phone app)...