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

Issue with local xhr status code and plugman jsmodule stuff

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Master
    • 2.8.0
    • cordova-js, cordova-plugman
    • None

    Description

      Issue is with plugin_loader.js script. It makes a local xhr request to get the contents of cordova_plugins.json. It returns successfully, but with the status code 0 instead of 200. After doing some research (https://groups.google.com/forum/?fromgroups=#!topic/phonegap/KjHoMlLyoUA) I found out that local xhr on the file protocol returns 0.

      plugin_loader checks for status code 200 at https://github.com/apache/cordova-js/blob/master/lib/scripts/plugin_loader.js#L103

      I have been trying to install the javascript stuff for device motion and couldn't understand why navigator.accelerometer wasn't getting clobbered. Fixing this solved the problem.

      I will look into pushing a fix for this tomorrow.

      Attachments

        Issue Links

          Activity

            People

              stevegill Steve Gill
              stevegill Steve Gill
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: