Second-Hand-Friends / kleinanzeigen-bot

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

browser set up [BUG] #294

Closed laeaexxx closed 1 month ago

laeaexxx commented 6 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 6 months ago

Agree, same error here.

laeaexxx commented 6 months ago

So how do I fix it?

apeltzer commented 6 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 6 months ago

still cant fix that shit pls help

apeltzer commented 6 months ago

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

apeltzer commented 6 months ago

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

laeaexxx commented 6 months ago

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

What exactly did u do

apeltzer commented 6 months ago

Use the binary, not the pdm version.

laeaexxx commented 6 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 5 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 4 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"]

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If the issue is still valid, please add a respective comment to prevent this issue from being closed automatically. Thank you for your contributions.