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

luckman212

macrumors regular
Original poster
Sep 27, 2009
156
106
Anyone else seeing an annoying bug in Sonoma where e.g. you're typing in Chrome and suddenly the frontmost window has lost focus and you have to click to activate it again?

I am seeing this 5-10 times per hour and it's really annoying.

I wrote a little app called frontapp to make it easier to track this. It prints a timestamp (millisecond accuracy), full Pathname, AppName, Bundle ID and PID to a small window, keeping a running log. Also displays a little menubar item with the name of the current frontmost app.

1696304790007.png


If you want to give it a try, grab it from my GitHub:
https://github.com/luckman212/frontapp

Similar (maybe identical?) to this older report:
https://forums.macrumors.com/threads/macos-windows-focus-bug.2399922/
 

gank41

macrumors 601
Mar 25, 2008
4,350
5,021
I've been seeing my curser just disappear completely and the window I'm in also losing focus. I'm having to swipe up to Mission Control and then can move the curser back over my Window and click on it again.

This is on a M1 MBP, not happening on a 2018 Intel Mac mini.
 

n-evo

macrumors 68000
Aug 9, 2013
1,909
1,731
Amsterdam
Hans’t happened on my end yet, using a MacBook Pro M1 Pro.

Does it still happen with a “fresh” user account? Could try that.
 

Koloa

macrumors member
Apr 11, 2020
32
17
This has been driving me nuts as well. It looks like it's:

2023-11-13 17:29:28.954 /System/Library/CoreServices/CoreServicesUIAgent.app (CoreServicesUIAgent/com.apple.coreservices.uiagent/1018)

But I've only been tracking with your (very helpful!) tool for a little while.
 

luckman212

macrumors regular
Original poster
Sep 27, 2009
156
106
The issue is definitely still present even with 14.1.1. It bit me again yesterday. Do any of you all use Bartender? I had a support thread going with someone who suggested that might be part of the culprit.
 
  • Like
Reactions: gadget_guy

gank41

macrumors 601
Mar 25, 2008
4,350
5,021
The issue is definitely still present even with 14.1.1. It bit me again yesterday. Do any of you all use Bartender? I had a support thread going with someone who suggested that might be part of the culprit.
I use Bartender and haven't had this issue on macOS 14.1 or now on macOS 14.1.1
 

Koloa

macrumors member
Apr 11, 2020
32
17
The issue is definitely still present even with 14.1.1. It bit me again yesterday. Do any of you all use Bartender? I had a support thread going with someone who suggested that might be part of the culprit.
No Bartender, but, it would be good to find the overlap.

Options from me:
StreamDeck
Keyboard Maestro
BetterTouchTool
Alfred
KeyCue

But it may not be any of these.
 

MacGizmo

macrumors 68040
Apr 27, 2003
3,214
2,514
Arizona
I have none of the apps mentioned and it happens all the time for me with Sonoma 14.1. The only time I really notice it is when I'm using Adobe Creative Cloud apps like Photoshop, InDesign, Illustrator, etc.
 

scanize

macrumors newbie
Nov 15, 2023
4
1
Thank you for the tips. I also have the same problem on all Sonoma versions.

I also use Bartender and Alfred. I killed Alfred process IMMEDIATELY when the problem occurred and the focus jumping issue stopped immediately (usually runs about 30-60 seconds). As soon as I killed the process (after about 10s of occurrence), the problem was gone.

Can anyone confirm this?
 
  • Like
Reactions: gadget_guy

gadget_guy

macrumors newbie
Nov 6, 2017
21
2
Thank you for the tips. I also have the same problem on all Sonoma versions.

I also use Bartender and Alfred. I killed Alfred process IMMEDIATELY when the problem occurred and the focus jumping issue stopped immediately (usually runs about 30-60 seconds). As soon as I killed the process (after about 10s of occurrence), the problem was gone.

Can anyone confirm this?

I took your advice and killed alfred and the loss of focus which was occurring every 10 to 30 seconds stopped. Must be a bug in recent alfred update or some update in Mac OS that Alfred can no longer play nice with until it updates again. Boy was this bug driving me insane. Made the mac generally unusable. Couldn't type without losing focus of the window. I'll check Alfred website now to see if anyone reported this there.

I am on Sonoma 14.1.1

EDIT UPDATE: Ok so it wasn't 100% fixed. But I went from 2 to 4 focus losses per minute to one loss every few minutes. Still searching for problem to fully solve this.
 
Last edited:

scanize

macrumors newbie
Nov 15, 2023
4
1
Thanks @gadget_guy !

I have now also noticed that the error recurs even without the Alfred process. Now I have deactivated Bartender (which was always running), since then there is no more focus problem. Very strange...
 

gadget_guy

macrumors newbie
Nov 6, 2017
21
2
Thanks @gadget_guy !

I have now also noticed that the error recurs even without the Alfred process. Now I have deactivated Bartender (which was always running), since then there is no more focus problem. Very strange...

I found the cause on my Mac. It was HP Alert which is HP printer utility alert message. I used the python script to notify me what was stealing focus. As soon as I disabled that in the HP app problem gone since. I looked and HP had an app update earlier in the week which must have caused all this
 

scanize

macrumors newbie
Nov 15, 2023
4
1
Since I deactivated Bartender (version 5) 4 days ago, everything has been working perfectly. Otherwise it came up several times a day.
 

rexbinary

macrumors newbie
Apr 3, 2010
14
8
Texas
This has been driving me nuts. I can't figure out what it causing it. I don't have Alfred, Bartender, or printer software installed. Earlier today while just staring at my screen I watched my browser drop out of focus.
 

kecinzer

macrumors 6502a
Oct 19, 2015
654
352
Czech republic
Same issue here. macOS 14.2.
I have:
Alfred
Bartender 5
StreamDeck

Still see CoreServicesUIAgent get focus.

I will try close some of apps and will see. Thank you for TIP.
 

scanize

macrumors newbie
Nov 15, 2023
4
1
Since I deactivated Bartender 5, it has not happened again.

After a restart I had the problem again immediately, as I still had Bartender 5 on autostart. I closed it again and it no longer appears.

I can't say why Bartender has an effect on me, but at least the error no longer appears as long as it is closed. Unfortunately - my menu bar is very full and I love Bartender :D
 

kecinzer

macrumors 6502a
Oct 19, 2015
654
352
Czech republic
Since I deactivated Bartender 5, it has not happened again.

After a restart I had the problem again immediately, as I still had Bartender 5 on autostart. I closed it again and it no longer appears.

I can't say why Bartender has an effect on me, but at least the error no longer appears as long as it is closed. Unfortunately - my menu bar is very full and I love Bartender :D
Same here. After I closed Bartender 5, no longer CoreServicesUIAgent, until I openend Beeper, but then happened only 2 times.
So Bartender is problem here. May be we can report it.

The issue is still here, even not that often, but even with Bartender disabled...

Focus changed to: Arc
Focus changed to: iTerm2
Focus changed to: Arc
Focus changed to: iTerm2
Focus changed to: CoreServicesUIAgent
Focus changed to: Arc
Focus changed to: iTerm2
Focus changed to: Arc
Focus changed to: iTerm2
Focus changed to: Arc
Focus changed to: iTerm2
Focus changed to: Arc
Focus changed to: iTerm2
Focus changed to: Arc
Focus changed to: iTerm2
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.