ArgumentNullException on Attach to Browser

I imported a XAML-based activity which has the following structure:

Sequence
-> Attach to Browser
-> Sequence
-> Browser activities

The Attach to Browser activity works properly, but it throws an exception upon hitting the sequence (as observed via interactive debugging). The exception message is as follows:

Attach to Browser: Value cannot be null.
Parameter name: value

It appears that the Attach to Browser task is having trouble passing the browser context onto its child, thus throwing the exception.

I have tried using a selector to find the browser and I have tried injecting a Browser instance from a step earlier (specifically the login process, which works just fine).

In both cases, it appears to find the browser just fine.

If anyone has any ideas as to what may be happening, I’m all ears.

Edit: Exception text (not that it’s much use)

RemoteException wrapping System.ArgumentNullException: Value cannot be null.
Parameter name: value 
   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)

Also, here’s the activities scope.

"Name": "Attach to Browser",
"Id": "1.2",
"InstanceId": "3",
"TypeName": "UiPath.Core.Activities.BrowserScope"

was this import from same version? maybe has some problems with older version…

Yes. All were built using 2019.10.1.

hmmm… did you close and reopen studio? maybe is just some crazy error that will go away, if not i would create a new Attach Browser and move main sequence to the new one.

It appears recreating the imported sequence was the solution. Now just to fix the finicky web element selectors and I’ll be good to go.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.