web-ui icon indicating copy to clipboard operation
web-ui copied to clipboard

Failed to initialize Playwright browser: [Errno 13] Permission denied: '/Applications/Google Chrome.app'

Open erwamartin opened this issue 8 months ago • 5 comments

Hello,

I followed the README on my Mac (MacOS 15.3.1) but got this error: ERROR [browser] Failed to initialize Playwright browser: [Errno 13] Permission denied: '/Applications/Google Chrome.app'

I want to use my own Chrome app so I stay signed in to the service I'm automating.

Here is my env config:

# Chrome settings
CHROME_PATH=" /Applications/Google Chrome.app"
CHROME_USER_DATA="/Users/erwan/Library/Application Support/Google/Chrome"

Has anyone seen this issue before? Any help would be great!

Here are the full logs

python webui.py --ip 127.0.0.1 --port 7788

INFO     [browser_use] BrowserUse logging setup complete with level info
* Running on local URL:  http://127.0.0.1:7788

To create a public link, set `share=True` in `launch()`.
INFO     [agent] 🚀 Starting task: go to google.com and type 'OpenAI' click search and give me the first url
INFO     [src.agent.custom_agent]
📍 Step 1
ERROR    [browser] Failed to initialize Playwright browser: [Errno 13] Permission denied: '/Applications/Google Chrome.app'
WARNING  [browser] Page load failed, continuing...
ERROR    [browser] Failed to initialize Playwright browser: [Errno 13] Permission denied: '/Applications/Google Chrome.app'
ERROR    [agent] ❌ Result failed 1/3 times:
 [Errno 13] Permission denied: '/Applications/Google Chrome.app'
INFO     [src.agent.custom_agent]
📍 Step 1
ERROR    [browser] Failed to initialize Playwright browser: [Errno 13] Permission denied: '/Applications/Google Chrome.app'
WARNING  [browser] Page load failed, continuing...
ERROR    [browser] Failed to initialize Playwright browser: [Errno 13] Permission denied: '/Applications/Google Chrome.app'
ERROR    [agent] ❌ Result failed 2/3 times:
 [Errno 13] Permission denied: '/Applications/Google Chrome.app'
INFO     [src.agent.custom_agent]
📍 Step 1
ERROR    [browser] Failed to initialize Playwright browser: [Errno 13] Permission denied: '/Applications/Google Chrome.app'
WARNING  [browser] Page load failed, continuing...
ERROR    [browser] Failed to initialize Playwright browser: [Errno 13] Permission denied: '/Applications/Google Chrome.app'
ERROR    [agent] ❌ Result failed 3/3 times:
 [Errno 13] Permission denied: '/Applications/Google Chrome.app'
ERROR    [agent] ❌ Stopping due to 3 consecutive failures
WARNING  [src.agent.custom_agent] No history to create GIF from
^CKeyboard interruption in main thread... closing server.

erwamartin avatar Mar 14 '25 08:03 erwamartin

you didn't install playwright properly, run this

python3 -m playwright install

eldyvoon avatar Mar 15 '25 02:03 eldyvoon

gauravchaurasia@Gauravs-MacBook-Air web-ui % python3 -m playwright install gauravchaurasia@Gauravs-MacBook-Air web-ui %

I do not get any install process with this command. Can you please confirm. I have earlier installed the playwright as per the Readme doc

GauravChaurasiaGC avatar Mar 20 '25 14:03 GauravChaurasiaGC

you didn't install playwright properly, run this

python3 -m playwright install

Thank you for your reply. Unfortunately, the command that you shared doesn't fix the issue. I followed the instructions on the README.

erwamartin avatar Mar 24 '25 09:03 erwamartin

Incorrect CHROME_PATH, it is supposed to be:

CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

maxhis avatar Apr 04 '25 12:04 maxhis

i dont why but this worked for me , thanks @maxhis : )

VaibhavKambar7 avatar Jun 27 '25 06:06 VaibhavKambar7