How to catch an error

3 posts, 1 answers
  1. YongKoo Kang
    YongKoo Kang avatar
    101 posts
    Member since:
    Jan 2010

    Posted 10 Dec 2013 Link to this post

    Hi telerik,

    I'm suffering strange error depending on android version.
    It's a kind of Ajax post call which works fine on version 4.0 but no luck over than 4.1version.
    Though it's coded to show error message but nothing displayed, screen just stayed dumb.
    I have no way to know what's going on inside. Folloiwng is my Ajax call of viewmodel.

      _sendWhInRqst : function(action) {
                var that = this;
                var actionRqst = {"ActionType": action, "WhInPartList": this.get("WhInParts"), "User": App.Config.GetUser()};
                App.ShowBusy(true);
               
       $.ajax(
        {
                    url: App.Config.BaseUrl + "/mobileRpc/DoWhInAction",
        type: "POST",
        contentType: "application/json; charset=utf-8",
        data: JSON.stringify(actionRqst),
        processData: false,
        dataType: "json",
        success: function (result) {

                        App.ShowBusy(false);
                        that.ShowCustList();
        },
        error: function (xhr, status, p3, p4) {
         App.ShowBusy(false);
                        var errMessage = App.GetErrorMessage(xhr, status, p3, p4);
         that.SetError(errMessage);
        }
       });
            },

     SetError : function(errMessage) {
       this.set("errorMessage", errMessage);
      }

    As I said, this Ajax call works fine in androind version 4.0.x and in the server side as well.
    However in version over than 4.1.x, nothing happended at server side and u.i just stays as dumb.
    I don't know how to catch what happened at Ajax call in real device. I'm using jQuery v1.9.1.

    Any advice would be appreciated.

    RGDS
    Kang







  2. Answer
    YongKoo Kang
    YongKoo Kang avatar
    101 posts
    Member since:
    Jan 2010

    Posted 13 Dec 2013 Link to this post

    Hello Kang,

    We're not aware of any changes affecting ajax requests in Android v.4.1 or later. You can setup an http debugging proxy like Fiddler to intercept the device traffic i.e. track the requests/responses - this would help you identify the culprit by giving you a status code or more meaningful error. If you need to debug, a remote debugger would help,  you can check out these posts from our blog for pointers and walkthroughs:


    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  3. YongKoo Kang
    YongKoo Kang avatar
    101 posts
    Member since:
    Jan 2010

    Posted 20 Dec 2013 Link to this post

    Hi steve,

    Thank you for your reply.
     I nearly give up to get any help as it was so vague question.
    But your advice hit me to test with fiddler what's actually coming in and out.
    I don't have newer machine in my hand at this time,but will try shortly.

    Thank you so much.

    RGDS
    HK.Lee

Back to Top