Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ABDacome

macrumors newbie
Original poster
Apr 17, 2013
12
0
Hello all,

So I have been having trouble with iMessage, and I already tried everything I could find, until ONE solution worked...
Every time I would try to log in to iMessage, it will APPEAR to work, but the " Enable" part never verfies...
Screen Shot 2013-04-17 at 8.29.28 PM.png

A moment later, it returns with this error message:
Screen Shot 2013-04-17 at 8.29.18 PM.png

After hours of trying to resolve this problem, I found ONE solution that works, and what I have to do is kill a process called "imagent" in Activity Monitor:
Screen Shot 2013-04-17 at 8.32.28 PM.png

After I quit that process, I log in to iMessage ( very quickly ) and it works, enabling the account...

... Until the process "imagent" starts up again, causing iMessage to return with the same error message as earlier, logging me out.

Does anyone know how to permanently make a process stop running ? It would help me so much.

Thank you!
 

justperry

macrumors G5
Aug 10, 2007
12,627
9,933
I'm a rolling stone.
Hello all,

So I have been having trouble with iMessage, and I already tried everything I could find, until ONE solution worked...
Every time I would try to log in to iMessage, it will APPEAR to work, but the " Enable" part never verfies...
View attachment 408355

A moment later, it returns with this error message:
View attachment 408356

After hours of trying to resolve this problem, I found ONE solution that works, and what I have to do is kill a process called "imagent" in Activity Monitor:
View attachment 408357

After I quit that process, I log in to iMessage ( very quickly ) and it works, enabling the account...

... Until the process "imagent" starts up again, causing iMessage to return with the same error message as earlier, logging me out.

Does anyone know how to permanently make a process stop running ? It would help me so much.

Thank you!

I tell you only because you want it to stop, it probably won't hurt the System but as always keep a backup.

The file to move is /System/Library/LaunchAgents/com.apple.imagent.plist
If you do it this way you have to restart, however you also could unload the process with terminal like this:

sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.imagent.plist
 

ABDacome

macrumors newbie
Original poster
Apr 17, 2013
12
0
justperry, so do I delete that file, or can I simply just move it to the desktop ? I feel like if I delete it, it will just re-create in the folder.
 

GGJstudios

macrumors Westmere
May 16, 2008
44,556
950
justperry, so do I delete that file, or can I simply just move it to the desktop ? I feel like if I delete it, it will just re-create in the folder.
Yes, you can move it to the desktop or delete it. It will not automatically re-create it in the LaunchAgents folder on restart.
 

ABDacome

macrumors newbie
Original poster
Apr 17, 2013
12
0
Yes, you can move it to the desktop or delete it. It will not automatically re-create it in the LaunchAgents folder on restart.

I navigated to the specified folder, and there was no such file there ):
Screen Shot 2013-04-17 at 8.48.10 PM.png

So I tried pasting --

sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.imagent.plist

into the terminal, the first time around, it asked for my password, so I entered it in, and it tells me there is an error removing the file... is that because it is not there ?
Screen Shot 2013-04-17 at 8.48.37 PM.png

However, When I open up Activity Monitor, there is imagent, just mocking me ):
 

GGJstudios

macrumors Westmere
May 16, 2008
44,556
950
I navigated to the specified folder, and there was no such file there ):
View attachment 408358

So I tried pasting --

sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.imagent.plist

into the terminal, the first time around, it asked for my password, so I entered it in, and it tells me there is an error removing the file... is that because it is not there ?
View attachment 408359

However, When I open up Activity Monitor, there is imagent, just mocking me ):

Your Library folders are hidden by default in Lion and ML. To get to your /Library or /Users/yourusername/Library (also known as the ~/Library) folders in Lion and ML:
  • Launch Finder and click Go > Go to Folder and type: /Library or ~/Library
  • Hold the Option key while clicking the Go menu item, which reveals your ~/Library folder in the menu.


Check the following locations for imagent or any other apps/processes that automatically launch on startup and delete any you don't need/want:
  • System Preferences > Accounts > yourusername > Login Items
    (Lion and ML users: System Preferences > Users & Groups > yourusername > Login Items)

  • /Library/LaunchAgents/
    (Lion and ML users: In Finder, click Go > Go to Folder > then enter the path above)

  • ~/Library/LaunchAgents/
    (Lion and ML users: In Finder, click Go > Go to Folder > then enter the path above)

  • /Library/StartupItems/
    (Lion and ML users: In Finder, click Go > Go to Folder > then enter the path above)
 

