i'm trying to use Guest Profile for loading Chrome via selenium & python, everything works perfect if i run the python file from terminal, but if i run it by calling it from php it throws an error. (I'm using Xampp as apache server on Macos.) That folder is not in use, also there is no Chrome instance using that profile.
Setting the profile:
chrome_options.add_argument("--user-data-dir=/Users/chris/Library/Application Support/Google/Chrome/Guest Profile")
Error: selenium.common.exceptions.WebDriverException: Message: unknown error: Could not remove old devtools port file. Perhaps the given user-data-dir at /Users/chris/Library/Application Support/Google/Chrome/Guest Profile is still attached to a running Chrome or Chromium process
I changed permissions to 755 to "Guest Profile" folder, but nothing changes.
Removing chrome option "--user-data-dir...." python scripts works perfect calling it from php Example: http://localhost/test.php?imei=xxxxxxxxxx
$imei = $_GET['imei'];
$command = escapeshellcmd('/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 /Applications/XAMPP/xamppfiles/htdocs/test.py '.$imei);
echo $output = shell_exec($command);