Closed anoam closed 9 months ago
Is this /usr/bin/chromium
real chromium binary or a wrapper from snap for example? Instead of chromium install stable chrome and try, but I don't test ferrum with chromium, only with chrome.
Closing since like you said it's most likely browser issue, nothing to do with ferrum.
@route
Oh, my apologies. It turned out that this is because chrome does conflict with jmalloc somehow. I should have doublechecked that all before oppenning the issue.
I was suspecting that they just had changed API.
Further text is just in case you're interested (or for someome who have faced the same issue and googles it): Once again: the issue has nothing to do with Ferrum The way to reproduce:
FROM ruby:3.2.2-bookworm
# or 3.2.2-bullseye in my case
RUN apt-get update && apt-get upgrade --yes && apt-get install --yes libjemalloc2 chromium
RUN gem install ferrum
ENV LD_PRELOAD /usr/lib/x86_64-linux-gnu/libjemalloc.so.2
In the container:
ruby -e 'require "ferrum"; Ferrum::Browser.new(browser_path: "/usr/bin/chromium", headless: true, browser_options: { "no-sandbox": nil, "disable-gpu": nil })'
So far I just removed jmalloc and everything looks OK so far. My apologies for this offtopic.
I was running into this issue, as well. Chrome doesn't play well with jemalloc
in the environment's LD_PRELOAD
. I switched over to tcmalloc
(via libgoogle-perftools-dev
) since it's the allocator used by Chrome, and its performance characteristics aren't much worse than jemalloc
's.
causes
The port is random.
I started getting this after updating chromium to
117.0.5938.62
(same for the latest chrome though).It still works fine with manually installed 116.0.5845.96