Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange #NullIsland warning from CoreMotion.framework

Since recently, I get in the Xcode logs a lot of strange warnings from the CoreMotion framework, related to function getLocationForBundleID:

[Client] {"msg":"#NullIsland Either the latitude or longitude was exactly 0! That's highly unlikely", "latIsZero":0, "lonIsZero":0}  
[Client] {"msg":"#NullIsland Received a latitude or longitude from getLocationForBundleID that was exactly zero", "latIsZero":0, "lonIsZero":0, "location":'28 5B E0 D7 EB 7F 00 00'}  

I do not see any malfunction of my app. So maybe these logs can be ignored, but they are annoying anyway.

My questions are:

How can I correct a potential error?
How can I stop these warnings?

like image 215
Reinhard Männer Avatar asked Nov 22 '20 09:11

Reinhard Männer


People also ask

What is the mean of strange?

strange, singular, unique, peculiar, eccentric, erratic, odd, quaint, outlandish mean departing from what is ordinary, usual, or to be expected. strange stresses unfamiliarity and may apply to the foreign, the unnatural, the unaccountable.

What is the another word for strange?

Some common synonyms of strange are eccentric, erratic, odd, outlandish, peculiar, quaint, singular, and unique. While all these words mean "departing from what is ordinary, usual, or to be expected," strange stresses unfamiliarity and may apply to the foreign, the unnatural, the unaccountable.

What is strange person?

A strange person or place is one that you are not familiar with: I was lost and alone in a strange city. strangely. adverb. She's been acting really strangely (= in an unusual way) lately.

Does Strange mean weird?

Strange implies that the thing or its cause is unknown or unexplained; it is unfamiliar and unusual: a strange expression. That which is peculiar mystifies, or exhibits qualities not shared by others: peculiar behavior.


1 Answers

I was getting this same error when trying to get a user's location in an app. There were two things preventing me from getting a valid lat/long. The main issue I was having was that I was using a simulator and had to set the location manually. If you're using the simulator, go to XCode, click Debug --> Simulate Location, and choose a location. I also had to make sure the correct location permission keys were added to Info.plist. You're also probably already aware, but you'll know if any keys are missing from Info.plist because a separate error message will print out to the console above or below these lat/long error messages, and it will tell you which key is missing. So basically:

  1. Make sure you have all necessary location permissions accepted on the device/simulator being used to test the application.
  2. Once you have location permissions, set a location if using a simulator.

Not sure if this will help at all, but I hope it does. If you've already confirmed that these are not issues, I'm not sure what may be causing the issue in your case, but stepping through the parts of your code responsible for fetching the user location would probably be beneficial to see which link in the process is failing.

like image 64
James D Avatar answered Sep 20 '22 06:09

James D