I'm trying to run the chrome with command line argument via adb terminal in android. And it works through writing one flag to /data/local/chrome-command-line, e.g:
echo "chrome --single-process" > /data/local/chrome-command-line.
Now I want to make chrome running with single-process mode and no sandbox, then I set the flags as follows:
echo "chrome --single-process --no-sandbox --no-startup-window" > /data/local/chrome-command-line
or
echo "chrome --single-process,--no-sandbox,--no-startup-window" > /data/local/chrome-command-line.
But it doesn't work because the process of sandbox is still exists.
Related
To run chrome in headless mode, I did
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\
Chrome"
chrome --remote-debugging-port=9222 --disable-gpu --headless
in console, But, I got this error,
[0305/140111.481537:ERROR:xattr.cc(64)] setxattr
org.chromium.crashpad.database.initialized on file
/var/folders/m3/92mmh21n0cx4ppf8c3bcns38hd4_kk/T/: Operation not
permitted (1) [0305/140111.484254:ERROR:xattr.cc(64)] setxattr
org.chromium.crashpad.database.initialized on file
/var/folders/m3/92mmh21n0cx4ppf8c3bcns38hd4_kk/T/: Operation not
permitted (1) [0305/140111.484254:INFO:crashpad_client_mac.cc(292)]
restarting handler in 0.983s
[0305/140111.513641:ERROR:gpu_process_transport_factory.cc(1009)] Lost
UI shared context. [0305/140111.513709:ERROR:instance.cc(49)] Unable
to locate service manifest for metrics
[0305/140111.513733:ERROR:service_manager.cc(890)] Failed to resolve
service name: metrics [0305/140111.514229:ERROR:socket_posix.cc(142)]
bind() returned an error, errno=48: Address already in use (48)
DevTools listening on
ws://[::1]:9222/devtools/browser/c46563ca-1891-48bd-bdd6-e6122f3f3b5d
[0305/140112.484141:ERROR:xattr.cc(64)] setxattr
org.chromium.crashpad.database.initialized on file
/var/folders/m3/92mmh21n0cx4ppf8c3bcns38hd4_kk/T/: Operation not
permitted (1) [0305/140112.484641:INFO:crashpad_client_mac.cc(292)]
restarting handler in 0.985s [0305/140113.489618:ERROR:xattr.cc(64)]
setxattr org.chromium.crashpad.database.initialized on file
/var/folders/m3/92mmh21n0cx4ppf8c3bcns38hd4_kk/T/: Operation not
permitted (1) [0305/140113.490274:INFO:crashpad_client_mac.cc(292)]
restarting handler in 0.979s [0305/140114.484881:ERROR:xattr.cc(64)]
setxattr org.chromium.crashpad.database.initialized on file
/var/folders/m3/92mmh21n0cx4ppf8c3bcns38hd4_kk/T/: Operation not
permitted (1) [0305/140114.485349:INFO:crashpad_client_mac.cc(292)]
restarting handler in 0.985s [0305/140115.489188:ERROR:xattr.cc(64)]
setxattr org.chromium.crashpad.database.initialized on file
/var/folders/m3/92mmh21n0cx4ppf8c3bcns38hd4_kk/T/: Operation not
permitted (1) [0305/140115.489638:INFO:crashpad_client_mac.cc(292)]
restarting handler in 0.985s
I also tried,
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
--remote-debugging-port=9222 --disable-gpu --headless
but I got same error.
Is there any solution for this?
I got the answer from Chrome crashpad crashes on xattr
Just provide a different directory for "crash dumps" when starting Chrome, like this:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --disable-gpu --headless --crash-dumps-dir=/tmp
add the following command flags
--disk-cache-dir=/tmp --user-data-dir=/tmp --crash-dumps-dir=/tmp
eg.
chrome --headless --disable-gpu --screenshot --disk-cache-dir=/tmp --user-data-dir=/tmp --crash-dumps-dir=/tmp http://m.baidu.com
For more command-line flags, see here
UPDATE 3/6
I checked the solution on my own MacBook and it worked.
I encounter the same issue today, and after searching some document, I suspect it's due to the SIP(System Integrity Protection) feature in MacOS, with that restrict, you can't modify the files under /var folder even you have the root privilege.
So here is the way to disable that feature:
Turn off your Mac (Apple > Shut Down).
Hold down Command-R and press the Power button. Keep holding Command-R until the Apple logo appears.
Wait for OS X to boot into the OS X Utilities window.
Choose Utilities > Terminal.
Enter csrutil disable.
Enter reboot.
I am trying to run Chrome in "kiosk" mode but for some reason it is not working. I tried all the possible switch combinations and disable running Chrome in backround through GPO but it is not working.
Here is the current link I am running.
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -ignore-certificate-errors --chrome --kisok --fullscreen https://web.page.com
Is there any other setting that I need to check or configure?
Here is also a list of tasks that are running:
**System Idle Process
armsvc.exe
audiodg.exe
cb.exe
CcmExec.exe
cmd.exe
concentr.exe
conhost.exe
csrss.exe
dwm.exe
DWRCS.EXE
DWRCST.EXE
EngineServer.exe
explorer.exe
FrameworkService.exe
igfxCUIService.exe
igfxEM.exe
igfxHK.exe
lsass.exe
lsm.exe
McShield.exe
McTray.exe
mfeann.exe
mfevtps.exe
naPrdMgr.exe
PresentationFontCache.exe
RAVBg64.exe
RAVCpl64.exe
Receiver.exe
redirector.exe
SearchIndexer.exe
SelfServicePlugin.exe
services.exe
shstat.exe
smss.exe
spoolsv.exe
ssonsvr.exe
svchost.exe
System
taskeng.exe
taskhost.exe
TCPSVCS.EXE
UdaterUI.exe
VsTskMgr.exe
wfcrun32.exe
wininit.exe
winlogon.exe
WmiPrvSE.exe
Deni said he was running RSOP and it turned out that the GPO setting for blocking Chrome to run with kiosk mode was not applying. He said he fixed it (I am assuming he used gpupdate /force in Command Prompt to update GPO). He said the parameters that he is using is
--ignore-certificate-errors and --kiosk
I'm doing automated tests with Chrome.
Part of my suite needs flash to be activated (sight...).
I'm struggling to activate it. Here's what I got:
If I open a regular chrome session, with Flash checked in chrome://plugins, it works there:
When the tests start, the command line executed is:
▶ ps -edf | grep chrome
augustin 24752 24743 2 12:12 pts/0 00:00:07 /opt/google/chrome/chrome --user-data-dir=/tmp/karma-22735678 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-background-timer-throttling http://test.example.com:8080/?id=22735678
I always get Download failed or sometimes flash version outdated.
Even if I check flash in plugins and reload, even if I allow it specifically for this tab and refresh:
I tried several command line options:
--always-authorize-plugins from there
--enable-plugins from there
without sucess. :(
Thanks for the help
EDIT:
If I click on + details in chrome://plugins, I can see that in a regular session, Location is set to /home/augustin/.config/google-chrome/PepperFlash/23.0.0.207/libpepflashplayer.so
, while, in the command-lined open I get: Location: internal-not-yet-present
This might be the explanation, though I still don't know how to fix it.
I made it by copying the content of /home/augustin/.config/google-chrome/PepperFlash/* into /opt/google/chrome/PepperFlash, chmod -r +rx /opt/google/chrome/PepperFlash and then adding the following flags to the launcher :
customLaunchers: {
Chrome_plugins: {
base: 'Chrome',
flags: ['--ppapi-flash-path=/opt/google/chrome/PepperFlash/23.0.0.207/libpepflashplayer.so', '--enable-plugins', '--always-authorize-plugins']
}
},
Not very plug&play, neither compatible with other laptops, but at least works.
A more robust solution would be welcome!
I try to remotely debug tests run by Internjs.
Basically it is a Chrome that is run by Selenium and Chromedriver.
I set up Chromedriver debuggerAddress option as
debuggerAddress: '127.0.0.1:8765'
Now when I run tests Selenium waits some time and than fails with message:
FATAL ERROR
UnknownError: [POST http://localhost:4444/wd/hub/session / {"desiredCapabilities":{"browserName":"chrome","name":"tests/intern_local","idle-timeout":60,"selenium-version":"2.44.0","chromeOptions":{"debuggerAddress":"127.0.0.1:8765"}}}] unknown error: cannot connect to chrome at 127.0.0.1:8765
from chrome not reachable
(Driver info: chromedriver=2.12.301326 (093c7e07b4a916b690e784b0374c7f618f1ea4be),platform=Mac OS X 10.10.1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.64 seconds
I'm not sure what I have to do so that chrome would connect to server.
I did try:
Running chromedriver on that port ./chromedriver_2.11 --port=8765
Running chrome with --remote-debugging-port=8765
But I have no other ideas how to start a chrome debug server.
Useful links that I did try that that did not work for me:
Remote debugging protocol
Remotely debugging Chrome Desktop
Chromedriver Capabilities (aka ChromeOptions)
Update 1 Forcing Chromedriver to use a Chrome instance with remote debugging on
Run a new Chrome instance as in Mozilla article
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --no-first-run --no-default-browser-check --user-data-dir=$(mktemp -d -t 'chrome-remote_data_dir')
In intern set
intern.capabilities = {
'selenium-version': '2.44.0'
, 'chromeOptions': {
debuggerAddress: '127.0.0.1:9222'
}
};
Now when you run Intern tests Intern will use your previously open Chrome instance. Now you can open localhost:9222 and you'll see that you can debug that tab in which tests run. However for me I'm just able to see that remote tab, but clicking on it does nothing.
I also tried Firefox WebIDE. I tried to connect to localhost:9222, it starts to load and after some time it says that it can't connect.
I tried something similar this evening, without using a framework. I opened a webdriver session & added the remote debugger capabilities.
It seems that it is not possible to run a webdriver session & remote debug at the same time. I asked some Google guys to verify that, but haven't received an answer yet.
I am trying to use Chrome browser with my Test cases. Same tests work fine with Firefox and PhantomJs.
However , Chrome browser starts but never opens a page.
I have installed
1. Chromdriver : port=9515 version=19.0.1068.0
2. Chrome : Version : 37.0.2062.120 (64-bit)
3. Selenium: Version : 2.42.1
4. RobotFramework : Version : 2.8.5
I think I have Paths variables configured accordingly as well.
google-chrome , starts Chrome
chromedriver , starts chromeDriver
Following line is responsible for starting chrome and opening page.
*** Variables ***
${BROWSER} Chrome
${MY-URL} http://www.google.com/
Open Browser | ${MY-URL} | ${BROWSER}
Errors :
Chrome:
WebDriverException: Message: u'Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date. Using Chrome binary at: /opt/google/chrome/google-chrome'
WebDriver Logs Shows Error
Initializing session with capabilities {
"browserName": "chrome",
"chromeOptions": {
"args": [ ],
"extensions": [ ]
},
"javascriptEnabled": true,
"platform": "ANY",
"version": ""
}
[1.001][INFO]: Launching chrome: /opt/google/chrome/google-chrome --disable-hang-monitor --disable-prompt-on-repost --dom-automation --full-memory-crash-report --no-default-browser-check --no-first-run --ignore-certificate-errors --homepage=about:blank
[46.004][SEVERE]: Failed to initialize connection
<br><br>
Can someone point something I am missing ?
Anyother way of debuging the problem ? Any Clue will be good.
Have you put chromedriver in your PATH ?
And do you run the test with current user or with root ?
Selenium needs chromedriver to call chrome, so you can download it from google.com and put it in /usr/bin, or just update your PATH environment variable.
Then, on Debian, root can't (otherwise with errors) call google-chrome browser, so try it with your account.
Hope it helpful.
NODE,
Please re-check your web driver, delete chrome web driver and download new web driver: Here
Check your VARIABLE NAME again! Do NOT use the "-" character to set a variable name like ${MY-URL}! You should change it => ${MY_URL}
You can try to turn of UAC or/and Firewall and try again.
As i know, when you use selenium2library, you don't need to set path to web driver(!?)
Hope it helpful.