Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-1666

[weinre] "INVALID_STATE_ERR: DOM Exception 11" with chbrody/Cordova-SQLitePlugin

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0
    • None
    • None
    • OS X Lion 10.7.4, Google Chrome 22.0.1229.94, iOS6 iPhone Simulator

    Description

      When using weinre with Cordova-SQLitePlugin we get a javascript error:

      "INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable. File: http://192.168.1.169:1337/target/target-script-min.js?_=1350463351336 Line Number: 2794"

      Above line number corresponds to the function NetworkRequest.prototype.handleDone in target-script-min.js.

      As a work around I have just wrapped a try catch and made it fail silently:

      NetworkRequest.prototype.handleDone = function() {
      try {
      var description, sourceString, status, statusText, success, time;
      sourceString = this.xhr.responseText;
      Weinre.wi.NetworkNotify.setInitialContent(this.id, sourceString, "XHR");
      time = Date.now() / 1000.0;
      status = this.xhr.status;
      if (status === 0)

      { status = 200; }

      statusText = this.xhr.statusText;
      success = status >= 200 && status < 300;
      if (success)

      { return Weinre.wi.NetworkNotify.didFinishLoading(this.id, time); }

      else

      { description = "" + status + " - " + statusText; return Weinre.wi.NetworkNotify.didFailLoading(this.id, time, description); }

      } catch (e)

      { return; }

      };

      Attachments

        1. weinre_test.html
          3 kB
          Christiaan van Zyl

        Activity

          People

            pmuellr Patrick Mueller
            mozey Christiaan van Zyl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: