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 601
 
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Printer "fails to connect to server" - AirPort Express moogwife Mac Peripherals 4 Feb 22, 2012 09:32 AM
"Problems connecting to server" help Lock OS X 0 Nov 9, 2011 05:43 PM
Why does Mac OS say 3 users are connected to my shares? I'm the only one connected? alexreich Mac OS X Server, Xserve, and Networking 7 Oct 2, 2011 02:16 PM
VMWare and Outlook "cannot connect to server" Medic Windows, Linux & Others on the Mac 1 May 8, 2009 11:37 AM
"Can't connect to server" message, while roaming. sandy mc intosh iPod touch 6 Jun 1, 2008 04:43 PM


All times are GMT -5. The time now is 05:14 PM.

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

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