Second-Hand-Friends / kleinanzeigen-bot

A dilligent command line tool to publish ads on kleinanzeigen.de
GNU Affero General Public License v3.0
197 stars 43 forks source link

browser set up [BUG] #294

Open laeaexxx opened 4 months ago

laeaexxx commented 4 months ago

βœ”οΈ Expected Behaviour

bot downloads ads

🐞 Actual Behaviour

when using the command "pdm app run dowanload" there is a weird error message

πŸ“‹ Steps to Reproduce

idk how its just on my linux rpi

πŸ“Ί What browsers are you seeing the problem on? (if applicable)

No response

πŸ’» What operating systems are you seeing the problem on? (if applicable)

Linux

πŸ“ƒ Relevant log output (if applicable)

pdm run app download


| | _| | () _ _ ____(_) _ | | | | | |/ / |/ \ | ' \ / ` | ' | / \ |/ ` |/ \ ' \ ____| ' \ / | | | <| | / | | | | (| | | | |/ / / | (_| | / | | |__| |) | () | | ||__|_||| ||_,|| |_/__\||_, |_|| || |_._/ \/ __| |___/ https://github.com/Second-Hand-Friends/kleinanzeigen-bot

[INFO] Logging to [/home/laeaexx/kleinanzeigen-bot/kleinanzeigen_bot.log]... [INFO] App version: 2024+1297428 [INFO] Python version: 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] [WARNING] You provided no ads selector. Defaulting to "new". [INFO] Loading config from [/home/laeaexx/kleinanzeigen-bot/config.yaml]... [INFO] -> found 145 categories [INFO] Creating Browser session... [INFO] -> Chrome binary location: /usr/bin/chromium-browser [INFO] -> Setting chrome prefs [/tmp/uc_k4jndpv2/Default/Preferences]... [ERROR] Exception:

            Failed to connect to browser
            ---------------------
            One of the causes could be when you are running as root.
            In that case you need to pass no_sandbox=True

successfully removed temp profile /tmp/uc_k4jndpv2

Code of Conduct

apeltzer commented 4 months ago

Agree, same error here.

laeaexxx commented 4 months ago

So how do I fix it?

apeltzer commented 4 months ago

The nodriver package got an update to 0.27.4, maybe that helps. Though its not on pypi yet https://github.com/ultrafunkamsterdam/nodriver/commit/bb0fcafd9497bae3f3f81e011e56f5a5a5c0fad3

laeaexxx commented 4 months ago

still cant fix that shit pls help

apeltzer commented 4 months ago

Upgrading to 0.27.4 didnt help either, no luck for me.

apeltzer commented 4 months ago

Using the latest version as automatically build from releases works for me again πŸ‘πŸ»

laeaexxx commented 4 months ago

Using the latest version as automatically build from releases works for me again πŸ‘πŸ»

What exactly did u do

apeltzer commented 4 months ago

Use the binary, not the pdm version.

laeaexxx commented 4 months ago

Use the binary, not the pdm version.

So what exactly does that mean sorry for being such a newbie I just don't know

provinzio commented 3 months ago

@laeaexxx apeltzer refers to the binary executables which are automatically build on every new update to the main branch. You can find them under "Releases" which is on the right side of the repo home page or here. Please select the executable file according to your machine.

The usage is similar to the pdm version. In a terminal you can call the executable like C:\myexecutable.exe download --force.


Does your problem still exists? It might be a problem that the RaspberyPi-architecture is arm based.

Vel-San commented 2 months ago

FYI A quick fix for this is to open Chrome in debugging mode as well.

Chrome Launch from Terminal

open -a "Google Chrome" --args --remote-debugging-port=9222

Bot Config

arguments: ["-no-sandbox", "--remote-debugging-port=9222"]