Solved

Browser Automation ERROR Field 'sessionName' must not be null.


Badge +4
  • Automate the Universe SME
  • 22 replies

Hello Everyone, 

I am using the package Browser Automation , 

I create a child bot using the variable type session for output; But when I call the child bot  in parent bot and trying to use the session output in other browser action . I have the following message Field 'sessionName' must not be null.

 

The child bot run succesfully but I think the session output is not well return even the session Id is not null 

 

 

icon

Best answer by Bot Dev 17 April 2024, 18:18

View original

14 replies

Userlevel 4
Badge +6

I think you discovered your own answer. Those sessions don’t persist across bots. Certain kinds of sessions, for example in the Excel Advanced package, can be shared.

Badge +4

Hello @Aaron.Gleason 

The browser automation persist accross bots because the first time , I run the bot it works all the day and at the end it stop working. If I create a new taskbot with same actions, at the beginning it works before having this error message

Userlevel 4
Badge +6

Your best bet is to keep all browser functions within the same task bot.

Badge +4

I use the login for many automations so it will be redundant to repeat again the same code 

Userlevel 2
Badge +6

@LnMamou 
For the issue, share the screenshot of error, at which step do you encounter error, Run task bot ?Then it seems to be issue with run task variable mapping. Drag and drop new run task and try with different name of variables.


For the package and workaround:
Update your package to latest version if possible, which will also allow you to select window by title.

  • Ensure same package version is used across parent and all child tasks for session to work.
  • Use global session value, then you do not need to pass session variables in and out.
Badge +4

Hello @Bot Dev ,

 

I use same package version is used across parent and all child tasks for session to work. 3.1.2-20240227-221641

I use now global session values

I encounter this error after the run task bot action 

 

Userlevel 2
Badge +6

@LnMamou Using global session resolved the issue ?

I do not see any error message in the screenshot, just the activities.

Badge +4

@Bot Dev No, using global session don’t resolve the issue.  Even i use default or a variable  in global session; the session is consider like null , it is not passed from child to parent bot

Field 'sessionName' must not be null.

 

Userlevel 2
Badge +6

@LnMamou 
I was able to pass from child to another child via global session. 

Check if you are initializing and passing session properly.

Parent:

Child1(Starts session):
 


Child2(Uses this session):
 


Ensure you are not using “End Session” anywhere in between which could be closing the session.​​​​​​​

Badge +4

I think the issue is that the run task bot doesn’t return session to the parent bot

Badge +4
child bot
Call the child bot
action that use the child bot session

 

Badge +4

If I use a second child bot ; it works. So the problem is we cannot use the session directly in the parent bot . 

The green is the second child bot , it works 

The red is when i use directly action browser automation

 

Userlevel 2
Badge +6

I am able to use within parent bot too, global session should be global:
Check package version and bot compatibility version in your parent task.

Check if any local session with same name exists.

Try to create a fresh parent task and test, seems to work for me.
 

 

Badge +4

I create a new bot and it works now. Thank you for the support really appreciated

Reply