Hi Community!
Been working on an AR app and all of the sudden, features stopped working I get this message (repeatedly)
ArcGIS Runtime Error Occurred. Set a breakpoint on C++ exceptions to see the original callstack and context for this error: Error Domain=com.esri.arcgis.runtime.error Code=2 "Invalid argument." UserInfo={NSLocalizedFailureReason=location data source is not started yet., NSLocalizedDescription=Invalid argument., Additional Message=location data source is not started yet.}
along with this message
[tcp] tcp_input [C5.1:3] flags=[R.] seq=1349585430, ack=4156404933, win=501 state=CLOSED rcv_nxt=1349585406, snd_una=4156404932
I have looked at the custom CLLocation CLLocationManager and CLLocationManagerDelegate just in case this had something to do with it, but I can't see a connection.
I have checked my plist for location privileges and they're okay.
When a scene is switched, ArcGisARView(arView) stops tracking, a new AGSScene is instantiated, elevation source added, then I set the location data source with ```arView.locationDataSource = AGSCLLocationDataSource()```, then set the translation factor to 1. Then I reset tracking, and then start it.
Thanks so much for all the help!
Solved! Go to Solution.
Hello! I think your analysis is correct when you mention the locationTrackingMode == .initial as the culprit. In this line in ArcGISARView.swift you can see that the location data source is stopped if the tracking mode is anything other than .continuous. If you are depending on the location data source continuously providing location updates, use the ARLocationTrackingMode.continuous mode.
Let us know if that doesn't solve your problem or you have other questions. Best of luck!
Mark
I stepped through the ArcGISARView.startTracking(locationTrackingMode:, completion:). error is == nil throughout the process. The function returns just fine, but for some reason, arView.isTracking remains false. The tracking mode is set to .initial. Would that explain why arView.Tracking is equal to false?
I'm checking out ArcGISARView.finalizeStart() to see if self is nil and there is an early return, thus early escaping and skipping the statements below that should be called.
Hello! I think your analysis is correct when you mention the locationTrackingMode == .initial as the culprit. In this line in ArcGISARView.swift you can see that the location data source is stopped if the tracking mode is anything other than .continuous. If you are depending on the location data source continuously providing location updates, use the ARLocationTrackingMode.continuous mode.
Let us know if that doesn't solve your problem or you have other questions. Best of luck!
Mark