Comments (7)
And filed a bug with Ubuntu: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2057943
Anyways, selenium base works great. Thank you!
from seleniumbase.
Looks like your Linux user might have missing permissions to download the driver. It never showed "Download complete!"
Here it is on mine:
https://github.com/seleniumbase/SeleniumBase/actions/runs/8269106351/job/22623569626
And here it is on my Mac:
sbase get uc_driver
*** chromedriver to download = 122.0.6261.128 (Latest Stable)
Downloading chromedriver-mac-x64.zip from:
https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.128/mac-x64/chromedriver-mac-x64.zip ...
Download Complete!
Extracting ['chromedriver'] from chromedriver-mac-x64.zip ...
Unzip Complete!
The file [uc_driver] was saved to:
/Users/michael/github/SeleniumBase/seleniumbase/drivers/uc_driver
Making [uc_driver 122.0.6261.128] executable ...
[uc_driver 122.0.6261.128] is now ready for use!
That's as much as I can determine from the info you provided.
from seleniumbase.
Well, if I run the script as root using sudo
, it works. Why wouldn't it work with a normal user? I haven't limited or changed the permissions of my normal user :(
from seleniumbase.
@own3mall By the looks of it, a regular user on your specially-configured Linux box doesn't have the permissions needed to download a file into your seleniumbase/drivers
folder from within your Python environment. Since it works when you use sudo
, that should hopefully indicate the situation.
from seleniumbase.
So, I tried doing this:
cd /usr/local/lib/python3.8/dist-packages
sudo chmod 775 -R seleniumbase
sudo usermod -a -G staff {MY_USER_LOGIN}
But now when I run my python script, I get the following.
Mar 13 23:42:05 {MY_USER_LOGIN}-{MY_COMPUTER_HOSTNAME} kernel: [65909.164364] audit: type=1400 audit(1710394925.830:1138): apparmor="DENIED" operation="open" profile="snap.chromium.chromium" name="/etc/vulkan/icd.d/" pid=341096 comm="chrome" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 13 23:42:05 {MY_USER_LOGIN}-{MY_COMPUTER_HOSTNAME} kernel: [65909.164546] audit: type=1400 audit(1710394925.830:1139): apparmor="DENIED" operation="open" profile="snap.chromium.chromium" name="/etc/vulkan/implicit_layer.d/" pid=341096 comm="chrome" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 13 23:42:05 {MY_USER_LOGIN}-{MY_COMPUTER_HOSTNAME} kernel: [65909.164760] audit: type=1400 audit(1710394925.830:1140): apparmor="DENIED" operation="open" profile="snap.chromium.chromium" name="/etc/vulkan/implicit_layer.d/" pid=341096 comm="chrome" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 13 23:42:05 {MY_USER_LOGIN}-{MY_COMPUTER_HOSTNAME} kernel: [65909.164939] audit: type=1400 audit(1710394925.830:1141): apparmor="DENIED" operation="open" profile="snap.chromium.chromium" name="/etc/vulkan/icd.d/" pid=341096 comm="chrome" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
I'm running Ubuntu 20.04 with no special changes. Running the script with sudo works fine, but that's not ideal for security purposes. Any idea how I can fix this issue?
from seleniumbase.
@own3mall You can try using a Python virtual environment when you run scripts.
from seleniumbase.
@mdmintz , I don't want to do it that way. Evidently, no one has a working answer how to disable specifically the snap chromium profiles:
https://askubuntu.com/questions/1267980/how-to-disable-apparmor-for-chromium-snap-ubuntu-20-04
https://ubuntuforums.org/showthread.php?t=2410550
https://ubuntuforums.org/showthread.php?t=2449022
https://answers.launchpad.net/ubuntu/+source/apparmor/+question/701036
So, might as well get rid of the Ubuntu garbage altogether:
sudo systemctl stop apparmor
sudo systemctl disable apparmor
Working for my user account now. Snap sucks.
from seleniumbase.
Related Issues (20)
- Unable to pass cloudflare using UC Mode HOT 2
- Integrate Type Checks, to improve development experience. HOT 1
- Maintainer away for 3 days. Hold your questions until April 10. HOT 2
- Comparison between playwright and seleniumbase? HOT 4
- Is it possible to add selenum webdriver remote with seleniumbase. HOT 1
- How to add saved cookies to a new browser HOT 2
- Browser asks for SSL authentication in Selenium Grid. HOT 3
- When the previous step page is not yet fully loaded, the self. open() of the next step has already been run directly HOT 2
- I hope this script can use the previous browser HOT 11
- Unable to record keystrokes
- Can't pass bot detection on dexscreener.com on Linux HOT 7
- Add UC Mode `driver` methods directly into the `SB` API HOT 1
- Some elements cannot be inputted using the input method HOT 1
- Session Time Out while trying to spawn broswer in Docker HOT 1
- Timezone problem on pixelscan test HOT 2
- Failing Docker tests when running on M2 mac HOT 4
- Docker overhaul needed HOT 2
- Encountered InvalidSessionIdException occasionally in local docker run HOT 6
- Freezes on ChromeOS when loading Driver HOT 2
- How to open a file *.html? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seleniumbase.