Endlessly repeating "There was a problem connecting..." error [duplicate]

Solution 1:

This error typically comes up when OSX is trying to access a file or folder on a remote server, but it cannot connect to that server.

I have two examples to give an idea of where this can come from:

  1. You are able to have MacOS (or OSX as it was known at the time) connect to a remote folder automatically at login. Typically these are shown in the "Login Items" tab of the "Users & Groups" pref pane

    Example of an automatically-connected Folder on an AFP server

  2. When an application attempts to open a file that's on a remote server, OSX automatically tries to connect to that server in order to access the file.

    For example: If the music in your iTunes library is on a mounted network drive, and you have not connected the drive yet, playing a track will delay while it connects the drive before iTunes will play the track.

In both cases, if the server where these files are located cannot be found, that error will come up.

Since the computers are no longer connected (in this case over Bluetooth), the server cannot be found.

Solution 2:

In case the message appeares even on the user login screen before even being logged in try to remove the AppleFileServer preference file and the OpenDirectory folder. Run the following commands in terminal to delete the files

    sudo rm /Library/Preferences/com.apple.AppleFileServer.plist
    sudo rm -r /Library/Preferences/OpenDirectory