PSM for web application stuck

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PSM for web application stuck

L1 Bithead

Hi all, We are using 4 PSM for connection and we have 2 of them have the same error when connect web via them, the clientDispathcer logs said:

[13/05/2025 | 14:00:14] | :: | PSMDU018E Dispatcher error: [ConnectionComponentController :: Main -> OpenQA.Selenium.StaleElementReferenceException: stale element reference: stale element not found in the current frame (Session info: chrome=131.0.6778.265); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#stale-element-reference-exception at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.WebElement.Execute(String commandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.We [13/05/2025 | 14:00:14] | :: | bElement.get_Displayed() at CyberArk.WebAutomationUtils.AttributeTypeBase.<>c.<FindFirstVisibleElement>b__9_1(IWebElement e) at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source) at CyberArk.WebAutomationUtils.AttributeTypeBase.<>c__DisplayClass9_0.<FindFirstVisibleElement>b__0(IWebDriver driver) at OpenQA.Selenium.Support.UI.DefaultWait`1.Until[TResult](Func`2 condition, CancellationToken token) at OpenQA.Selenium.Support.UI.DefaultWait`1.Until[TResult](Func`2 condition) at CyberArk.WebAutomationUtils.AttributeTypeBase.Find(Int32 timeoutSeconds, CancellationToken token) at CyberArk.WebAutoma [13/05/2025 | 14:00:14] | :: | tionUtils.AttributeTypeBase.Find(Int32 timeoutSeconds) at CyberArk.WebAutomationUtils.HTMLPageController.FindElement(HTMLAttribute attributeData, Int32 timeoutSeconds) at CyberArk.WebAutomationCommon.Commands.TextInput.Run(CommandsParameters commandsParameters) at CyberArk.WebAutomationCommon.CommandsExecuter.RunGeneralCommand(List`1 commands, Stack`1 mainCommandsStack, CommandObject command) at CyberArk.WebAutomationCommon.CommandsExecuter.RunCommands(List`1 commands, Boolean isRunValidation) at CyberArk.WebAutomationCommon.WebPageExecuter.RunCommands(List`1 commands, Boolean isRunValidation) at CyberArk.PSM.WebAppDispatcher.WebFormDispatcher.ExecuteLogin(IExecuter ac [13/05/2025 | 14:00:14] | :: | tionExecuter) at CyberArk.PSM.WebAppDispatcher.ConnectionComponentController.Main(String[] args)] [13/05/2025 | 14:00:14] | :: | PSMDU018E Dispatcher error: [ConnectionComponentController :: PopUpErrorMessageBox -> Title="Error Occurred" Message="Refer to log for more information." Timeout=30 Subtitle="General error occurred"]

I searched and see a article mention this error: https://community.cyberark.com/s/article/00005117 but my PSM not hardening at all, we just run install and event not select hardening option and run hardening script as well, so is there any possible reason this issue happen.

 

  • note: We are using chrome version 131 and chrome driver with the same version
  • other PSM run the same way bit it works well
4 REPLIES 4

L5 Sessionator

hi. I would suggest you reading the exceptions documentation provided by selenium:

 

https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/#stale-element-reference-exception

 

Here is what I extracted related to exception

 

StaleElementReferenceException

 

An element goes stale when it was previously located, but can not be currently accessed. Elements do not get relocated automatically; the driver creates a reference ID for the element and has a particular place it expects to find it in the DOM. If it can not find the element in the current DOM, any action using that element will result in this exception.

 

Likely Cause

This can happen when:

 

You have refreshed the page, or the DOM of the page has dynamically changed.

You have navigated to a different page.

You have switched to another window or into or out of a frame or iframe.

 

Possible Solutions

The DOM has changed

 

When the page is refreshed or items on the page have moved around, there is still an element with the desired locator on the page, it is just no longer accessible by the element object being used, and the element must be relocated before it can be used again. This is often done in one of two ways:

 

Always relocate the element every time you go to use it. The likelihood of the element going stale in the microseconds between locating and using the element is small, though possible. The downside is that this is not the most efficient approach, especially when running on a remote grid.

 

Wrap the Web Element with another object that stores the locator, and caches the located Selenium element. When taking actions with this wrapped object, you can attempt to use the cached object if previously located, and if it is stale, exception can be caught, the element relocated with the stored locator, and the method re-tried. This is more efficient, but it can cause problems if the locator you’re using references a different element (and not the one you want) after the page has changed.

 

The Context has changed

 

Element objects are stored for a given context, so if you move to a different context — like a different window or a different frame or iframe — the element reference will still be valid, but will be temporarily inaccessible. In this scenario, it won’t help to relocate the element, because it doesn’t exist in the current context. To fix this, you need to make sure to switch back to the correct context before using the element.

 

The Page has changed

 

This scenario is when you haven’t just changed contexts, you have navigated to another page and have destroyed the context in which the element was located. You can’t just relocate it from the current context, and you can’t switch back to an active context where it is valid. If this is the reason for your error, you must both navigate back to the correct location and relocate it

L1 Bithead

As I know is that the PSM connector are using webdispatcher and it base on selenium, and the issue happen when the web are open but the target website was not loaded successfully while selenium running to get the elements so it cause the element not found and the connector was unable to launch

L5 Sessionator

can you verify network connectivity from that PSM to the webpage you try to open via chrome?

L4 Transporter

Hello @Hiep Nguyen Van​ 

 

Have you received an answer to your question? If so, we kindly encourage you to share it with us.

Your insights could be valuable to other community members in the future.

 

Thank you, Isar.

  • 305 Views
  • 4 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!