macOS Sierra: Widgets in notification center are not refreshing

Discussion in 'macOS Sierra (10.12)' started by Brachaci, Jan 11, 2017.

  1. Brachaci macrumors newbie

    Brachaci

    Joined:
    Jul 27, 2014
    Location:
    Slovakia
    #1
    Hi guys,

    I am running macOS Sierra 10.12.2 on my MacBook PRO 17 early 2011.
    Out of nowhere, my widgets (weather, stocks, calendar, monit) stopped working. They are not refreshing, can't get any action when click on them etc.).

    I've tried to:
    - remove them from sidebar and then install back.
    - reset SMC
    - reset PRAM
    and nothing worked. I do not want to reinstall the system because of this, but I can't find any solution on these forums or anywhere else on the web. Does anyone know how to fix this?

    Thank you
    Brachaci
     
  2. Rok73, Jan 12, 2017
    Last edited: Jan 12, 2017

    Rok73 macrumors 65816

    Rok73

    Joined:
    Apr 21, 2015
    Location:
    Planet Earth
    #2
    Have you tried deleting

    Code:
    ~/Library/Preferences/com.apple.notificationcenterui.plist
     
  3. Brachaci thread starter macrumors newbie

    Brachaci

    Joined:
    Jul 27, 2014
    Location:
    Slovakia
    #3
    Hi Rok73. Thank you for the advice, however I cannot delete nor rename the file even as I have root.
    I have tried to change the owner of the file, but even chmod does not work here.
    Is there any way how to force delete the file?
     
  4. Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #4
    I would first test in another account.

    If it works in the other account, then go back to your account and delete :

    ~/Library/Preferences/com.apple.notificationcenterui.plist

    You need to log out/log in back, or restart, for the change to apply.

    ~/Library is the user Library, not the System Library.
    It is hidden by default.
    To access it : Finder, menu bar, click on the "Go" menu, press the Alt key to unveil the Library.

    You can not delete files in System because of the SIP (System Integrity Protection).
     
  5. Brachaci thread starter macrumors newbie

    Brachaci

    Joined:
    Jul 27, 2014
    Location:
    Slovakia
    #5
    Hi Bruno09,

    I have tried both, but none of it worked. I have made backup of the com.apple.notificationcenterui.plist file, so I can put it back if that makes sense. I can though disable the SIP and try to delete the /SYSTEM/Library/
    LaunchAgents/com.apple.notificationcenterui.plist. Correct me if I am wrong, but from nature of the file it should not do much harm to the OS, right? I am just guessing.
     
  6. Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #6
    Did you test in another account, and does it work there, or not ?
     
  7. Brachaci thread starter macrumors newbie

    Brachaci

    Joined:
    Jul 27, 2014
    Location:
    Slovakia
    #7
    I did. But it didn't worked.
     
  8. Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #8
    Ok, so the problem is at System level.

    You can either : delete the .plist file after having disabled the SIP, or reinstall the system "on top" (without erasing the disk).

    Having never tried deleting THAT .plist file, I would go on the safe side and reinstall the system, but it's just me.
     
  9. Rok73 macrumors 65816

    Rok73

    Joined:
    Apr 21, 2015
    Location:
    Planet Earth
    #9
    That is actually what I meant. I copied/pasted the wrong location because I am super tired today. Corrected my original post.
     
  10. Brachaci thread starter macrumors newbie

    Brachaci

    Joined:
    Jul 27, 2014
    Location:
    Slovakia
    #10
    Well, I have put a copy of the file to my network drive, so in case of troubles I can put it back. I will try to disable the SIP and delete it. In worst case scenario I will reinstall.
     
  11. Brachaci thread starter macrumors newbie

    Brachaci

    Joined:
    Jul 27, 2014
    Location:
    Slovakia
    #11
    So a very weird thing just happened. I was able to fix the problem, even if I am not quite sure what happened.
    These are the steps I performed:

    1. Disable SIP --> system reboot
    2. Removed file ~/System/Library/Preferences/com.apple.notificationcenterui.plist
    3. System reboot
    4. Test -- success. Widgest working (refreshing data - f.e. stocks, weather...)
    5. Enable SIP --> system reboot
    6. Test -- failed. Notification bar wouldn't even show. Not with a click on to top right icon or with the touch pad gesture.
    I guess, that at this point it was due to the missing file, but how come it wouldn't mind the missing file when the SIP was disabled? System was after fresh restart after I have deleted the file. ??????
    7. Disable SIP --> system reboot
    8. Copy back the file to ~/System/Library/Preferences/com.apple.notificationcenterui.plist
    9. Enable SIP --> system reboot
    10. Notification bar widgets are working as designed.

    At the end I am happy that the notif bar is working again, but I am still failing to understand, why at one point was the NB working without the com.apple.notificationcenterui.plist and then after enabling SIP and restarting the system, wont.

    Anyway, thank you guys for all the help. Much appreciated.
     
  12. Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #12
    I suppose you mean you removed :

    /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

    not : ~/Library/Preferences/com.apple.notificationcenterui.plist
    (no need to disable the SIP to remove that file)
     
  13. Brachaci thread starter macrumors newbie

    Brachaci

    Joined:
    Jul 27, 2014
    Location:
    Slovakia
    #13

    yes you are right. I have corrected that in my post
     
  14. Illus1ve, Aug 20, 2017
    Last edited: Aug 20, 2017

    Illus1ve macrumors newbie

    Illus1ve

    Joined:
    Aug 20, 2017
    #14
    May you please assist me with a similar issue?

    NC had got stuck (its widgets unresponsive), so I deleted its plist from /Library/Preferences and restarted the machine. However, the issue still persisted, so I went on to delete the same plist from /System/Library/LaunchAgents/, which resulted in NC vanishing completely after a restart. Having put the plist back to /System/Library/LaunchAgents/, I tried launching it with the following command:

    launchctl load -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

    However, that only resulted in an error message reading:

    Path had bad ownership/permissions

    P.S. I somehow ended up having two different files, namely 'com.apple.notificationcenterui.plist' and 'com.apple.notificationcenterui 13.17.03.plist'.
     
  15. Bruno09, Aug 20, 2017
    Last edited: Aug 20, 2017

    Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #15
    Hi,

    no guru here, but lets try though.

    Launch the Terminal and copy-paste into it :

    sudo chown root:wheel /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

    Hit Enter, when prompted ("Password:?") enter your admin password (it will not show up), hit Enter.

    Now check the result by entering :
    ls -l /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
    The answer should be :
    -rw-r--r-- 1 root wheel 1275 4 jan 2016 /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
    (except the date that does not matter, the important thing here is : root wheel)

    Then reboot and see how it works.
     
  16. Illus1ve macrumors newbie

    Illus1ve

    Joined:
    Aug 20, 2017
    #16
    Thanks for the quick reply! May I ask which of the two files has to be put back in which directory?
     
  17. Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #17
    Put /System/Library/LaunchAgents/com.apple.notificationcenterui.plist in Macintosh HD/System/Library/LaunchAgents, then apply the command :

    sudo chown root:wheel /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

    This will restore the right ownership (the system) to the file.
    Then reboot.
     
  18. Illus1ve macrumors newbie

    Illus1ve

    Joined:
    Aug 20, 2017
    #18
    Have just done so. The NC shortcut is still inactive :(

    UPD: I reckon I have to launch it, now that the rights have been restored?
     
  19. Bruno09, Aug 20, 2017
    Last edited: Aug 20, 2017

    Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #19
    No, you don't need to launch it. Just reboot.

    I am doing some tests on a Sierra machine and will back in a few minutes.

    OK, so on a Sierra machine, I moved /System/Library/LaunchAgents/com.apple.notificationcenterui.plist to the desktop, then reboot, NC not here.

    I put back the file, apply the chown command, reboot, NC is back.

    That said, what is your problem exactly, and did you try in another account ?

    If NC works in another account, then the preferences file is the culprit, not the launchagent.

    If NC does not work in another account, the simplest way to solve the issue is to reinstall the system "on top" (this will no delete anything in your data or applications).
     
  20. Illus1ve macrumors newbie

    Illus1ve

    Joined:
    Aug 20, 2017
    #20
    Nothing's changed
     
  21. Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
  22. Illus1ve macrumors newbie

    Illus1ve

    Joined:
    Aug 20, 2017
    #22
    Sorry, fresh install isn't an option, since the machine in question is an otherwise fully operational Hackintosh ;) NC doesn't work in the guest account. How come putting the file back doesn't fix it?

    P.S. Any attempt to launch the plist still results in the 'bad ownership' error
     
  23. Bruno09, Aug 20, 2017
    Last edited: Aug 20, 2017

    Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #23
    I did not mean "fresh install" (=erasing the drive then installing), but installing "on top" (= without erasing the drive).

    I do not know anything about hackintosh, if this matters here.

    You should check the ownership/permissions of the file :
    ls -l /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
    The answer should be :
    -rw-r--r-- 1 root wheel 1275 4 jan 2016 /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
    (except the date that does not matter, the important thing here is : root wheel)

    Here is the response to :launchctl load -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

    /System/Library/LaunchAgents/com.apple.notificationcenterui.plist: service already loaded
    (the service is automatically loaded (of course) when you start the machine)
     
  24. Illus1ve, Aug 20, 2017
    Last edited: Aug 20, 2017

    Illus1ve macrumors newbie

    Illus1ve

    Joined:
    Aug 20, 2017
    #24
    No, the matter in hand has absolutely nothing to do with the fact the machine is a Hackintosh. Here's what Terminal has yielded in response to ls -l /System/Library/LaunchAgents/com.apple.notificationcenterui.plist:

    -rwxrwxrwx 1 root wheel 843 20 Aug 12:25 /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

    ...and to launchctl:
    launchctl load -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

    /System/Library/LaunchAgents/com.apple.notificationcenterui.plist: Path had bad ownership/permissions

    Could you probably share your file? I've got two different versions, one that begins with <ey>KeepAlive</key> and another with <key>TodayView</key>...
     
  25. Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #25
    The rwx (read/write/execute) permissions of the file are not the right ones (I wonder why ?).

    You have : -rwxrwxrwx instead of : -rw-r--r-- (777 instead of 644)

    To restore the right rwx permissions :

    sudo chmod 644 /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

    To check the result : ls -l /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

    http://www.macinstruct.com/node/415
     

Share This Page