Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

GPS Location Error The operation couldn't be completed. (kCLErrorDomain error0.)
Started by gjaman Apr 03 2014 09:26 AM

8 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

gjaman

[GLOBAL: userInfoPane.html]
gjaman
  • Enthusiast

  • 35 posts
  • Corona SDK

I've been getting reports of this error from iOS testers:

     

 

GPS Location Error  The operation couldn't be completed. (kCLErrorDomain error0.)
 

 

 

Has anyone else seen it and know how to prevent it?

 



[TOPIC: post.html]
#2

zv713

[GLOBAL: userInfoPane.html]
zv713
  • Enthusiast

  • 40 posts
  • Corona SDK

Been getting this every now and then on launch on the device builds.

[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,541 posts
  • Enterprise

A quick Google of the error shows that it's likely due to the device not seeing the GPS satellites or not being on WiFi to get location from there.

 

Rob



[TOPIC: post.html]
#4

zv713

[GLOBAL: userInfoPane.html]
zv713
  • Enthusiast

  • 40 posts
  • Corona SDK

Weird thing is I still get the correct location and everything continuous to run just fine.

[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,541 posts
  • Enterprise

It could just be a temporary drop of signal from them.  The GPS needs to talk to three sat's to work (or more if they are available). 

 

Rob



[TOPIC: post.html]
#6

Fixdit

[GLOBAL: userInfoPane.html]
Fixdit
  • Enthusiast

  • 86 posts
  • Corona SDK

Has anyone got experience of catching this error to handle it in a way that 'fails gracefully'?



[TOPIC: post.html]
#7

VincentV

[GLOBAL: userInfoPane.html]
VincentV
  • Enthusiast

  • 58 posts
  • Enterprise

I have been getting this error too, even in a place where my connection speed is high. To the staffs and experienced developers here, Is there any solution to this?



[TOPIC: post.html]
#8

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi @VincentV, @Fixdit,

You may want to experiment with a method that checks the GPS on a repeating timer and, after a certain number of "failed" attempts, you can handle a graceful exit. Please see the example on the map API "getUserLocation()" page, which can probably be modified to use the "location" event listener instead:

 

https://docs.coronalabs.com/api/type/Map/getUserLocation.html

 

Take care,

Brent



[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,541 posts
  • Enterprise

The GPS has nothing to do with your internet speed.  The GPS requires access to at least three satellites to triangulate your position. It sounds like from the other posters that the error happens but is harmless.  You can test the values coming back from the GPS events and if they are not right like (0, 0, and no time value, etc.) then you know you didn't get a GPS signal that event and then you can handle it.

 

Are you using native.newMapView() or are you using the GPS event handler?

 

Rob




[topic_controls]
[/topic_controls]