justperry

macrumors G5
Aug 10, 2007
12,627
9,933
I'm a rolling stone.
justperry, so do I delete that file, or can I simply just move it to the desktop ? I feel like if I delete it, it will just re-create in the folder.

Do not ever delete System Files, you can move that file to /System/Library and leave it there.
I prefer to move the file instead of unloading it, reason is you can still see the file so you remember you moved it while if you unload it there is no visible way to see if it is disabled.

If you want to move the file you need root access, the easiest way is with Terminal, here it is.

sudo mv /System/Library/LaunchAgents/com.apple.imagent.plist /System/Library
Hit Enter
Enter Password

Do NOT move that Folder, if you do sos your System will almost sure not startup, only move the above file, restart after.

Again, always have a bootable backup if you do anything like this, if you mess up it is easily undone by booting from another disk.
 

ABDacome

macrumors newbie
Original poster
Apr 17, 2013
12
0
Your Library folders are hidden by default in Lion and ML. To get to your /Library or /Users/yourusername/Library (also known as the ~/Library) folders in Lion and ML:
  • Launch Finder and click Go > Go to Folder and type: /Library or ~/Library
  • Hold the Option key while clicking the Go menu item, which reveals your ~/Library folder in the menu.
    [/INDENT]

    Check the following locations for apps/processes that automatically launch on startup and delete any you don't need/want:
    • System Preferences > Accounts > yourusername > Login Items
      (Lion and ML users: System Preferences > Users & Groups > yourusername > Login Items)

    • /Library/LaunchAgents/
      (Lion and ML users: In Finder, click Go > Go to Folder > then enter the path above)

    • ~/Library/LaunchAgents/
      (Lion and ML users: In Finder, click Go > Go to Folder > then enter the path above)

    • /Library/StartupItems/
      (Lion and ML users: In Finder, click Go > Go to Folder > then enter the path above)


  • That's what I tried the first time around, opening Finder, Holding down option, and clicking Library, navigating to the Launch Folder, and only two files are there...
    View attachment 408360

    should I give my system a reboot, try your suggestion once more, and see if the file appears ? I don't know why it would do that, but I guess it's worth a try. Unless there is another option I could try, that would be very helpful
 

ABDacome

macrumors newbie
Original poster
Apr 17, 2013
12
0
Do not ever delete System Files, you can move that file to /System/Library and leave it there.
I prefer to move the file instead of unloading it, reason is you can still see the file so you remember you moved it while if you unload it there is no visible way to see if it is disabled.

If you want to move the file you need root access, the easiest way is with Terminal, here it is.

sudo mv /System/Library/LaunchAgents/com.apple.imagent.plist /System/Library
Hit Enter
Enter Password

Do NOT move that Folder, if you do sos your System will almost sure not startup, only move the above file, restart after.

Again, always have a bootable backup if you do anything like this, if you mess up it is easily undone by booting from another disk.


I entered the command for root access into terminal, navigated back to the folder, and still only two files appear. I never moved the file or deleted it beforehand, it's just not there for some reason

----------

Okay, will give it a reboot and get back to you guys on that.
 

justperry

macrumors G5
Aug 10, 2007
12,627
9,933
I'm a rolling stone.
That's what I tried the first time around, opening Finder, Holding down option, and clicking Library, navigating to the Launch Folder, and only two files are there...
View attachment 408360

should I give my system a reboot, try your suggestion once more, and see if the file appears ? I don't know why it would do that, but I guess it's worth a try. Unless there is another option I could try, that would be very helpful

The LaunchAgent you are looking for is in the Folder I mentioned above, it is not in GGJStudios Folders.

It is here: /System/Library/LaunchAgents/com.apple.imagent.plist

Try again with:

sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.imagent.plist
 

ABDacome

macrumors newbie
Original poster
Apr 17, 2013
12
0
The LaunchAgent you are looking for is in the Folder I mentioned above, it is not in GGJStudios Folders.

It is here: /System/Library/LaunchAgents/com.apple.imagent.plist

Try again with:

sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.imagent.plist

I found that file in Library>Preferences its titled com.apple.imagent.plist ...

if I move that file into LaunchAgents, and then use the terminal command to unload it, will that work ?
 

justperry

macrumors G5
Aug 10, 2007
12,627
9,933
I'm a rolling stone.
I found that file in Library>Preferences its titled com.apple.imagent.plist ...

if I move that file into LaunchAgents, and then use the terminal command to unload it, will that work ?

No, this has nothing to do with it, I have one in my Home Preferences Folder as well.

