Skip to main content
Solved

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


Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 32 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 

 

 

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.
 

 

View original
Did this topic help answer your question?

14 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+10
  • Automation Anywhere Team
  • 503 replies
  • 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.


Forum|alt.badge.img+8
  • Author
  • Navigator | Tier 3
  • 32 replies
  • 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
Forum|alt.badge.img+10
  • Automation Anywhere Team
  • 503 replies
  • April 17, 2024

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


Forum|alt.badge.img+8
  • Author
  • Navigator | Tier 3
  • 32 replies
  • April 17, 2024

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


Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 52 replies
  • 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.

Forum|alt.badge.img+8
  • Author
  • Navigator | Tier 3
  • 32 replies
  • 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 

 


Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 52 replies
  • April 17, 2024

@LnMamou Using global session resolved the issue ?

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


Forum|alt.badge.img+8
  • Author
  • Navigator | Tier 3
  • 32 replies
  • 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.

 


Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 52 replies
  • 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.​​​​​​​


Forum|alt.badge.img+8
  • Author
  • Navigator | Tier 3
  • 32 replies
  • April 17, 2024

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


Forum|alt.badge.img+8
  • Author
  • Navigator | Tier 3
  • 32 replies
  • April 17, 2024
child bot
Call the child bot
action that use the child bot session

 


Forum|alt.badge.img+8
  • Author
  • Navigator | Tier 3
  • 32 replies
  • April 17, 2024

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

 


Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 52 replies
  • Answer
  • April 17, 2024

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.
 

 


Forum|alt.badge.img+8
  • Author
  • Navigator | Tier 3
  • 32 replies
  • April 18, 2024

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings