Has anyone else ever recieved the following exception when using UI Automation:
Cannot bring the target application in the foreground. The action was blocked by the current foreground window 'New notification' from the process 'shellexperiencehost.exe.'
The REF screensnap isn’t showing anything immediately related to a Windows notification on screen. This does not mean it was not there for a brief period of time just the screen snap did not capture anything resembling a Windows notification popup.
10 robots, thousands of jobs over the last 1.5 years and first time I have seen this exception.
I don’t have a solution but recently ran into this problem myself. Were you able to nail down a cause and/or solution?
You are the first reply to this question. So far only hit it once.
I have not done it yet but thinking disabling app notifications within Setting → Windows Notifications may help.
also occurring this error not once but continuously twice.
turn off the notification didn’t help though.
@riverrat437 did you find any solution to this. I am also facing this issue since past couple of days
Sorry to hear this. We have only experienced it once so far (my original post). No one has suggested a solution yet.
I posted about it because of the error is very odd and specifically pointing to a Windows caused issue.
Hoping someone from UiPath is paying attention to thai thread.
We are facing the same problem, and searching on internet we found the following articule:
I cannot assure the veracity of this information, but seems we are dealing with a trojan that is mining cryptocurrencies.
Thanks for that article and … Ouch !!! … thankfully our shellexperiencehost.exe is the Windows official version and not the trojan.
Try reboot your Devices, mainly if you have unattended working 24x7 (normally they are never rebooted)
maybe it works.
We’re also seeing this on one of our unattended processes, it seems to be the first run every morning. The server is on an automated reboot schedule, so I don’t think it is related to that, but one of the screenshots we have shows a toast notification for pending Windows Updates. I’m not sure why this would cause this exception to be thrown however.
Transaction reference: N/A, Initialisation phase.
Exception: Cannot bring the target application in the foreground. The action was blocked by the current foreground window ‘New notification’ from the process ‘shellexperiencehost.exe.’
Curious if anyone has filed a support ticket on this issue with UiPath ?
We have only hit this issue once. Sounds like others are starting to see this or at least reaching out as they hit it.
Curious about something … what UiPath Assistant is anyone watching this issue running ?
I’m still running 2020.10 on my Robots. We haven’t yet moved to 2022.4.0+ … still in the planning for that.
Wondering if that could have anything to do with this odd notification issue.
Occurred again. Looks like if the windows update notification is there will have this error. anyone got solution?
I got this error too.
EX. “message”:“Click ‘Save’: Cannot bring the target application in the foreground. The action was blocked by the current foreground window ‘New notification’ from the process ‘shellexperiencehost.exe.’”
So I try other activity(Click image in classic mode) but it’s not work.
“Exception :Click Image ‘iexplore.exe Report’= Cannot bring the target application in the foreground. The action was blocked by the current foreground window ‘New notification’ from the process ‘shellexperiencehost.exe.’”
This is solution I try but not work.
- Setting delay before 10 sec in activity(Click). (It’s work 2-3 times and got error again.)
- Setting delay before 5 sec in activity(Click Image). (Never success)
- Setting delay before 40 sec in activity(Click). (Never success)
Next I’ll try
Setting delay before 40 sec in activity and time out 120 sec.
The last one that I suspecting.
I can run success in UiPath studio and batch which call xml file.
And this error isn’t happen all job.
I feel incompetent so much.
So I got this message cause I was using one of my click input types of “Hardware” instead of “Simulate/Chrome API”
But, if you selected the “Hardware” input type by purpose you can change your resolution of the robot machine by going to the “Manage access” tab → clicking on the 3 dots on the production robot → Edit → moving to the third setting “Robot Settings” → under the “Session settings” set the “Login to Console” to True → Resolution Width = 1920 → Resolution Hight = 1080 → Click on Save → rerun your process.
Hope that was helpful.
Strangely enough, I cleared the notifications in bottom right corner and the issue went away. I am using a VM on AWS thru RDP.
- I previously had the notifications disabled, so the message box did not pop-up
- But there were 4 notifications for Windows defender summary inside the notification bar
- After I cleared it and rerun the robot again, the issue went away