Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Failed to connect to browser #315

Open
1 task done
apeltzer opened this issue Jun 16, 2024 · 8 comments
Open
1 task done

[BUG] Failed to connect to browser #315

apeltzer opened this issue Jun 16, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@apeltzer
Copy link
Contributor

apeltzer commented Jun 16, 2024

✔️ Expected Behaviour

Connecting to Chrome works on OSX

🐞 Actual Behaviour

[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

📋 Steps to Reproduce

PDM or executable version, not running the app as root at all - so this should be t he problem.

📺 What browsers are you seeing the problem on? (if applicable)

Chrome

💻 What operating systems are you seeing the problem on? (if applicable)

MacOS

📃 Relevant log output (if applicable)

[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

Code of Conduct

  • I agree to follow this project's Code of Conduct
@apeltzer apeltzer added the bug Something isn't working label Jun 16, 2024
@Vel-San
Copy link

Vel-San commented Jun 22, 2024

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"]

@benjidea
Copy link

Same error for me too.
I have tried Chrome and Edge.
It seems like the script aborts too quickly to wait for the browser. Maybe it would be a possibility to make the timeout customizable in the config?

The suggested QuickFix has no success either.

@provinzio
Copy link
Contributor

Duplicate of #294

@finnjung
Copy link

I have the same problem was anyone able to solve it?

"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"]"

did not work for me or maybe I just did not completely understand what to do :D

@nsotnikov
Copy link

Same for me. Not working and the same error message. Also the quickfix does not work

@0verEngineer
Copy link
Contributor

This bug still exists with the latest binary release for me on Fedora Linux 40 with chromium.

@nico-i
Copy link

nico-i commented Oct 29, 2024

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"]

This worked as a workaround for me (macOS 14.6.1 (23G93)), ty @Vel-San!

Also simplified it into one command:

open -a "Google Chrome" --args --remote-debugging-port=9222 && ./kleinanzeigen-bot <your-command>

And because there was some uncertainty on what exactly to do (see @finnjung's comment):

Add

browser:
  arguments:
    # https://stackoverflow.com/a/50725918/5116073
    - --disable-dev-shm-usage
    - --no-sandbox
    - --remote-debugging-port=9222

to your main configuration yaml file.

@Esmax666
Copy link

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"]

This worked as a workaround for me (macOS 14.6.1 (23G93)), ty @Vel-San!

Also simplified it into one command:

open -a "Google Chrome" --args --remote-debugging-port=9222 && ./kleinanzeigen-bot <your-command>

And because there was some uncertainty on what exactly to do (see @finnjung's comment):

Add

browser:
  arguments:
    # https://stackoverflow.com/a/50725918/5116073
    - --disable-dev-shm-usage
    - --no-sandbox
    - --remote-debugging-port=9222

to your main configuration yaml file.

Hi, thx for the support :)

should i just add the line For emxemple after

 ad_files:
  - ./**/ad_*.{json,yml,yaml} 
```?

ok better begin or end ?

and if i want to refresh the items i just need to give the command "pdm run app download" ? -> i tried to give the command on powershell and also on dmd Windows 11 as admin but i receive this error
`PermissionError: [WinError 5] Access is denied`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

9 participants