-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Repro step:
- Step a Python project on GitHub using GH Actions to install playwright-python on the CI machine
- While running
python -m playwright install
, you might see
Traceback (most recent call last):
1230
File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/runpy.py", line 197, in _run_module_as_main
1231
return _run_code(code, main_globals, None,
1232
File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/runpy.py", line 87, in _run_code
1233
exec(code, run_globals)
1234
File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/playwright-1.9.2-py3.9-linux-x86_64.egg/playwright/__main__.py", line 32, in <module>
1235
main()
1236
File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/playwright-1.9.2-py3.9-linux-x86_64.egg/playwright/__main__.py", line 28, in main
1237
subprocess.run([str(driver_executable), *sys.argv[1:]], env=my_env)
1238
File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/subprocess.py", line 505, in run
1239
with Popen(*popenargs, **kwargs) as process:
1240
File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/subprocess.py", line 951, in __init__
1241
self._execute_child(args, executable, preexec_fn, close_fds,
1242
File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/subprocess.py", line 1823, in _execute_child
1243
raise child_exception_type(errno_num, err_msg, err_filename)
1244
PermissionError: [Errno 13] Permission denied: '/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/playwright-1.9.2-py3.9-linux-x86_64.egg/playwright/driver/playwright.sh'
1245
Error: Process completed with exit code 1.
Sample GH Actions output: https://github.com/imWildCat/scylla/runs/2159854168?check_suite_focus=true#step:4:1244
I can only install playwright drive by using this workaround:
sudo chmod +x /opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/playwright-1.9.2-py3.9-linux-x86_64.egg/playwright/driver/playwright.sh
python -m playwright install
In addition, after working around this issue, I also found another issue where no permission for node
:
---------------------------- Captured stderr setup -----------------------------
/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/playwright-1.9.2-py3.9-linux-x86_64.egg/playwright/driver/playwright.sh: 3: /opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/playwright-1.9.2-py3.9-linux-x86_64.egg/playwright/driver/node: Permission denied
Reference: https://github.com/imWildCat/scylla/pull/137/checks?check_run_id=2159995227#step:6:142