-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
It doesn't start at all in headless mode. #933
Comments
If you use the portable version, then everything is fine. But the question is, why is there such a difference between the deb version and the portable version? |
@bropines It is because multiple command line args are being appended from different sources. Args from the wrapper scripts, and then args from chromedriver. Right above where it logs that error and then initiates a crash, it says that if the number of command line args is more than 1 (because 1 is needed to start it in headless mode), to log an error and then crash. Note that the name is confusing, because it doesn't count args manually entered by the user at the commandline in a terminal. It is counting args that are being passed by environment variables, or chromedriver, or other binary. The point is to avoid argument conflicts, since for example, it always applies the last given argument when given manually at the cmdline, but doesn't do that for other ways of passing flags. So for example running Thorium manually in a terminal with Making sure that flags being applied to the browser are only coming from one source (i.e. chromedriver in this case) should resolve the problem. However, both the regular and portable versions by default use wrapper scripts. Can you try directly calling the binary in headless mode like so:
And see if that works for you. Then you could configure chromedriver or whatever headless testing setup you have in "parsejs" dir to use |
System Details
Problem
It doesn't start at all in headless mode. And even on new versions. Despite the fact that the build (
/home/bropines/fumo_player/parsejs/thorium/thorium
) that I installed a thousand years ago is not clear from which repository, it works, and the same version from releases gives the error `Multiple targets are not supported in headless mode'. Despite the fact that the versions are absolutely identical. I probably won't be able to find a link to that build, because it was a long time ago.Did you read the FAQ?
CTRL+F "Healdess" - 0 result
LOG: /usr/bin/thorium-browser
[1737857915.993][INFO]: Starting ChromeDriver 120.0.6099.235 (05823e77e625a88543a0643805a043a026755012-refs/branch-heads/6099@{#1782}) on port 44125 [1737857915.993][INFO]: Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. [1737857916.003][INFO]: [133a02b1102162388bcb40d63fa28df0] COMMAND InitSession { "capabilities": { "alwaysMatch": { "browserName": "chrome", "goog:chromeOptions": { "args": [ "--headless=new", "--no-sandbox", "--disable-dev-shm-usage", "--remote-debugging-port=9222" ], "binary": "/usr/bin/thorium-browser", "extensions": [ ] }, "pageLoadStrategy": "normal" }, "firstMatch": [ { } ] } } [1737857916.003][INFO]: Populating Preferences file: { "alternate_error_pages": { "enabled": false }, "autofill": { "enabled": false }, "browser": { "check_default_browser": false }, "distribution": { "import_bookmarks": false, "import_history": false, "import_search_engine": false, "make_chrome_default_for_user": false, "skip_first_run_ui": true }, "dns_prefetching": { "enabled": false }, "profile": { "content_settings": { "pattern_pairs": { "https://*,*": { "media-stream": { "audio": "Default", "video": "Default" } } } }, "default_content_setting_values": { "geolocation": 1 }, "default_content_settings": { "geolocation": 1, "mouselock": 1, "notifications": 1, "popups": 1, "ppapi-broker": 1 }, "password_manager_enabled": false }, "safebrowsing": { "enabled": false }, "search": { "suggest_enabled": false }, "translate": { "enabled": false } } [1737857916.003][INFO]: Populating Local State file: { "background_mode": { "enabled": false }, "ssl": { "rev_checking": { "enabled": false } } } [1737857916.004][INFO]: ChromeDriver supports communication with Chrome via pipes. This is more reliable and more secure. [1737857916.004][INFO]: Use the --remote-debugging-pipe Chrome switch instead of the default --remote-debugging-port to enable this communication mode. [1737857916.004][INFO]: Launching chrome: /usr/bin/thorium-browser --allow-pre-commit-input --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --enable-automation --enable-logging --headless=new --log-level=0 --no-first-run --no-sandbox --no-service-autorun --password-store=basic --remote-debugging-port=9222 --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.h45kRR data:, [1737857916.007][DEBUG]: DevTools HTTP Request: http://localhost:9222/json/version [1737857916.007][DEBUG]: DevTools HTTP Request failed - [0126/051836.037866:ERROR:chrome_main.cc(164)] Multiple targets are not supported in headless mode. [1737857916.057][DEBUG]: DevTools HTTP Request: http://localhost:9222/json/version [1737857916.058][DEBUG]: DevTools HTTP Request failed [1737857917.087][INFO]: [133a02b1102162388bcb40d63fa28df0] RESPONSE InitSession ERROR session not created: Chrome failed to start: exited normally. (chrome not reachable) (The process started from chrome location /usr/bin/thorium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.) [1737857917.088][DEBUG]: Log type 'driver' lost 0 entries on destruction [1737857917.088][DEBUG]: Log type 'browser' lost 0 entries on destruction
LOG: /home/bropines/fumo_player/parsejs/thorium/thorium
The text was updated successfully, but these errors were encountered: