Can’t Boot after uninstalling Teamviewer on Mac OS Catalina

In this post i’m going to provide two solutions for a recent issue with MacOS Catalina, where the macOS can’t boot after removing the Teamviewer.

When the Mac gets restarted after the uninstallation, following error box pops up and avoids the boot process from being completed.

Unrecoverable Error.

Security Agent was unable to create requested mechanism TeamViewerAuthPlugin:start.

In my case, this occured when I removed the Teamviewer manually by the CleanMyMac application.

Root Cause (Updated on Dec 10, 2019)

I assume this happenes as the CleanMyMac’s uninstaller removes the TeamViewer along with all related files without the operating system being aware of the changes. To be more specifc, TeamViewer registers an Authorization plugin during the installation. However, if one doesn’t use the builtin uninstaller and removes the applicaton manually or by CleanMyMac, the plugin woul not get de-registered. Therefore, in the next boot, the macOS still expects to load the authorization plugin but it can’t find respective files, TeamViewerAuthPlugin.bundle, in /Library/Security/SecurityAgents/. Consequently, it simply panics. 😉

Solutions (Updated on Dec 10, 2019)

All you need to do is to either have the macOS forget about it (suggested by Jack Bryant, in the comments) or give it what it wants, which is the missing file.

Although these solutions are simple, the implementation seems a bit complex, especially for non power-users. When this happens, you would not have access to any standard interface or application, like Finder, to access the file system. Instead, the only interface by which you can fix this, is the Terminal app which is accessible in the Mac Revocery Mode. As the name implies, this mode provides the user with a very limited set of tools to recover the operating system in case of serious problems. Downside, however, is that the Recovery mode is an advanced environment and is not as friendly.

I recommend to try the first solution in which basically we remove the Authorization Database. If not resolved, try the second solution where you put a copy of the missing file, TeamViewerAuthPlugin.bundle into the corresponding directory.

Disclaimer: I do not make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information on this post is strictly at your own risk, and I will not be liable for any losses and damages in connection with the use of described solutions.

Implementation (Updated on Dec 10, 2019)

Solution 1: Remove the Authorization Database

  1. Enter the Recovery Mode
    1. Restart your Mac and hold Command+R mode until the Apple logo appears. This may take some time, so be patient!!
    2. Once entered, you’ll be instructed to select the language, username, and finally to enter your password. So follow the instructions until you land in the macOS Utilities window.
    3. From the window select Disk Utility.
      undefined
  2. Mount the disks
    1. In the Disk Utility window, from the left pane and under the Internal section, select the “Macintosh HD” disk and in the right pane click on the “Mount” button. (see Note 3 and 4)
      undefined
      NOTE 1-1: If asked for password while mounting, use your login password.
      NOTE 1-2: The disk could be already mounted. So, while the disk is selected in the left pane, if you see Unmount button instead of Mount and the info bar is active (colorful), it means the disk is already mounted.
      NOTE 1-3: The name of the disk may differ from the example but the procedure is the same.
  3. Open the Terminal
    1. Once ensured the disks are mounted, from the menu bar, select Utilities and select Terminal.
    2. Type the following: ls /Volumes/. This command lists all mounted disks.
    3. You should see the name of the main disk(s) e.g. Macintosh HD in the output.

      Macintosh HD/ Macintosh HD - Data/

      NOTE 1-4: the number of items (disks) and their names might vary in your machine.
  4. Delete the file
    1. Enter the following in the Terminal:

      rm "/Volumes/Macintosh HD/var/db/auth.db"

      NOTE 1-5 – Very Important: The above command will remove the “auth.db” file. Therefore, you have to make sure you’re giving the right path in the right format. So:

      a) Notice that the command is case sensitive. Meaning for example, “macintosh” is different from “Macintosh”.
      b) Notice the space between “rm” and the path as well as between “Macintosh” and “HD“.
      b) The given path should be enclosed in “”.

      NOTE 1-6: Any error message such as “No such file or directory” or “Read-only file system“, means the path is not entered correctly. So, before complaining, take a deep breath, read the message carefully and compare it to that of the above. I’m sure you will spot the mistake(s).
  5. Verify
    1. If successful, you would NOT receive any congratulation message. No offense!!
    2. To ensure the file is deleted enter the command below; it should NOT list “auth.db” in return.
      ls "/Volumes/Macintosh HD/var/db/auth.db"

      NOTE 1-7: If it’s still there, it means you made a mistake, especially with the path. So, repeat step 4 and DO NOT rush this timeee!!!
  6. Restart
    1. If you passed the verification, don’t get excited so much yet because now you should restart the Mac with your fingers crossed.
    2. To restart, from the Apple logo on the top left, select Restart and wait for the machine to boot.
    3. If you’ve ever made back to the login prompt again, please:
      1. put your password
      2. close your eyes
      3. hit the Enter
      4. give it ~1 minute and then open your eyes (don’t cheat)
      5. If you’re in, return to my page and share your feeling…😊

