React-native-background-geolocation: Error when running getCurrentLocation in Xcode 10 build

Created on 19 Sep 2018  路  9Comments  路  Source: mauron85/react-native-background-geolocation


Your Environment


  • Plugin version: 0.5.0-alpha.41
  • Platform: iOS
  • OS version: iOS 12
  • Device manufacturer and model: Any iPhone running iOS 12
  • React Native version: 0.57.0
  • Plugin configuration options:
{
  stationaryRadius: 5,
  distanceFilter: 5,
  locationProvider: BackgroundGeolocation.DISTANCE_PROVIDER,
  desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY,
  stopOnTerminate: false,
  startForeground: true,
  debug: __DEV__,
}

Context

Running getCurrentLocation

Expected Behavior

Gets current location

Actual Behavior

Error message from ReactNative: The operation couldn鈥檛 be completed. (com.marianhello error 2.)

Location block from Xcode:

2018-09-19 12:11:36.246579-0400 workpath[30536:2419263] RCTBackgroundGeolocation #getCurrentLocation
2018-09-19 12:11:36.285836-0400 workpath[30536:2418400] INTULocationManager: Location services updates have started.
2018-09-19 12:11:36.286013-0400 workpath[30536:2418400] INTULocationManager: Location Request added with ID: 1
2018-09-19 12:11:36.326312-0400 workpath[30536:2418400] INTULocationManager: Location services error: The operation couldn鈥檛 be completed. (kCLErrorDomain error 0.)

Steps to Reproduce

Using an iPhone running iOS 12 try to access location

Most helpful comment

I don't think so. Even Maps app fails, so I guess it may be an Xcode/Simulator problem.

All 9 comments

Are you running your app on simulator or physical device?
I sometimes got

{message: "The operation couldn鈥檛 be completed. (com.marianhello error 1003.)", code: 1003}

when change the simulated location on Xcode 10 - iOS 12 simulator (not tested on physical device yet), and also Maps app cannot get device location. So idk if it can be a simulator error...
Note: I can see the location only when simulating a static location (Debug -> Location -> Apple), but even Maps fails when turning on (Debug -> Location -> City Bicycle Ride/City Run/Freeway Drive).

@JoseVf yes I just tested that today and it seems that it only happens when you're on a simulator using one of the dynamic location options. Because of that this Im going to close this issue. Do you think this is an RN issue?

I don't think so. Even Maps app fails, so I guess it may be an Xcode/Simulator problem.

It happened to me. Is it only happens on simulator or anyone experienced on physical device?

currently experiencing this on iPhone 7 Plus

Happens on ipad with IOS 10.3.3

It happened to me. Is it only happens on simulator or anyone experienced on physical device?

Yes, I've got the same error to Bugsnag from test flight app.
iPhone 6, iOS 12.4.2

Hi everyone, any update on this, i just got the error on bugsnag as well on same iphone and os versions as @gogolubev

Just had this error on Simulator (iOS 14.12) while I was using a custom location.
Was solved by changing the location mode (Features-> Location) to none, and then back to the custom location.

Was this page helpful?
0 / 5 - 0 ratings