You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "jcesarmobile (JIRA)" <ji...@apache.org> on 2016/12/17 20:39:58 UTC
[jira] [Commented] (CB-11872) cordova.require is not a function in
geolocation.js
[ https://issues.apache.org/jira/browse/CB-11872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15757577#comment-15757577 ]
jcesarmobile commented on CB-11872:
-----------------------------------
In which platform are you testing and how?
> cordova.require is not a function in geolocation.js
> ---------------------------------------------------
>
> Key: CB-11872
> URL: https://issues.apache.org/jira/browse/CB-11872
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Geolocation
> Affects Versions: 6.3.1
> Environment: - Linux lmk-inspiron-3521 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
> - cordova 6.3.1
> - node 5.10.0
> - cordova-plugin-geolocation 2.3.0
> Reporter: La Min Ko
> Priority: Critical
>
> 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", []);
> },
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org