9

I only just noticed this today - Calculator is gone.

Is this an "improvement" with 10.13.5 which I installed just the other day, or did I break something?

I did notice Stocks appear in there as if by magic the other day - something I'm never ever going to need, but I hadn't spotted Calculator's disappearance until now.

Checked my partner's machine - same OS, very similar machine - lot & lots of widgets...

So, maybe the question becomes, 'where do they live & why can't my machine find them?'

Late edit:
I've found the calculator app, in
/System/Library/Frameworks/NotificationCenter.framework/PlugIns/com.apple.ncplugin.calculator.appex
so now I need to figure out a way to get the Notification Centre to recognise it again.

Per comments...
defaults read com.apple.notificationcenterui
gives

{
    TodayView =     {
        NoContent =         (
            "com.apple.reminders.RemindersNC"
        );
        keyWidget = "com.apple.ncplugin.calculator";
        order =         (
            "com.apple.reminders.RemindersNC",
            "com.apple.iTunes.today.TodayExtension",
            "com.apple.iCal.CalendarNC",
            "com.apple.ncplugin.weather",
            "com.parallels.desktop.console.Resource-Monitor",
            "com.apple.ncplugin.stocks"
        );
        preferences =         {
            "com.apple.nc.disclosures" =             {
                enabled = 1;
            };
            "com.apple.nc.today.date" =             {
                enabled = 1;
            };
            "com.apple.nc.today.dnd" =             {
                enabled = 1;
            };
            "com.apple.nc.today.summary" =             {
                enabled = 1;
            };
            "com.apple.nc.tomorrow.summary" =             {
                enabled = 1;
            };
        };
    };
    bannerTime = 5;
    "last-messagetrace-stamp" = "551957496.077987";

so they're missing there. Does that mean there's a defaults write to put them back?

10
  • +1 Good question. In my El Capitan install, the calculator I had there normally suddenly was gone and I had to add it back (at least I could). An update perhaps?
    – Allan
    Commented Jun 21, 2018 at 18:19
  • 1
    For what it's worth, it's still here in Mojave 10.14 beta 2 so I don't think it was removed intentionally.
    – grg
    Commented Jun 21, 2018 at 18:19
  • I just checked my partner's machine - many more widgets, same OS, very similar machine. Added to question.
    – Tetsujin
    Commented Jun 21, 2018 at 18:30
  • You can use the old in Dashboard. Commented Jun 21, 2018 at 20:33
  • 2
    Dashboard is & always was useless; Can't see what you're working on while it's open & as soon as you touch anything it closes again.
    – Tetsujin
    Commented Jun 22, 2018 at 16:21

3 Answers 3

8
+250

When it comes to troubleshooting Notification Centre widgets, there are a number of options you can try.

1. Use the Edit option within Notification Centre

This is really the first thing to try. Refer to Seamus' answer for the steps involved.

2. Check the Extensions preference pane

In summary:

  1. Go to Apple > System Preferences... > Extensions
  2. OPTIONAL: If you're having issues with 3rd party extensions, select the All option in the lefthand pane and then check the righthand side to enable any that aren't activated
  3. Select the Today option in the lefthand pane
  4. Now check the right-hand side list to confirm the widget(s) are enabled (if not, tick the relevant checkbox(es)
  5. Exit System Preferences
  6. Check your Notification Centre to see if the Widget(s) are active and/or functioning properly

3. Test another User account

  1. Log in to another user account to test whether the Notification Centre (and any Widgets you're having problems with) are working properly. If you don't have another user account, you can log into the Guest account or create a new temporary account at Apple > System Preferences... > Users & Groups
    • If the Notification Centre / Widgets work fine in the other Account, then try 4, 5, 6, 7, 8, 9 and 10 below
    • If the Notification Centre / Widgets do not work fine in the other Account, then use macOS Recovery to Reinstall macOS (NOTE: Ensure you have a full backup prior to doing this). Likewise, you can use macOS Recovery to restore from a Time Machine backup that was made prior to problems with Notification Centre (NOTE: Ensure you have a full current backup prior to doing this, so that you don't lose any recent documents, emails, photos, etc).

4. Use Widget Simulator to add it back again

  1. Go to /System/Library/Frameworks/NotificationCenter.framework/Resources/
  2. Launch the Widget Simulator
  3. Now go to /System/Library/Frameworks/NotificationCenter.framework/PlugIns/
  4. Drag and drop the com.apple.ncplugin.calculator.appex file onto the Widget Simulator icon in the Dock
  5. This should open the widget in a Simulator window
  6. Click on the green + button:

enter image description here

  1. Now check to see if the Calculator widget is back in your Notification Centre (or available to add back again)

5. If present, delete any relevant .plist files

NOTE: If you've tested another User Account and the Notification Centre / Widget is not working fine in that account, then do not proceed with this option.

If macOS has created a .plist file for a specific Widget you're having problems with, then delete it. To check this you need to access the relevant Notification Centre Plugin container for the user account in question. Using the Calculator widget as an example, you would go to:

~/Library/Containers/com.apple.ncplugin.calculator/Data/Library/Preferences

If you see a .plist file for the specific widget (e.g. com.apple.ncplugin.calculator.plist and/or com.apple.calculator.plist), then delete it and restart your Mac.

6. Swap the specific widget .appex file

Grab a known good copy of your widget from a Time Machine backup or another computer. In this case (i.e. a macOS High Sierra installation), the Calculator widget can even be replaced with one from macOS Sierra.

To do this:

  1. On another Mac or within a Time Machine backup, navigate to: /System/Library/Frameworks/NotificationCenter.framework/PlugIns/
  2. Copy the com.apple.ncplugin.calculator.appex file representing the Calculator widget
  3. Now past this into the problem Mac at the same location: /System/Library/Frameworks/NotificationCenter.framework/PlugIns/

NOTE: To do this you will need to temporarily disable System Integrity Protection (SIP) on the Mac you're having problems with.

7. Sign out of and then back into iCloud

I guess the heading says it all. Go to Apple > System Preferences... > iCloud and sign out. Once you're signed out, then sign back in again.

8. Force a Spotlight reindex

There are various ways to do this. The easiest way is to:

  1. Go to Apple > System Preferences > Spotlight
  2. Select the Privacy tab
  3. Drag your boot volume into the window
  4. Wait a few minutes
  5. Remove your boot volume so that it's no longer listed in the window
  6. Exit System Preferences

NOTE: Reindexing your boot volume can take a long time. How long depends on the size of your drive and how much data is stored on it.

9. Reset your password and create a new Keychain

Follow the steps here to reset your password first and then to create a new Keychain.

10. Create a new User account and migrate your data into that one

Obviously this will take a few hours, but this will definitely solve the problem (assuming that when you tested another user account at 3 above it worked fine). Essentially you're creating a new account and migrating all your data to that one instead.

16
  • hmm... no werky :/ Says it can't find the file [for all 3 in there] when quite plainly they are right there. Same thing works just fine on another machine. SIP is in my way, will try without it & report back...
    – Tetsujin
    Commented Jun 26, 2018 at 9:32
  • Hmm, SIP shouldn't stop you from doing this, so I'd be surprised if disabling it had an impact. Just to clarify, are you saying you can't even open the plugin in the Widget Simulator, or that you can open it but clicking on the green plus sign results in the error message?
    – Monomeeth
    Commented Jun 26, 2018 at 10:56
  • It stopped me swapping in new versions from the other machine. Since disabling it I've tried new versions & also versions on the desktop - 'can't find' is still the issue. i.sstatic.net/818u1.png
    – Tetsujin
    Commented Jun 26, 2018 at 11:04
  • Ah, yep, SIP would stop you adding/swapping them, but shouldn't affect your ability to use the Simulator etc. So, is the Calculator widget missing from the list in System Preferences > Extensions > Today? If it's there, is it enabled?
    – Monomeeth
    Commented Jun 26, 2018 at 11:26
  • It's missing. That was the first place I checked [user pref, I managed to find that one... buried Frameworks not so easy ;) It's there, it won't run with Widget Sim. Even copied the entire Framework from another machine. Something's just not registering properly & I cannot figure out what. I'm tempted to lay another combo updater over it again, or even the whole OS... nuisance as I'm time-constrained on actual work I need to do ;)
    – Tetsujin
    Commented Jun 26, 2018 at 11:41
2
  1. Open the Notification Center enter image description here

  2. Click on the EDIT button at the bottom of the panel. Several "Items" will appear to the right of the panel, including the "Calculator" item. enter image description here

  3. Click the + icon the the right of the Calculator. The Calculator is moved into the main panel of the Notification Center. enter image description here

  4. Click the Done button at the bottom of the panel. The options disappear from the panel, and the Calculator remains in the Notification Center panel. enter image description here

6
  • If only it were that simple ;-) You may notice my OP shows the edit panel open... several are missing.
    – Tetsujin
    Commented Jun 26, 2018 at 14:04
  • Yeah - sorry; I thought this was too easy. Have you tried deleting some of the items in the panel now to see if they show up as widgets that can be added?
    – Seamus
    Commented Jun 26, 2018 at 14:09
  • Is the Calculator app in your Applications folder, or is it in a subfolder beneath Applications?
    – Seamus
    Commented Jun 26, 2018 at 14:14
  • Yes. The ones that are there work as expected. They all work in another account, so it's something very account-specific.
    – Tetsujin
    Commented Jun 26, 2018 at 14:18
  • It's in Apps & it works - but that's not the same calc as the one in Notifications.
    – Tetsujin
    Commented Jun 26, 2018 at 14:19
1

Not much of an answer, but I eventually solved both this issue & also Recurring Volume damage + Time Machine issues by cloning the drive, reformatting to HFS+ & cloning back again.

No amount of messing with APFS would fix it.

But see Monomeeth's answer here for a great troubleshooting guide.

1
  • Late Note: Apple saw fit to automatically re-format back to APFS ... & both issues returned immediately.
    – Tetsujin
    Commented Jul 26, 2018 at 13:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .