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

cordova.require is not a function in geolocation.js

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Incomplete
    • Affects Version/s: 6.3.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Description

      When `navigator.geolocation.getCurrentPosition` was called, an exception raised `cordova.require` on geolocation.js. NOTE: `cordova` global object is accessible from console (developer tools).

      geolocation.js:34 Uncaught (in promise) TypeError: cordova.require is not a function(…)
      win @ geolocation.js:34
      cordova.callbackFromNative @ cordova.js:293
      processMessage @ cordova.js:1081
      processMessages @ cordova.js:1104

      getCurrentPosition: function(success, error, args) {
      var win = function()

      { var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); <------------------------ EXCEPTION RAISED geo.getCurrentPosition(success, error, args); }

      ;
      var fail = function() {
      if (error)

      { error(new PositionError (PositionError.PERMISSION_DENIED, 'Illegal Access')); }

      };
      exec(win, fail, "Geolocation", "getPermission", []);
      },

        Attachments

          Activity

            People

            • Assignee:
              jcesarmobile jcesarmobile
              Reporter:
              lminko La Min Ko
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: