Giter Club home page Giter Club logo

Comments (7)

own3mall avatar own3mall commented on June 2, 2024 1

And filed a bug with Ubuntu: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2057943

Anyways, selenium base works great. Thank you!

from seleniumbase.

mdmintz avatar mdmintz commented on June 2, 2024

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

Screenshot 2024-03-13 at 3 02 21 PM

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.

own3mall avatar own3mall commented on June 2, 2024

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.

mdmintz avatar mdmintz commented on June 2, 2024

@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.

own3mall avatar own3mall commented on June 2, 2024

@mdmintz

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.

mdmintz avatar mdmintz commented on June 2, 2024

@own3mall You can try using a Python virtual environment when you run scripts.

from seleniumbase.

own3mall avatar own3mall commented on June 2, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.