I've been stuck on this error message for over a week now when trying to run a robot framework script (selenium) on heroku.
session not created: probably user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir
My solution works fine as-is in every context except heroku.
I've tried including arguments like headless, incognito, no-sandbox.
I've tried creating my own arbitrary directories like tmp/user-data-dir-{timestamp}.
I've tried setting it to null, empty string, and omitting it entirely.
I honestly can't make heads or tails of this and it feels like no matter what options I apply, heroku just entirely ignores them or insta-locks any temp directories I make.
Happy to provide more information.