Puppeteer Library Question

Hello,

I am currently using puppeteer for automation on some websites. However, I have multiple scripts I want to run for each session. Sometimes, the scripts will overlap with each other and I have to run them at the same time.

The issue is that I need to run the scripts even when another script is being ran on the same session. If i run two different scripts on the same session at the same time, I get this error:

"Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption."

What I need is for the 2nd, 3rd, etc script to simply check to see if the session is being used, if it is, then open a new tab alongside the other scripts.

Are there any tools or solutions to handle this?