GH Actions: playwright.sh and node: Permission denied
See original GitHub issueRepro 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
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
[BUG] Playwright installation cause to ... - GitHub
@Pooort There's an access error - for some reason your user cannot access /home/test/.cache/ms-playwright folder. Does it happen for you on v1.
Read more >GitHub Actions: Fixing the 'Permission Denied' error for shell ...
"Permission denied" means that your script file does not have the "execute" permission set. On Mac and Linux you can use the chmod...
Read more >Getting an npm permissions error running ESLint in GH ...
After upgrading from Node 14.15 => 16.18.1 , I have started getting a Error: EACCES: permission denied, scandir '/root/.npm/_logs' error ...
Read more >7 Github Actions Tricks I Wish I Knew Before I Started
#1: How to Use Github Action Triggers. Triggers is what starts a workflow. Here's how it looks like: name: ...
Read more >Complete Guide To Selenium Testing with GitHub Actions
A GitHub Actions example is the best way to get hands-on experience with the CI/CD tool. Learn all about Selenium GitHub Actions and ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It is permission issue due to the use of
sudo
Try this config:@kumaraditya303 Thanks a lot!
It works!
Could you share the location of
playwright.sh
? I couldn’t find it but would like to take a look.