Skip to main content
Navigator | Tier 3
April 17, 2024
Solved

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

  • April 17, 2024
  • 14 replies
  • 441 views

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 

 

 

Best answer by Bot Dev

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.
 

 

14 replies

Aaron.Gleason
Automation Anywhere Team
Automation Anywhere Team
April 17, 2024

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.

LnMamouAuthor
Navigator | Tier 3
April 17, 2024

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

Aaron.Gleason
Automation Anywhere Team
Automation Anywhere Team
April 17, 2024

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

LnMamouAuthor
Navigator | Tier 3
April 17, 2024

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

Navigator | Tier 3
April 17, 2024

@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.
https://github.com/A360-Tools | https://botstore.automationanywhere.com/vendor/botdev
LnMamouAuthor
Navigator | Tier 3
April 17, 2024

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 

 

Navigator | Tier 3
April 17, 2024

@LnMamou Using global session resolved the issue ?

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

https://github.com/A360-Tools | https://botstore.automationanywhere.com/vendor/botdev
LnMamouAuthor
Navigator | Tier 3
April 17, 2024

@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.

 

Navigator | Tier 3
April 17, 2024

@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.​​​​​​​

https://github.com/A360-Tools | https://botstore.automationanywhere.com/vendor/botdev
LnMamouAuthor
Navigator | Tier 3
April 17, 2024

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