Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid API object reference #37

Closed
esskar opened this issue Aug 3, 2020 · 2 comments
Closed

invalid API object reference #37

esskar opened this issue Aug 3, 2020 · 2 comments

Comments

@esskar
Copy link

esskar commented Aug 3, 2020

When i try to run the sudo spctl --add ~/Library/PreferencePanes/Mouse\ Fix.prefPane command, i get the a invalid API object reference error

@Fingel
Copy link

Fingel commented Aug 3, 2020

Mouse fix suddenly stopped working this morning after a reboot. I tried the installation process again but fail with the same error as OP.

@noah-nuebling
Copy link
Owner

noah-nuebling commented Aug 5, 2020

If you copy pasted the command from the Mac Mouse Fix Help Page the invalid API object reference error message is normal - It doesn't necessarily mean that the command failed.

I totally see why this would be quite confusing and I'll definitely consider adding a note on this to the Help page.

Thank you guys for making me aware of this issue! :)


Detailed expanation

The command from the website actually consists of two separate commands. One that tries to add a Gatekeeper exception for the case that Mac Mouse Fix is only installed for the current user (In the User Library) and also for the case that it is installed for all users (In the Root Library).

In most cases, one of the two commands will fail, because Mac Mouse Fix is only installed either for the current user or for all users, but not both.

Here is the command as found on the website:

sudo spctl --add ~/Library/PreferencePanes/Mouse\ Fix.prefPane; sudo spctl --add /Library/PreferencePanes/Mouse\ Fix.prefPane

This command consists of two separate commands:

  1. sudo spctl --add ~/Library/PreferencePanes/Mouse\ Fix.prefPane;
    This one tries to add a Gatekeeper exception for Mac Mouse Fix if it's installed in the User Library.
    But if Mac Mouse Fix is not found in the User Library (e.g. because it's instead installed in the Root Library) this will produce the error:
    ~/Library/PreferencePanes/Mouse Fix.prefPane: invalid API object reference

  2. sudo spctl --add /Library/PreferencePanes/Mouse\ Fix.prefPane
    This one tries to add a Gatekeeper exception for Mac Mouse Fix if it's installed in the Root Library.
    But if Mac Mouse Fix is not found in Root Library (e.g. because it's instead installed in the User Library) this will produce the error:
    /Library/PreferencePanes/Mouse Fix.prefPane: invalid API object reference

So you'll probably encounter one of these two error messages when using the command found on the website. As long as you're not encountering both, everything should have worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants