Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-7043 iOS 8 Support
  3. CB-6911

[CordovaJS][iOS 8] - "deprecated attempt to access property" errors when accessing anything off window.navigator

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7.0
    • Component/s: cordova-js
    • Labels:
      None
    • Environment:

      iOS 8 beta 5 (device)

      Description

      references to window.navigator.* (platform, geolocation) etc fail with

      Deprecated attempt to access property 'geolocation' on a non-Navigator object.

        Issue Links

          Activity

          Hide
          andrew Andrew Busch added a comment -

          Ah right, I had just updated to Cordova 4.0 but looks like CordovaJS has a different release cycle and current version number.

          Show
          andrew Andrew Busch added a comment - Ah right, I had just updated to Cordova 4.0 but looks like CordovaJS has a different release cycle and current version number.
          Hide
          shazron Shazron Abdullah added a comment -

          Andrew, the bug was resolved as Fix Version: 3.7.0.
          3.7.0 has not been released yet. To grab the fixes right now, you will have to patch your js.

          Show
          shazron Shazron Abdullah added a comment - Andrew, the bug was resolved as Fix Version: 3.7.0. 3.7.0 has not been released yet. To grab the fixes right now, you will have to patch your js.
          Hide
          FRD49 Fabian Diehl added a comment -

          Andrew Busch make sure you use the latest version of the geolocation plugin (0.3.10)! I had the same problem in an earlier state of this bug report and I had to update to the dev version to get it working. 0.3.10 works for me, tested this morning.

          Show
          FRD49 Fabian Diehl added a comment - Andrew Busch make sure you use the latest version of the geolocation plugin (0.3.10)! I had the same problem in an earlier state of this bug report and I had to update to the dev version to get it working. 0.3.10 works for me, tested this morning.
          Hide
          andrew Andrew Busch added a comment - - edited

          I'm still getting this issue with a Cordova 4.0, iOS 8 build, despite it being marked as 'Resolved'. getCurrentPosition is also failing for me, though it seems to be a separate issue.

          Show
          andrew Andrew Busch added a comment - - edited I'm still getting this issue with a Cordova 4.0, iOS 8 build, despite it being marked as 'Resolved'. getCurrentPosition is also failing for me, though it seems to be a separate issue.
          Hide
          FRD49 Fabian Diehl added a comment -

          Guys, let Shazron time to test on all platforms, it's a js change not just ios...
          If you want to get the fix simply do the following:

          1. Clone the cordova-js (Version 3.7)
          2. Grunt the git, this will create all the native js files.
          3. Replace the cordova.js in your platform_www folder

          This is it, you have the fix and shazron has time to test if you need more detailed instruction I would gladly help you or send you the js for the platform you need.

          Hope this discussion will be closed nown

          Kind regards
          Fabian
          Kind regards

          Show
          FRD49 Fabian Diehl added a comment - Guys, let Shazron time to test on all platforms, it's a js change not just ios... If you want to get the fix simply do the following: 1. Clone the cordova-js (Version 3.7) 2. Grunt the git, this will create all the native js files. 3. Replace the cordova.js in your platform_www folder This is it, you have the fix and shazron has time to test if you need more detailed instruction I would gladly help you or send you the js for the platform you need. Hope this discussion will be closed nown Kind regards Fabian Kind regards
          Hide
          shazron Shazron Abdullah added a comment -

          That's part of the reason why I wanted it to be in 3.7.0, because this change affects all platforms (navigator object clobbering), and we may need some more room for testing.

          Show
          shazron Shazron Abdullah added a comment - That's part of the reason why I wanted it to be in 3.7.0, because this change affects all platforms (navigator object clobbering), and we may need some more room for testing.
          Hide
          cmarcelk Marcel Kinard added a comment -

          Ah, I forgot it is a js change instead of a native change. That makes it more complicated. But not tremendously more so.

          Show
          cmarcelk Marcel Kinard added a comment - Ah, I forgot it is a js change instead of a native change. That makes it more complicated. But not tremendously more so.
          Hide
          shazron Shazron Abdullah added a comment -

          Marcel – then thats fine (with just this one change to cordova.js).

          Show
          shazron Shazron Abdullah added a comment - Marcel – then thats fine (with just this one change to cordova.js).
          Hide
          shazron Shazron Abdullah added a comment -

          Try patching:
          ~/.cordova/lib/npm_cache/cordova-ios/3.6.0/package/CordovaLib/cordova.js

          Show
          shazron Shazron Abdullah added a comment - Try patching: ~/.cordova/lib/npm_cache/cordova-ios/3.6.0/package/CordovaLib/cordova.js
          Hide
          cmarcelk Marcel Kinard added a comment -

          Sorry if I miscommunicated. My suggestion is to let 3.6.3 get out the door and go live, and the question is if a follow-on cordova-ios@3.6.4 (by itself, with no other platforms) is warranted. It would take a tools release to go with it, which I also suggest be a follow-on and not an interruption. Not sure if that changes your response.

          Show
          cmarcelk Marcel Kinard added a comment - Sorry if I miscommunicated. My suggestion is to let 3.6.3 get out the door and go live, and the question is if a follow-on cordova-ios@3.6.4 (by itself, with no other platforms) is warranted. It would take a tools release to go with it, which I also suggest be a follow-on and not an interruption. Not sure if that changes your response.
          Hide
          shazron Shazron Abdullah added a comment -

          I don't want to stop the vote process and really just want that release out the way. I am of the opinion that this "error" is harmless – it doesn't affect execution, even though it shows as an error, it's actually a warning. Others here differ I think.

          Show
          shazron Shazron Abdullah added a comment - I don't want to stop the vote process and really just want that release out the way. I am of the opinion that this "error" is harmless – it doesn't affect execution, even though it shows as an error, it's actually a warning. Others here differ I think.
          Hide
          cmarcelk Marcel Kinard added a comment -

          Shazron Abdullah, important enough for this to be a candidate for cordova-ios@3.6.4?

          Show
          cmarcelk Marcel Kinard added a comment - Shazron Abdullah , important enough for this to be a candidate for cordova-ios@3.6.4?
          Hide
          shazron Shazron Abdullah added a comment -

          Cordova 3.6.x release process was started on August 26th, and this commit occurred after that, thus it will be in 3.7.0.
          I'll get back to you on "Is there any word on how we can add this to cordova.js without having it re-write itself every-time you do a cordova build ios?"

          Show
          shazron Shazron Abdullah added a comment - Cordova 3.6.x release process was started on August 26th, and this commit occurred after that, thus it will be in 3.7.0. I'll get back to you on "Is there any word on how we can add this to cordova.js without having it re-write itself every-time you do a cordova build ios?"
          Hide
          abremner Angus Bremner added a comment -

          "Is there any word on how we can add this to cordova.js without having it re-write itself every-time you do a cordova build ios?"

          If this is not going to be in the next update, I'd like to know this also.

          Show
          abremner Angus Bremner added a comment - "Is there any word on how we can add this to cordova.js without having it re-write itself every-time you do a cordova build ios?" If this is not going to be in the next update, I'd like to know this also.
          Hide
          gregavola Greg added a comment -

          Is there any word on how we can add this to cordova.js without having it re-write itself every-time you do a cordova build ios?

          Greg

          Show
          gregavola Greg added a comment - Is there any word on how we can add this to cordova.js without having it re-write itself every-time you do a cordova build ios? Greg
          Hide
          abremner Angus Bremner added a comment -

          Hey Shazron, why is this pushed to 3.7? Can we get it in the 3.6 release? I know you say it doesn't cause any issues, but I am certain it is causing various js issues in my app.

          Show
          abremner Angus Bremner added a comment - Hey Shazron, why is this pushed to 3.7? Can we get it in the 3.6 release? I know you say it doesn't cause any issues, but I am certain it is causing various js issues in my app.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/cordova-js/pull/80

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-js/pull/80
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 6c7a76fcd2f0aa60e0879d1417e1ac0ca44f2c6c in cordova-js's branch refs/heads/master from Shazron Abdullah
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;h=6c7a76f ]

          CB-6911 - iOS 8 - "deprecated attempt to access property" errors when accessing anything off window.navigator

          Show
          jira-bot ASF subversion and git services added a comment - Commit 6c7a76fcd2f0aa60e0879d1417e1ac0ca44f2c6c in cordova-js's branch refs/heads/master from Shazron Abdullah [ https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;h=6c7a76f ] CB-6911 - iOS 8 - "deprecated attempt to access property" errors when accessing anything off window.navigator
          Hide
          gregavola Greg added a comment -

          What is the cause of this issue? I didn't see the issue in iOS8 GM, but I just built an app and deployed to my iOS8 device and it doesn't work properly.

          Greg

          Show
          gregavola Greg added a comment - What is the cause of this issue? I didn't see the issue in iOS8 GM, but I just built an app and deployed to my iOS8 device and it doesn't work properly. Greg
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user difa1 commented on the pull request:

          https://github.com/apache/cordova-js/pull/80#issuecomment-55110115

          Thanks for the fix :+1: Hope you get acceptance for this before iOS 8 will be released

          Show
          githubbot ASF GitHub Bot added a comment - Github user difa1 commented on the pull request: https://github.com/apache/cordova-js/pull/80#issuecomment-55110115 Thanks for the fix :+1: Hope you get acceptance for this before iOS 8 will be released
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user uipoet commented on the pull request:

          https://github.com/apache/cordova-js/pull/80#issuecomment-55064551

          Thank you @shazron! Watching for acceptance of this soon, hopefully.

          Show
          githubbot ASF GitHub Bot added a comment - Github user uipoet commented on the pull request: https://github.com/apache/cordova-js/pull/80#issuecomment-55064551 Thank you @shazron! Watching for acceptance of this soon, hopefully.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user shazron opened a pull request:

          https://github.com/apache/cordova-js/pull/80

          CB-6911 - iOS 8 - "deprecated attempt to access property" errors when accessing anything off window.navigator

          Tested on iOS 8 UIWebView. Any attempt to call the bridge will result in:
          "Deprecated attempt to access property 'userAgent' on a non-Navigator object." in the console of the Web Inspector.

          Object.defineProperty seems to have broad support in mobile browsers:
          https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__#Browser_compatibility

          Not sure about IE Mobile, that's why I sent this pull request for discussion since these files are common for all platforms. The (safe) alternative is to add this code for iOS only.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/shazron/cordova-js CB-6911

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-js/pull/80.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #80


          commit 6c7a76fcd2f0aa60e0879d1417e1ac0ca44f2c6c
          Author: Shazron Abdullah <shazron@apache.org>
          Date: 2014-09-10T02:09:28Z

          CB-6911 - iOS 8 - "deprecated attempt to access property" errors when accessing anything off window.navigator


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user shazron opened a pull request: https://github.com/apache/cordova-js/pull/80 CB-6911 - iOS 8 - "deprecated attempt to access property" errors when accessing anything off window.navigator Tested on iOS 8 UIWebView. Any attempt to call the bridge will result in: "Deprecated attempt to access property 'userAgent' on a non-Navigator object." in the console of the Web Inspector. Object.defineProperty seems to have broad support in mobile browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__#Browser_compatibility Not sure about IE Mobile, that's why I sent this pull request for discussion since these files are common for all platforms. The (safe) alternative is to add this code for iOS only. You can merge this pull request into a Git repository by running: $ git pull https://github.com/shazron/cordova-js CB-6911 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-js/pull/80.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #80 commit 6c7a76fcd2f0aa60e0879d1417e1ac0ca44f2c6c Author: Shazron Abdullah <shazron@apache.org> Date: 2014-09-10T02:09:28Z CB-6911 - iOS 8 - "deprecated attempt to access property" errors when accessing anything off window.navigator
          Hide
          FRD49 Fabian Diehl added a comment -

          Hi Shazron,
          I can confirm both of your replacements work fine!

          Show
          FRD49 Fabian Diehl added a comment - Hi Shazron, I can confirm both of your replacements work fine!
          Hide
          abremner Angus Bremner added a comment - - edited

          Hi Shazron

          Thanks for looking into this. I am trying to see if your patch works, although every time I build my cordova.js is overwritten and the fix is removed. Is there a way to update this on an existing cordova project?

          EDIT: I was able to edit cordova.js directly in Xcode and can also confirm the "deprecated attempt to access property" errors no longer appear. Thanks!

          Show
          abremner Angus Bremner added a comment - - edited Hi Shazron Thanks for looking into this. I am trying to see if your patch works, although every time I build my cordova.js is overwritten and the fix is removed. Is there a way to update this on an existing cordova project? EDIT: I was able to edit cordova.js directly in Xcode and can also confirm the "deprecated attempt to access property" errors no longer appear. Thanks!
          Hide
          shazron Shazron Abdullah added a comment - - edited

          Solved, I think.

          Add this non-standard (browser support: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__#Browser_compatibility):

                      } else {
                          (function(k) {
                              newNavigator.__defineGetter__(k, function(){
                                          return origNavigator[k];
                              });
                          })(key);
                      }
          
          

          OR this standard usage (browser support: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__#Browser_compatibility)

                      } else {
                          (function(k) {
                                  Object.defineProperty(newNavigator, k, {
                                      get: function() {
                                          return origNavigator[k];
                                      },
                                      configurable: true,
                                      enumerable: true
                                  });
                          })(key);
                      }
          

          ... by replacing this line: https://github.com/apache/cordova-js/blob/26e3e49e49b2fb61ca836572af85c7a776ea9f1c/src/common/init.js#L58

          Show
          shazron Shazron Abdullah added a comment - - edited Solved, I think. Add this non-standard (browser support: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__#Browser_compatibility): } else { (function(k) { newNavigator.__defineGetter__(k, function(){ return origNavigator[k]; }); })(key); } OR this standard usage (browser support: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__#Browser_compatibility ) } else { (function(k) { Object .defineProperty(newNavigator, k, { get: function() { return origNavigator[k]; }, configurable: true , enumerable: true }); })(key); } ... by replacing this line: https://github.com/apache/cordova-js/blob/26e3e49e49b2fb61ca836572af85c7a776ea9f1c/src/common/init.js#L58
          Hide
          shazron Shazron Abdullah added a comment -

          The WebKit error source:
          https://github.com/WebKit/webkit/blob/master/Source/WebCore/bindings/js/JSDOMBinding.cpp#L543

          WebKit issues:
          https://bugs.webkit.org/show_bug.cgi?id=133559
          http://trac.webkit.org/changeset/168385

          Tests:
          https://github.com/WebKit/webkit/blob/0190dd5b8c0272beaa705dbc10863a84a3e6af5e/LayoutTests/js/dom/shadow-navigator-geolocation-in-strict-mode-does-not-throw-expected.txt

          Basically, what shows up as an error in the Web Inspector, is a warning, and it only shows the first time, when clobbering. If you clobber again, it won't show the warning again.

          Not sure right now how to fix this warning yet.

          Show
          shazron Shazron Abdullah added a comment - The WebKit error source: https://github.com/WebKit/webkit/blob/master/Source/WebCore/bindings/js/JSDOMBinding.cpp#L543 WebKit issues: https://bugs.webkit.org/show_bug.cgi?id=133559 http://trac.webkit.org/changeset/168385 Tests: https://github.com/WebKit/webkit/blob/0190dd5b8c0272beaa705dbc10863a84a3e6af5e/LayoutTests/js/dom/shadow-navigator-geolocation-in-strict-mode-does-not-throw-expected.txt Basically, what shows up as an error in the Web Inspector, is a warning, and it only shows the first time, when clobbering. If you clobber again, it won't show the warning again. Not sure right now how to fix this warning yet.
          Show
          shazron Shazron Abdullah added a comment - The JS that is causing this: https://github.com/apache/cordova-js/blob/26e3e49e49b2fb61ca836572af85c7a776ea9f1c/src/common/init.js#L46-L65
          Hide
          shazron Shazron Abdullah added a comment -

          This problem crops up whenever any object off "navigator" is called after cordova.js is loaded. I didn't have any plugins loaded.

          To test this, I have a button that will alert the navigator.userAgent value to the screen.

          1. If cordova.js is loaded before the alert is triggered, the error shows in the console
          2. If cordova.js is not loaded at all, and the alert is triggered, no error is show in the console

          Something in cordova.js is causing this. This error seems to be harmless however (so far – but eventually this has to be fixed), the values off navigator can be accessed properly.

          Changing this component to a cordova-js issue.

          Show
          shazron Shazron Abdullah added a comment - This problem crops up whenever any object off "navigator" is called after cordova.js is loaded. I didn't have any plugins loaded. To test this, I have a button that will alert the navigator.userAgent value to the screen. 1. If cordova.js is loaded before the alert is triggered, the error shows in the console 2. If cordova.js is not loaded at all, and the alert is triggered, no error is show in the console Something in cordova.js is causing this. This error seems to be harmless however (so far – but eventually this has to be fixed), the values off navigator can be accessed properly. Changing this component to a cordova-js issue.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 3bc05a423d064413d6d15e68e4f14417d823318c in cordova-plugin-geolocation's branch refs/heads/master from Shazron Abdullah
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-geolocation.git;h=3bc05a4 ]

          Revert CB-6911 partially (keeping Info.plist key installation for iOS 8)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 3bc05a423d064413d6d15e68e4f14417d823318c in cordova-plugin-geolocation's branch refs/heads/master from Shazron Abdullah [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-geolocation.git;h=3bc05a4 ] Revert CB-6911 partially (keeping Info.plist key installation for iOS 8)
          Hide
          shazron Shazron Abdullah added a comment -

          Re-opening, editing issue to reflect specific bug.

          Show
          shazron Shazron Abdullah added a comment - Re-opening, editing issue to reflect specific bug.
          Hide
          shazron Shazron Abdullah added a comment -

          Hi Angus,
          Thanks - we'll get to the bottom of this, I'll pull in CB-7158 and also re-open this (editing the subject to be more clear).

          Show
          shazron Shazron Abdullah added a comment - Hi Angus, Thanks - we'll get to the bottom of this, I'll pull in CB-7158 and also re-open this (editing the subject to be more clear).
          Hide
          jasonpeterson Jason Peterson added a comment - - edited

          I think there is some overlap here with CB-7158 (which has a patch with some additions here https://github.com/apache/cordova-plugin-geolocation/pull/21/files). For what it's worth, that patch got me working, while this one worked the first request (but not subsequent ones).

          I can confirm that the "deprecated attempt" errors still occur (after either patch) on Xcode beta 7.

          Thanks to everyone working these issues, it's much appreciated.

          Show
          jasonpeterson Jason Peterson added a comment - - edited I think there is some overlap here with CB-7158 (which has a patch with some additions here https://github.com/apache/cordova-plugin-geolocation/pull/21/files ). For what it's worth, that patch got me working, while this one worked the first request (but not subsequent ones). I can confirm that the "deprecated attempt" errors still occur (after either patch) on Xcode beta 7. Thanks to everyone working these issues, it's much appreciated.
          Hide
          abremner Angus Bremner added a comment -

          This has been marked as resolved yet I don't believe the original issue in the description has been addressed. I have tried Xcode beta 7 with iOS 8 beta 5. I have updated the geolocation plugin to include this fix. I have added this script that was meant to address the issue

          if (navigator.userAgent === undefined) {
          	navigator.__defineGetter__('userAgent', function() {
          		return("Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit");
          	});
          }
          

          I am still getting a large number of errors:
          Deprecated attempt to access property 'userAgent' on a non-Navigator object.
          Deprecated attempt to access property 'geolocation' on a non-Navigator object.

          Screenshot attached.

          Show
          abremner Angus Bremner added a comment - This has been marked as resolved yet I don't believe the original issue in the description has been addressed. I have tried Xcode beta 7 with iOS 8 beta 5. I have updated the geolocation plugin to include this fix. I have added this script that was meant to address the issue if (navigator.userAgent === undefined) { navigator.__defineGetter__('userAgent', function() { return ( "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit" ); }); } I am still getting a large number of errors: Deprecated attempt to access property 'userAgent' on a non-Navigator object. Deprecated attempt to access property 'geolocation' on a non-Navigator object. Screenshot attached.
          Hide
          shazron Shazron Abdullah added a comment -

          Note the patch is only asking for permission for geoloc when the app is in use, not in the background – since that is what we only have in the plugin (no background services).

          Show
          shazron Shazron Abdullah added a comment - Note the patch is only asking for permission for geoloc when the app is in use, not in the background – since that is what we only have in the plugin (no background services).
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1c18ea07948775b5b1b4e2d964836b757fc21fd9 in cordova-plugin-geolocation's branch refs/heads/master from Shazron Abdullah
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-geolocation.git;h=1c18ea0 ]

          CB-6911 - Geolocation fails in iOS 8

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1c18ea07948775b5b1b4e2d964836b757fc21fd9 in cordova-plugin-geolocation's branch refs/heads/master from Shazron Abdullah [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-geolocation.git;h=1c18ea0 ] CB-6911 - Geolocation fails in iOS 8
          Hide
          shazron Shazron Abdullah added a comment -
          Show
          shazron Shazron Abdullah added a comment - Also, new iOS 8 API to request permission: http://stackoverflow.com/questions/24062509/ios-8-location-services-not-working
          Hide
          shazron Shazron Abdullah added a comment -

          Well, here's a clue:
          https://devforums.apple.com/message/1023172#1023172
          "To use html5 geolocation in webviews in iOS 8, the app needs to specify the NSLocationWhenInUseUsageDescription key/value in its Info.plist."

          New in iOS 8:
          https://developer.apple.com/library/prerelease/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW26

          Show
          shazron Shazron Abdullah added a comment - Well, here's a clue: https://devforums.apple.com/message/1023172#1023172 "To use html5 geolocation in webviews in iOS 8, the app needs to specify the NSLocationWhenInUseUsageDescription key/value in its Info.plist." New in iOS 8: https://developer.apple.com/library/prerelease/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW26
          Hide
          shazron Shazron Abdullah added a comment -

          I don't get this error anymore when using Xcode 6 beta 7 (Simulator) nor the same Xcode and an iOS 8 beta 5 device.
          However, now geolocation never returns a location at all.

          Show
          shazron Shazron Abdullah added a comment - I don't get this error anymore when using Xcode 6 beta 7 (Simulator) nor the same Xcode and an iOS 8 beta 5 device. However, now geolocation never returns a location at all.
          Hide
          abremner Angus Bremner added a comment - - edited

          I'm still seeing many occurrences of this issue on Cordova 3.5 and iOS 8 beta 6. Will this be resolved before the iOS 8 release? Screen shot showing some of the errors attached.

          Also to note, this is preventing the to request to allow location services from popping up causing all geoLocation services to fail.

          Show
          abremner Angus Bremner added a comment - - edited I'm still seeing many occurrences of this issue on Cordova 3.5 and iOS 8 beta 6. Will this be resolved before the iOS 8 release? Screen shot showing some of the errors attached. Also to note, this is preventing the to request to allow location services from popping up causing all geoLocation services to fail.
          Hide
          fsmichaelgo Michael Go added a comment - - edited

          I have Cordova 3.5.0 , and I am still getting this issue in iOS 8 beta 5.
          I have tested on my simulator and device.
          I tried the EddyVerbruggen's fix: https://gist.github.com/EddyVerbruggen/cd02c73162180793513e
          I tried the Cordova's fix commit: https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=commitdiff;h=2ae3caa;hp=d970db70850a22b2001bc222f8ad6fff45a321fd
          I also tried to change the bridgeMode to jsToNativeModes.IFRAME_NAV in cordova.js
          But, I am still getting the issue....

          Show
          fsmichaelgo Michael Go added a comment - - edited I have Cordova 3.5.0 , and I am still getting this issue in iOS 8 beta 5. I have tested on my simulator and device. I tried the EddyVerbruggen's fix: https://gist.github.com/EddyVerbruggen/cd02c73162180793513e I tried the Cordova's fix commit: https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=commitdiff;h=2ae3caa;hp=d970db70850a22b2001bc222f8ad6fff45a321fd I also tried to change the bridgeMode to jsToNativeModes.IFRAME_NAV in cordova.js But, I am still getting the issue....
          Hide
          rubencodes Ruben Martinez Jr. added a comment - - edited

          Not sure if this is part of the same issue (I believe it may be), but I'm trying to use navigator.geolocation in my project...I tested and it works great in the latest iOS 7, but fails (with a timeout error) on iOS 8 Beta 2 simulator and device.

          Show
          rubencodes Ruben Martinez Jr. added a comment - - edited Not sure if this is part of the same issue (I believe it may be), but I'm trying to use navigator.geolocation in my project...I tested and it works great in the latest iOS 7, but fails (with a timeout error) on iOS 8 Beta 2 simulator and device.

            People

            • Assignee:
              shazron Shazron Abdullah
              Reporter:
              q2Jschilli Jeff Schilling
            • Votes:
              8 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development