Enter the following commands in Terminal and see if it is there

cd /System/Library/LaunchAgents
Hit Enter
ls
Hit Enter

Is it there?
 

ABDacome

macrumors newbie
Original poster
Apr 17, 2013
12
0
No, this has nothing to do with it, I have one in my Home Preferences Folder as well.

Enter the following commands in Terminal and see if it is there

cd /System/Library/LaunchAgents
Hit Enter
ls
Hit Enter

Is it there?

I opened the file that was in preferences to take a look at what was inside and i accidentally hit a key on my keyboard, editing the string inside com.apple.imagent.plist and now my messages app will not launch... are all of the files on all macs the same ? if so, can you copy and paste the contents of yours so I can fix that ?
 

justperry

macrumors G5
Aug 10, 2007
12,627
9,933
I'm a rolling stone.
I opened the file that was in preferences to take a look at what was inside and i accidentally hit a key on my keyboard, editing the string inside com.apple.imagent.plist and now my messages app will not launch... are all of the files on all macs the same ? if so, can you copy and paste the contents of yours so I can fix that ?

I told you before to have a backup, if you don't do so you can into troubles like this, if you don't heed warnings you will mess up one day.

If the File was in /Users/yourname/Library/Preferences you can safely delete it since it should not interfere, I think the problem is ImAgent just crashes because the file is unreadable.
Only delete the file if it is there.

plist files are personal preference files and are almost always different on other Macs.

Edit: You did not answer my last question in my last post.

cd /System/Library/LaunchAgents
Hit Enter
ls
Hit Enter

Is it there?
 
Last edited:

ABDacome

macrumors newbie
Original poster
Apr 17, 2013
12
0
No, this has nothing to do with it, I have one in my Home Preferences Folder as well.

Enter the following commands in Terminal and see if it is there

cd /System/Library/LaunchAgents
Hit Enter
ls
Hit Enter

Is it there?

Just like this ?
Screen Shot 2013-04-17 at 10.17.32 PM.png
 

ABDacome

macrumors newbie
Original poster
Apr 17, 2013
12
0
It's wrong, it is LS from LIST but not capitalised, so ls

Copy and paste is always better than just entering text, that's why I think you had the command wrong before as well.

Ah, I thought you posted "is" okay, will retry that
 

ABDacome

macrumors newbie
Original poster
Apr 17, 2013
12
0
I told you before to have a backup, if you don't do so you can into troubles like this, if you don't heed warnings you will mess up one day.

If the File was in /Users/yourname/Library/Preferences you can safely delete it since it should not interfere, I think the problem is ImAgent just crashes because the file is unreadable.
Only delete the file if it is there.

plist files are personal preference files and are almost always different on other Macs.

Edit: You did not answer my last question in my last post.

cd /System/Library/LaunchAgents
Hit Enter
ls
Hit Enter

Is it there?

I don't see com.apple.imagent.plist in this list, although it should be somewhere in the highlighted area.
Screen Shot 2013-04-17 at 10.37.07 PM.png
 

ABDacome

macrumors newbie
Original poster
Apr 17, 2013
12
0
I just installed ML yesterday, so doing a clean install shouldn't be a problem. I'm going to try that, if the problem persists, I will try all the above instructions again. At first, simply quitting the activity did the trick.

Thanks!
 

justperry

macrumors G5
Aug 10, 2007
12,627
9,933
I'm a rolling stone.
I don't see com.apple.imagent.plist in this list, although it should be somewhere in the highlighted area.
View attachment 408369

I wanted to ask you before but slipped my mind, what OS X version you are running, Mountain Lion or Lion or even earlier?
Look at mine, plenty more than yours and I am on Mountain Lion.

Edit: I wrote this while you posted again.
 

Attachments

  • Screen Shot 2013-04-18 at 12.41.44.png
    Screen Shot 2013-04-18 at 12.41.44.png
    69.6 KB · Views: 259

ABDacome

macrumors newbie
Original poster
Apr 17, 2013
12
0
I wanted to ask you before but slipped my mind, what OS X version you are running, Mountain Lion or Lion or even earlier?
Look at mine, plenty more than yours and I am on Mountain Lion.

Edit: I wrote this while you posted again.


I was running OS X 10.8.3. Now that I did a clean install, I'm back at 10.8, downloading combo update now. iMessage still gives me the same error, wil enter that last command into terminal though

----------

And wouldn't you know it, there it is...

View attachment 408384

now, what is my next step to take ?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.