Explorer “Error Getting … “

I’m completely new to Script Debugger and I’m trying to use Explorer to understand the dictionary for Contacts on macOS 12.3.1 Monterey.

Drilling down from Person → phones → phone → id, label, and value

All three display an error message:

  • Error getting id: -10002
  • Error getting label: -10002
  • Error getting value: -10002

What do these error mean? (Yes, there is data in this phone number.)

Please let me know where to post this instead if I’ve put it in the wrong Topic. Sorry in advance.

Thank you.

The -10002 error is errAEBadKeyForm. This error indicates that the key form you are using (by name, by index or by id) is not supported by the application in that context. Try switching to another key form on the container element collection:

When I change to by index, I begin to get usable results from the Contacts application:

Generally, the by index key form is always supported. Unfortunately, by index is the least desirable key form as it is not stable across create/delete/move/clone operations (i.e. operations that alter the contents of the containing element collection).

Script Debugger is at the mercy of the application’s meta-data and offers options that may not actually work when the meta-data is inaccurate. That said, reporting the -10002 error code without an explanation isn’t helpful so we’ll improve that in a future maintenance release.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.