Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 7, 2012, 06:35 AM   #1
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Customer getting "Problem Connecting to Server"

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:

Code:
- (void)updateMenu
{
    NSLog(@"Updating.");
    
    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,
                                  kIOServicePlane,
                                  true,              /*recursive */
                                  &ite);
    
    while ((obj = IOIteratorNext(ite)))
    {
        kr = IORegistryEntryCreateCFProperties(obj,
                                               &properties,
                                               kCFAllocatorDefault,
                                               kNilOptions);
        
        if ((kr != KERN_SUCCESS) || !properties)
        {
            printf("IORegistryEntryCreateCFProperties error %x\n", kr);
        }
        
        else
        {
            CFNumberRef percent = (CFNumberRef) CFDictionaryGetValue(properties, CFSTR("BatteryPercent"));
            if (percent)
            {
                //A lot of code that I don't think is relevant omitted.
            }
            
            else
            {
                //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?
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed.
Including the ones paired with other Macs on your network.
ArtOfWarfare is offline   0 Reply With Quote
Old Feb 7, 2012, 11:08 AM   #2
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 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.

https://discussions.apple.com/thread/3712265 suggests it's related to their anti-virus.
kainjow is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
"There was a problem connecting to the server..." TheLOGICalone Mac OS X Server, Xserve, and Networking 3 Jul 20, 2014 10:07 PM
"There was a problem connecting to server" Error PaulRulesTheWld Windows, Linux & Others on the Mac 1 Oct 24, 2013 08:03 AM
Help! Problem connecting iMac 27" to 32 inch TV FUNAI Wilchur Mac Peripherals 2 Aug 10, 2012 08:15 AM
There was a problem connection to the server "fs.domain.com" carleton Mac OS X 10.7 Lion 0 Jul 7, 2012 05:33 PM

Forum Jump

All times are GMT -5. The time now is 11:35 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC