Inject Js Script Error when trying to reach custom objects or functions on a web page with Chrome

studio

#1

Hello all!

First of all I would like to thank you all for this great ocean of information on the forum. It helped a lot and it continues to do so.
This is my first question and believe me I searched my subject :slight_smile: (About 5 hours now)

As the subject explains it clearly, I attach my browser, add “Inject Js Script” activity, and type my function which works perfect on chrome console. (I’m working on PC over a RDP connection)
I got the error: “Inject Js Script: Error HRESULT E_FAIL has been returned from a call to a COM component.”
The longer versions is below:

18.4.0-beta.40+Branch.release/v2018.4.Sha.59fdfa787bdb8f383295f38527b887bf00bf752d

Source: Inject Js Script

Message: Error HRESULT E_FAIL has been returned from a call to a COM component.

Exception Type: UiPath.Core.ElementOperationException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.Core.ElementOperationException: Error HRESULT E_FAIL has been returned from a call to a COM component. ----> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
   at UiPath.UiNodeClass.InjectAndRunJS(String bstrCode, String bstrInputText)
   at UiPath.Core.UiElement.InjectAndRunJS(String code, String input)
   --- End of inner ExceptionDetail stack trace ---
   at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
   at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
   at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

But when I try to run something like “alert(‘my test’)” it works.

I have some ideas about the problem but I’m not sure. Maybe uipath chrome extensions attaches itself to the top layer and can not call its properties? I’m really guessing here.
By the way, I did everything on Chrome Extension Troubleshoot page.
Also reinstalled uipath, restarted the machine.

I really appriciate if you have any idea about this problem.

Thank you!