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

Browser Visible Mode Doesn't Work: ECONNREFUSED #77

Open
surmatech opened this issue Mar 12, 2024 · 6 comments
Open

Browser Visible Mode Doesn't Work: ECONNREFUSED #77

surmatech opened this issue Mar 12, 2024 · 6 comments

Comments

@surmatech
Copy link

result = run_parallel(run, used_data, n)
at wrapper_browser (/home/user/.local/lib/python3.10/site-packages/botasaurus/decorators.py:664)
parallel_thread.join(0.2) # time out not to block KeyboardInterrupt
at run_parallel (/home/user/.local/lib/python3.10/site-packages/botasaurus/decorators.py:166)
raise self._exception
at join (/home/user/.local/lib/python3.10/site-packages/botasaurus/decorators.py:152)
self.result = target(*args, **kwargs)
at function (/home/user/.local/lib/python3.10/site-packages/botasaurus/decorators.py:143)
return Parallel(n_jobs=n_workers, backend="threading")(
at execute_parallel_tasks (/home/user/.local/lib/python3.10/site-packages/botasaurus/decorators.py:158)
return output if self.return_generator else list(output)
at call (/home/user/.local/lib/python3.10/site-packages/joblib/parallel.py:1952)
yield from self._retrieve()
at _get_outputs (/home/user/.local/lib/python3.10/site-packages/joblib/parallel.py:1595)
self._raise_error_fast()
at _retrieve (/home/user/.local/lib/python3.10/site-packages/joblib/parallel.py:1699)
error_job.get_result(self.timeout)
at _raise_error_fast (/home/user/.local/lib/python3.10/site-packages/joblib/parallel.py:1734)
return self._return_or_raise()
at get_result (/home/user/.local/lib/python3.10/site-packages/joblib/parallel.py:736)
raise self._result
at _return_or_raise (/home/user/.local/lib/python3.10/site-packages/joblib/parallel.py:754)

... across the bridge ...

at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1605:16)
Error: connect ECONNREFUSED 127.0.0.1:38387

^
🌉 Error: connect ECONNREFUSED 127.0.0.1:38387

Keep getting this error with headless=False, this is the config:
@browser(window_size=bt.WindowSize.REAL,parallel=8, create_driver=create_stealth_driver(
start_url=lambda data: data["link"],
wait=12
), add_arguments=add_arguments, raise_exception=True, headless=False, keep_drivers_alive=True, cache=True, output=None, reuse_driver=True, block_resources=True, block_images=True, max_retry=10
)

works fine with Headless=False, using these arguments:
def add_arguments(data, options):
options.add_argument('--disable-dev-shm-usage')
options.add_argument('--no-sandbox')
options.add_argument('--server')
options.add_argument('--disable-setuid-sandbox')
options.add_argument('--no-zygote')
options.add_argument('--disable-gpu-sandbox')
options.add_argument('--disable-software-rasterizer')
options.add_argument('--ignore-certificate-errors')
options.add_argument('--ignore-ssl-errors')
options.add_argument('--use-gl=swiftshader')
options.add_argument('--window-size=1920,1080')

Also tried using only these:
def add_arguments(data, options):
options.add_argument('--disable-dev-shm-usage')
options.add_argument('--no-sandbox')
options.add_argument('--server')
options.add_argument('--disable-setuid-sandbox')

Tried with both proxy turned on and off, nothing seems to help!

@VincentDoreau13
Copy link

VincentDoreau13 commented Mar 13, 2024

Hello,
I had the same problem with the parallel.

Does it work without parallelizing?

@surmatech
Copy link
Author

Doesn't seem to work in single browser mode too for me. Worked for you?
Could you share botasauras version, chrome/chromedriver versions please?

Also, with or without docker? Thanks

@VincentDoreau13

@VincentDoreau13
Copy link

Can you tell me your environment please

@surmatech
Copy link
Author

surmatech commented Mar 14, 2024

I have tried on: Centos 9, Ubuntu 22 and Ubuntu 20 and Debian too.
Using in a non-docker setup with Python3 and Chrome,Chrome driver 122

All of these machines majorly on Google Cloud

@raffaele-capasso
Copy link

Same issue here.. No updates about?

@surmatech
I've tried on Fedora 37/38/39 too, but it doesn't work.
So, I confirm the issue

@Chetan11-dev
Copy link
Contributor

We have released v4, which solves many bugs and adds awesome feautres like UI Run. I suggest using it and let me know if this issue reoccurs, to do so, please run the following commands:

python -m pip install bota botasaurus_api botasaurus_driver bota botasaurus-proxy-authentication botasaurus_server --upgrade

Then read the documentation at https://github.com/omkarcloud/botasaurus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants