7

TLDR; How to identify and troubleshoot security prompts that repeat on macOS Monterey 12.3.1 on an Intel MBP?

Fantastical.app (from the Mac App Store) and TV.app (the apple app) will ask multiple times a day for permission to use location data (as in, the dialog box that pops up asking "X would like to use your current location"). I grant them access each time, and also see that they are listed as enabled/authorized for location data in the System Preferences -> Security & Privacy -> Location Services area.

I've tried uninstalling/reinstalling Fantastical.app, but the issue continues. I've also tried unchecking/re-checking the permission of the apps (Fantastical.app, Fantastical Helper.app, TV.app) but the prompts for authorization keep coming back.

I had the Console.app open today and after the issue popped up I went looking through the logs for locationd log lines. A few that seemed "interesting" or relevant (more log lines below).

locationd denied access to file-read-data

error   15:24:14.047524-0400    kernel  Sandbox: locationd(91559) deny(1) file-read-data /Applications/Fantastical.app

From what I gather, which may be incorrect, but locationd is trying to read data about the app bundle, but fails. I looked at the owner of the /Applications/Fantastical.app/ bundle, and they were root:wheel, which seems like the default for any app downloaded from the Mac App Store.

locationd recognizing that Fantastical.app wants location data

default 15:24:14.052587-0400    locationd   client 'com.flexibits.fantastical2.mac' not authorized for location; not starting yet

This seems like Fantastical is asking for location data, and locationd is remarking that the app does not have permissions to do so yet.

locationd noting that Fantastical.app now has authorization

default 15:24:17.975759-0400    locationd   client 'com.flexibits.fantastical2.mac' authorized for location; starting shortly

default 15:24:17.976041-0400    locationd   client 'com.flexibits.fantastical2.mac' authorized for location; starting now, desiredAccuracy, 3000.0, distanceFilter, 1000.0, operatingMode 0, dynamicAccuracyReductionEnabled 0, allowsAlteredAccessoryLocations 0, activityType 0

Here it seems to me that locationd is now recognizing that I've now authorized Fantastical.app to use my location data (after clicking "allow" in the modal window).

Which seems good until a few moments later.

locationd cannot read (?) /Applications/Fantastical.app

error   15:24:14.459094-0400    kernel  5 duplicate reports for Sandbox: locationd(91559) deny(1) file-read-data /Applications/Fantastical.app

The above log line was followed by locationd logging that the Fantastical.app does not have location permissions after all--one second after I authorized it.

default 15:24:16.052691-0400    locationd   {"msg":"client not currently authorized for location; sending error", "client":"com.flexibits.fantastical2.mac"}

I woke up my laptop the next day, and was greeted by this. I had clicked "ok" five or more times before I began recording. This has happened before after I wake the computer from a long sleep.

cookie clicker

More logs

Here are the select log lines that seemed related, all together in one codeblock.

error   15:24:14.047524-0400    kernel  Sandbox: locationd(91559) deny(1) file-read-data /Applications/Fantastical.app


default 15:24:14.049401-0400    locationd   {"msg":"#AutomaticPrompting at subscription", "Client":"com.flexibits.fantastical2.mac", "state":1}
default 15:24:14.049443-0400    locationd   {"msg":"Showing #AuthPrompt", "requestType":5, "client":"com.flexibits.fantastical2.mac"}
default 15:24:14.049463-0400    locationd   {"msg":"#AuthPrompt AuthorizationRequest completion", "ClientKey":"com.flexibits.fantastical2.mac", "RequestType":"CLClientManager_Type::AuthorizationRequestTypeLegacyAlways"}
default 15:24:14.049496-0400    locationd   {"msg":"#AuthPrompt posted", "client":"com.flexibits.fantastical2.mac", "type":"CLClientManager_Type::AuthorizationRequestTypeLegacyAlways"}
default 15:24:14.049782-0400    Fantastical {"msg":"CLClientRequireAgentHandler", "event":"activity", "client":"0x7fb4bc372780"}


default 15:24:14.052587-0400    locationd   client 'com.flexibits.fantastical2.mac' not authorized for location; not starting yet


default 15:24:14.457762-0400    Fantastical {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x600002aabbc0", "property":"limitsPrecision", "old":0, "new":0}
default 15:24:14.457814-0400    Fantastical {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x600002aabbc0", "property":"previousAuthorizationStatus", "old":"NotDetermined", "new":"NotDetermined"}
default 15:24:14.457840-0400    Fantastical {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x600002aabbc0", "property":"previousAuthorizationStatusValid", "old":0, "new":1}
default 15:24:14.457859-0400    Fantastical {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x600002aabbc0", "property":"isAuthorizedForWidgetUpdates", "old":0, "new":0}


error   15:24:14.459094-0400    kernel  5 duplicate reports for Sandbox: locationd(91559) deny(1) file-read-data /Applications/Fantastical.app


default 15:24:17.975759-0400    locationd   client 'com.flexibits.fantastical2.mac' authorized for location; starting shortly
default 15:24:17.976041-0400    locationd   client 'com.flexibits.fantastical2.mac' authorized for location; starting now, desiredAccuracy, 3000.0, distanceFilter, 1000.0, operatingMode 0, dynamicAccuracyReductionEnabled 0, allowsAlteredAccessoryLocations 0, activityType 0
default 15:24:17.976435-0400    locationd   @ClxClient, register, com.flexibits.fantastical2.mac, accuracy, 3000.0
default 15:24:17.981296-0400    locationd   @ClxClient, accuracy, 0, 0, 4, level, Coarse, reg?, 1



default 15:24:16.052691-0400    locationd   {"msg":"client not currently authorized for location; sending error", "client":"com.flexibits.fantastical2.mac"}


default 15:24:17.964607-0400    locationd   Setting executable: <>, bundle: <com.flexibits.fantastical2.mac>, bundle path: <> authorization to Enabled
error   15:24:17.968260-0400    kernel  Sandbox: locationd(91559) deny(1) file-read-data /Applications/Fantastical.app

Any thoughts?

Is there some way to "reset" locationd to factory settings or equivalent? It seems like it's in a bad state and its configuration is corrupted in some way.

I do not know if it has similar log lines when the TV.app continually asks for location permissions, but my hunch is that they are the same.

Has anyone else had and solved this before?

3
  • HI @Carl - what happens when you enable it via System Preferences -> Privacy -> Location?
    – Mr R
    Apr 30, 2022 at 23:47
  • Nothing. When it's enabled, or disabled, I will get alerts eventually that say Fantastical needs "location permissions", and I click "allow" every time. It just recently asked for permissions again after I had unchecked both "Fantastical.app" and "Fantastical Helper.app". Even after I "allowed" them via the popup, I went back to the System Preferences -> Security & Privacy -> Location Services area, and both were still un-checked.
    – Carl
    May 1, 2022 at 1:06
  • Excellent and well researched. Forgive any typos to make it clear at the top and bottom the setup and question. Super happy you didn’t need to reset all the database to fix this.
    – bmike
    May 1, 2022 at 14:09

1 Answer 1

3

I had a phone call with Apple Support today, and these steps seem to fix my issue (so far).

  • Restart Mac into safe mode (restart, and hold SHIFT during boot before Apple Logo appears)
  • While in safe mode:
    • Go to System Preferences -> Security & Privacy -> Location Services
    • Uncheck "Enable Location Services", and click "OK" in the "are you sure?" dialog that appears, warning you that "Find My Mac" will not be able to find your mac while this is disabled.
    • Wait a few minutes
    • Check "Enable Location Services"
    • Make sure all the apps you want to access location services are now checked by manually enabling them. (I turned on Fantastical.app, Fantastical Helper.app and TV.app)
  • Restart your computer
  • After logging back in, I opened up Fantastical.app and TV.app
  • I then opened up the Console.app to watch the logs, and filtered the results by searching for "locationd"

After a minute or so, there were some encouraging log lines appearing:

default 09:43:23.987421-0400    locationd   {"msg":"#registration UUID mapping", "UUID":"510DDF46-090D-43BE-985B-063D4CFA5EAA", "clientName":"com.flexibits.fantastical2.mac", "verified?":1, "pid":2522}

default 09:43:23.992233-0400    locationd   client 'com.flexibits.fantastical2.mac' authorized for location; starting shortly

default 09:43:23.992255-0400    locationd   client 'com.flexibits.fantastical2.mac' authorized for location; starting now, desiredAccuracy, 3000.0, distanceFilter, 1000.0, operatingMode 0, dynamicAccuracyReductionEnabled 0, allowsAlteredAccessoryLocations 0, activityType 0

default 09:43:23.992295-0400    locationd   @ClxClient, register, com.flexibits.fantastical2.mac, accuracy, 3000.0

default 09:43:23.993452-0400    locationd   {"msg":"Sending location to client", "client":"com.flexibits.fantastical2.mac", "location":<private>}

It's only been 20-30min since I came out of safe mode, but so far, I've not seen any issues.

I hope this can be helpful for someone else who may come across this problem with Location Services/locationd and other apps.

2
  • The original issue came back after a few days, so this is not a permanent solution. Going through the procedure again (safe mode, disable/enable location service, restart) seems to get things "fixed" for another few days before it occurs again.
    – Carl
    Jun 14, 2022 at 12:14
  • I have had this issue for months as well. I will try your procedure to hopefully gain a few days of reprieve. Thanks for the detailed analysis. I wonder what Apple Support would recommend as the next escalation step, given that this eventually came back.
    – idStar
    Jul 19, 2022 at 21:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .