Customer getting "Problem Connecting to Server"

Discussion in 'Mac Programming' started by ArtOfWarfare, Feb 7, 2012.

  1. ArtOfWarfare macrumors G3


    Nov 26, 2007
    I got an email from a customer complaining that they're unable to use my app because any time they click on the status item icon, an error pops up telling them "There was a problem connecting to the server 'rms'." The customer says that the error pops up once an hour and when they click on the icon, which is exactly when the code I've posted below runs:

    - (void)updateMenu
        if (updateTimer && [updateTimer isValid])
            [updateTimer invalidate];
        [statusMenu removeAllItems];
        updateTimer = [NSTimer scheduledTimerWithTimeInterval:3600 target:self selector:@selector(updateMenu) userInfo:nil repeats:NO];
        //Get the list of devices attached.
        mach_port_t     masterPort;
        kern_return_t   kr;
        io_iterator_t   ite;
        io_object_t     obj = 0;
        CFMutableDictionaryRef  properties;
        kr = IOMasterPort(bootstrap_port, &masterPort);
        if (kr != KERN_SUCCESS)
            printf("IOMasterPort() failed: %x\n", kr);
        kr = IORegistryCreateIterator(masterPort,
                                      true,              /*recursive */
        while ((obj = IOIteratorNext(ite)))
            kr = IORegistryEntryCreateCFProperties(obj,
            if ((kr != KERN_SUCCESS) || !properties)
                printf("IORegistryEntryCreateCFProperties error %x\n", kr);
                CFNumberRef percent = (CFNumberRef) CFDictionaryGetValue(properties, CFSTR("BatteryPercent"));
                if (percent)
                    //A lot of code that I don't think is relevant omitted.
                    //The device being checked didn't have "BatteryPercent" as a property.
        //A lot more code that I don't think is relevant omitted... it just creates and adds NSMenuItems.
    I suspected "kIOServicePlane" might have been the issue, so I replaced it with "kIOPowerPlane", made a special build just for the user, told them to delete the version they have and install the special build in its place, but they say the error continues to occur.

    Any suggestions as to what is causing the problem? Is there some way I can update my app to still access battery information without causing this error window to show up? If not, suggestions as to how to handle the customer? Should I tell them that I'm sorry, there's no way for me to fix the issue, and they should seek a refund through Apple?
  2. kainjow Moderator emeritus


    Jun 15, 2000
    It sounds like a local problem on their computer. I googled "There was a problem connecting to the server" and it's a general OS X error about connecting to a server, most likely because some app is still holding a reference to a server.

    What is "rms"? You could ask them if they know what it is. suggests it's related to their anti-virus.

Share This Page