Solution 2: Copy the missing file

  1. Get the Missing File
    1. Install the TeamViewer app on another MacOS
    2. Copy the “TeamViewerAuthPlugin.bundle” from /Library/Security/SecurityAgent/ to a USB memory.
      NOTE 2-1: Make sure the USB is formatted in the native MacOS filesystem to avoid incompatibility issues in the next steps.
  2. Enter the Recovery Mode
    1. Restart your Mac and hold Command+R mode until the Apple logo appears. This may take some time, so be patient!!
    2. Once entered, you’ll be instructed to select the language, username, and finally to enter your password. So follow the instructions until you land in the macOS Utilities window.
    3. From the window select Disk Utility.
      undefined
  3. Mount the disks
    1. Connect your USB stick to the machine
    2. In the Disk Utility window, from the left pane and under the Internal section, select the “Macintosh HD” disk and in the right pane click on the “Mount” button. (see Note 3 and 4)
      undefined
    3. Also, under the External section select your USB, e.g. MyUSB, and make sure it’s mounted as well.

      NOTE 2-2: If asked for password while mounting, use your login password.
      NOTE 2-3: The disk could be already mounted. So, while the disk is selected in the left pane, if you see Unmount button instead of Mount and the info bar is active (colorful), it means the disk is already mounted.
      NOTE 2-4: The name of the disk may differ from the example but the procedure is the same.
  4. Open the Terminal
    1. Once ensured the disks are mounted, from the menu bar, select Utilities and select Terminal.
    2. Type the following: ls /Volumes/. This command lists all mounted disks.
    3. You should see the name of your USB, e.g. MyUSB, along with the main disk name i.e. Macintosh HD in the output.

      MyUSB/ Macintosh HD/ Macintosh HD - Data/

      NOTE 2-5: the number of items and their names might be different from the example but it should be the same as what you see in the Disk Utility.
  5. Copy the file
    1. Enter the following in the Terminal: (see Note 10)

      cp -r "/Volumes/MyUSB/TeamViewerAuthPlugin.bundle" "/Volumes/Macintosh HD/Library/Security/SecurityAgentPlugins/"

      NOTE 2-6 – Very Important: The above command copies the missing file from the USB to the Macintosh HD disk. Therefore, you have to make sure you’re giving the right path in the right format. So:
      a) Notice that the command is case sensitive. That is for example, “myusb” is different from “MyUSB”.
      b) Spaces are important. For example, there is space between “cp” and “-r” or between “Machintosh” and “HD” or between the first path and the second.
      c) Both paths SHOULD be enclosed in “” separately.

      NOTE 2-7: Any error message such as “No such file or directory” or “Read-only file system“, means either the source or the destination path or both are not entered correctly. So, before complaining, take a deep breath, read the message carefully and compare it to the command. I’m sure you will find the mistake(s).
  6. Verify
    1. To ensure the file is copied appropriately, enter the command below; it should list the TeamViewerAuthPlugin.bundle in the output. (see Note 10)

      ls "/Volumes/Macintosh HD/Library/Security/SecurityAgentPlugins/"

      NOTE 2-8: If not there, it means you made a mistake, especially with the path. So, repeat the procedure from step 4 and DO NOT rush this timeee.
  7. Restart
    1. Once verified, don’t get excited so much yet because now you should restart the Mac with your fingers crossed.
    2. To restart, from the Apple logo on the top left corner, select Restart and wait for the machine to do its job.
    3. If you’ve ever made back to the login prompt again, please:
      1. put your password
      2. close your eyes
      3. hit the Enter
      4. give it ~1 minute and then open your eyes (don’t cheat)
      5. If you’re in, return to my page and share your feeling…😊

NOTE 9: Please take your time and follow the instructions carefully to avoid any mistake.
NOTE 10: All the commands should be entered in one consecutive line. Also, all the spaces and special characters “/” and “\” should be taken into consideration.

Lastly, If you liked this post, please don’t forget to follow my page here on WordPress and Twitter @HexOut1.

Cheers,

Rez

371 thoughts on “Can’t Boot after uninstalling Teamviewer on Mac OS Catalina

  1. Hi !
    First thanks for what you do to help 🙂 I’m in the same trouble. I’ve tried a hundred times your lines, checked really carefully every letters and spaces but I still get that “no such file or directory”. I’ve read all the comments, tried the tricks like “RM” instead of “rm” or the “\” in “Macintosh\ HD” but I still get that f….ing message.
    I bought this MBP two weeks ago and it has a M1 and not an Intel chip. May it make a reason (for example the procedure to reach the recovery mode is different from the previous versions) ?
    I don’t know how to share a picture to show you but if you could help it would be awesome.
    Many thanks.
    Julien

    Like

  2. Jesus christ Thank you!!!!! You save my life i am little blonde girl and When i saw “error…” and black window on my iMac i was disgusted…
    Thx a loooooot love you

    Liked by 1 person

  3. Thank you soooooo much! I contacted apple and they had no clue. Told me to call Microsoft.
    One question. Once the first of your solution worked, do I need to do it every time I switch off my Mac? Do I need to install the Team viewer program again and uninstall it correctly? Or is it sorted forever?
    Appreciate your response xxx

    Like

  4. Hi, I have followed all the steps perfectly, and even get the desired outcome in terminal. However, now when my computer starts up, the language window pops up – so I select English and the computer shuts down again. This is a repetitive pattern. However, my issue began when I used CleanMyMac. Can someone please help?

    Like

  5. Thank you so much!
    I am a user from Taiwan. I searched for solutions and I found your previous comments on TeamViwer’s community. So I visited this website. You magically provide the very simple solutions. When I login successfully, I was very touched. I am really appreciate it. Thank you for doing all of this.

    Like

  6. I am a user from Taiwan. I searched for solutions and I found your previous comments on TeamViwer’s community. So I visited this website. You magically provide the very simple solutions. When I login successfully, I was very touched. I am really appreciate it. Thank you for doing all of this.

    Like

  7. Hello Rez! You saved my life with your little notes! I was trying out the same rm command which I had read and gotten from another page but I keep getting the “No such file or directory” prompt in return. But your little note about having the space after rm saved my computer and me! Thank you so much for the meticulous instructions! I bet you have saved many others too! Keep up the good work! 🙂

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: