Notifications Not Being Displayed

I have an AppleScript that does some copy/paste functions before my regular backups. At the very end of the script I call for a notification. I’m really not sure if it’s a script issue or a System Preferences/Notifications issue.

	"/Users/homer/Library/Application Support/XMenu/Custom" to the folder ¬
	POSIX file "/Users/homer/Documents/MacBook Pro Specific/XMenu Sync" with replacing

display notification "Completed Successfully!" with title "Pre Backup AppleScript"

delay 1```

It’s difficult to know exactly what the problem is without seeing all of the code which leads up to the little snippet that you posted

What happens if you run a simple script with just a display notification command and none of the foregoing stuff?

Are the notifications visible in Notification Centre if you click the clock in the top right corner of your screen?

Do you have a Do Not Disturb schedule active in iOS?

If you are running the script in Script Editor, what are its notification settings in System Settings - Notifications?

These are all things that you can investigate.

Here is the entire script.

   "/Users/homer/Library/Application Support/PostboxApp/Profiles/lzdgaop0.default/abook.mab" to the folder ¬
   POSIX file "/Users/homer/Documents/MacBook Pro Specific/Address Book Sync" with replacing

tell application id "com.apple.Finder" to duplicate file POSIX file ¬
   "/Users/homer/Library/Application Support/PostboxApp/Profiles/lzdgaop0.default/history.mab" to the folder ¬
   POSIX file "/Users/homer/Documents/MacBook Pro Specific/Address Book Sync" with replacing

tell application id "com.apple.Finder" to duplicate file POSIX file ¬
   "/Users/homer/Library/Application Support/Firefox/Profiles/jla842kt.default-release/bookmarks.html" to the folder ¬
   POSIX file "/Users/homer/Documents/MacBook Pro Specific/Firefox Bookmarks Sync" with replacing

tell application id "com.apple.Finder" to duplicate file POSIX file ¬
   "/Users/homer/Library/Application Support/Firefox/Profiles/jla842kt.default-release/favicons.sqlite" to the folder ¬
   POSIX file "/Users/homer/Documents/MacBook Pro Specific/Firefox Bookmarks Sync" with replacing

tell application id "com.apple.Finder" to duplicate file POSIX file ¬
   "/Users/homer/Library/Application Support/Firefox/Profiles/jla842kt.default-release/places.sqlite" to the folder ¬
   POSIX file "/Users/homer/Documents/MacBook Pro Specific/Firefox Bookmarks Sync" with replacing

tell application id "com.apple.Finder" to duplicate folder POSIX file ¬
   "/Users/homer/Library/Application Support/ChronoSync/Tasks" to the folder ¬
   POSIX file "/Users/homer/Documents/MacBook Pro Specific/Backup Scripts/ChronoSync Tasks" with replacing

tell application id "com.apple.Finder" to duplicate folder POSIX file ¬
   "/Users/homer/Library/Application Support/XMenu/Custom" to the folder ¬
   POSIX file "/Users/homer/Documents/MacBook Pro Specific/XMenu Sync" with replacing

display notification "Completed Successfully!" with title "Pre Backup AppleScript"

delay 1```

If I run the script from either Script Editor or Script Debugger, the notification is displayed. If I run the script as an Automator/Application, the notification is displayed. If I turn on the Script Editor menu and run it from there, the notification is displayed. I will look further into the notifications settings, although with the notification showing up in all the instances listed above, I think that finding anything there is unlikely.

For some mysterious reason, the notifications are once again working. I went to System Preferences/Notifications and deleted the entry that was there. Ran the script application and the notification came up. But, rather than dismissing it with a “click” (which I remember doing the first time it came up), I just let it sit there until it finally went away on its own. Now it’s working perfectly each time I run the script.