run chrome 30 without sandbox - google-chrome

I'm trying to run chrome 30, in Linux, from the command line (executing google-chrome file of the version downloaded and unpacked in a folder).
If i run it without the option --no-sandbox the result is the following
[24419:24419:1016/012228:FATAL:zygote_host_impl_linux.cc(142)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/user/user.browsers/chrome-30/opt/google/chrome/chrome-sandbox is owned by root and has mode 4755.
./chrome-30.sh: line 5: 24419 Aborted (core dumped) $CHROME_FOLDER/google-chrome
If I run it with the option --no-sandbox, following also this procedure to configure it, the result is the error:
È stata creata una nuova finestra nella sessione corrente del browser.
[1016/012454:ERROR:nacl_helper_linux.cc(269)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
This last procedure works fine with chrome v31.
Any help?

If you have root access, you should set up the SUID sandbox as per these instructions, and run without the --no-sandbox option.
If you don't have root access, you cannot set up a SUID sandbox and you have to use the --no-sandbox option, but only use it for testing because it is a security risk.
In your case, it looks like you tried running a new Chrome window with --no-sandbox while another session was already running (that's what the message in Italian says). Try closing the existing session before starting a new one. To close the existing session, find the Chrome icon in the system tray, right click it and choose Exit. If you don't see the system tray icon, you can also try killall google-chrome or killall chromium, depending on which version you're using.

This error message...
[24419:24419:1016/012228:FATAL:zygote_host_impl_linux.cc(142)] The SUID sandbox helper binary was found, but is not configured correctly.
Rather than run without sandboxing I'm aborting now.
You need to make sure that /home/user/user.browsers/chrome-30/opt/google/chrome/chrome-sandbox is owned by root and has mode 4755.
./chrome-30.sh: line 5: 24419 Aborted (core dumped) $CHROME_FOLDER/google-chrome
...implies that the program was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
As per the discussion in Issue 400842: Chromium, if you have installed Chromium v35 (or later) and your cpu doesn't have the SSE2 instruction set, e.g. AthlonXP, Pentium III, etc, then Chromium can't be initiated successfully. All the new Chromium browsers from version 35 onwards need SSE2. Any Chromium version earlier than 35 should run on such a system without any issue.
To enforce these measures, Chromium team have closed the issue as Status: WontFix and mentioned:
If you really want to build Chromium without SSE2, you are welcome to apply your own patches and build your own browser however you like, but the Chromium project is not accepting patches to build without SSE2.
Further, this feature was successfully tested in AMD Athlon 3400+ desktop with Lubuntu 14.04.2 and Chrome seems to work fine. But on an older AMD Athlon 1300 without SSE, Chrome now courteously displays a message that "my hardware does not support it".

In mac you can run the below command to run the chrome in sandbox mode. This will open the chrome and supress the security settings. This can be used for testing API's etc from angular or ionic
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security --user-data-dir=$HOME/chrome-in-sandbox-mode

Related

Chrome nativeMessaging example fails on Windows

I downloaded the official Chrome nativeMessaging example to test it out.
To do this, I installed the app from chrome://extensions, by choosing Load Unpacked. No problems so far.
I then installed the host. I'm using Windows 7, so I ran install_host.bat, which claimed that "The operation completed successfully." However, when I go to chrome://apps/ and click the Connect button, I get this error:
Failed to connect: Native host has exited.
Is there some reason this would happen? Restarting Chrome did not fix the issue, nor did uninstalling and then reinstalling the host program.
(I noticed that native-messaging-example-host.bat requires Python 2, so I modified it to run Python 2 explicitly. If I run native-messaging-example-host.bat from the command line, it pops up a little example program of its own with a GUI and seems to work correctly.)
Turns out I was using a non-standard character in the path leading to the host executable. This wouldn't be a problem for any other program, but Chrome's native messaging API doesn't like it, I guess.
By the way, the documentation on setting up this example is near-nonexistent, but this stack overflow link has some useful info: Chrome Extension NativeMessaging 'connectNative' undefined

Does headless Chrome auto update?

Does Chrome update itself when running in headless mode by selenium?
It seems, it is not updating, probably because of --disable-background-networking switch set by Selenium by default. I want to ensure that's indeed the case. If there any reference in documentation explaining either auto-update behavior or meaning of switches and their impact? So far best I've found is list with all command line Chrome switches with some comments, but it is still not clear.
No, Chrome Browser Client doesn't update itself when running in headless mode by selenium.
As per Getting Started with Headless Chrome the Headless Chrome is the server environment where you don't need a visible UI shell.
If you've got Chrome 59+ installed, you start Chrome with the --headless flag as follows:
chrome \
--headless \ # Runs Chrome in headless mode.
--disable-gpu \ # Temporarily needed if running on Windows.
chrome should always point to your installation of Chrome. Of course, the exact location varies from platform to platform.
So until and unless the original Chrome Browser is automatically/manually updated, Chrome Browser Client doesn't get updated.
TL;DR
--disable-background-networking is configured to disable several subsystems which run network requests in the background. This is used when performing network performance testing in order to avoid noise in the measurements.

google-chrome --unsafely-treat-insecure-origin-as-secure command line flag not working

I know this is an existing question, but there is no Clear answer for that.
Google chrome --unsafely-treat-insecure-origin-as-secure, accessing microphone over http not working. It still show the getuserMedia() cannot be accessed over http.
It shows the below warning banner while opening chrome.
"you are using a unsupported command line flag --unsafely-treat-insecure-origin-as-secure="http://example.com". Stability and Security will suffer.
The exact command I run in terminal
google-chrome --unsafely-treat-insecure-origin-as-secure="http://example.com" --user-data-dir="/home/users/myname/chrome-temp-data"
OS Version Ubuntu: 16.04 LTS(64 bit)
Google Chrome Version: Version 63.0.3239.132 (Latest version) (64-bit)
If this is the right command line flag, why am i getting the "unsupported command line" banner ? Is there is anything I'm doing wrong, any thoughts would be much appreciated.
Thanks.
According to the note in point #3 here that flag was broken in Chrome 63 but fixed again in 64.
Also, you no longer need the --user-data-dir flag for it to work.

PNaCl and Google Chrome 40 on Linux: Compile process could not be created

I am trying to run the part1 application in the getting_started directory of the Google Native Client SDK, and I obtain the following message in my browser:
NativeClient: PnaclCoordinator: Compile process could not be created:
When I visit the http://localhost:5103 I see the string "Loading...", but it never changes to "Success".
What do I need to configure in Chrome in order to be able to use Native Client applications?
My setup:
OS: Ubuntu Linux 12.04 LTS
Browser: Google Chrome 40
Pepper: 39
Root access: no
Not an answer, but a question:
Can you try to get some more log messages out of chrome or the NaCl runtime?
Start chrome from the shell with the environment variable NACLVERBOSITY=4 set. That asks chrome to show what is going on in the NaCl runtime when it has created a NaCl process (for the compiler). Typical messages are something like:
Entered NaClCreateServiceSocket
...
NaClSetUpBootstrapChannel
...
Elf header
...
and some more details. If that shows up, we know that NaCl compiler process creation at least made it that far. Could you then post the log somewhere, and I can take a look?
If it doesn't show up, then the problem is earlier in chrome. In this case, running chrome w/ --enable-logging=stderr -v1 (http://www.chromium.org/for-testers/enable-logging) might give some idea of what is going on in chrome before NaCl process creation.
Same issue.
I changed the chrome://flags settings for NaCl for debugging but we are not using the NaCl debugger at all. I set it back to default and it started working. (So I guess that was the problem?)

Chrome: Attaching nacl-gdb to packaged application loaded as an unpacked extension

I have built a simple NaCl application. For running the application I use technique 2 described in Nacl Developer's guide, which means that instead of running a local server I load my application as unpacked extension to chrome. The application runs fine so far.
Now I want to experiment with nacl-gdb and attach my application to it at startup.
In the NaCl Developer's guide there are only instructions on how to attach nacl-gdb on an application that is run with local server(technique 1). I made a search to the internet and I ended up with the following approach in order to attach nacl-gdb for an application that is being ran with technique 2:
I enabled "Native Client GDB-based debugging" flag of Chrome.
I started chrome from a terminal like this: ./chrome "--nacl-gdb=gnome-terminal --
/media/sdb1/leonidasbo/AncientRoot/nacl_sdk/pepper_27/toolchain/linux_x86_glibc/bin/x86_64-nacl-gdb"
When Chrome launched, I navigated to my application.
With this approach, Chrome automatically started nacl-gdb when I opened my application.
However nacl-gdb tried to attach but with no success. The output was the following:
*This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=x86_64-nacl".
Reading symbols from /opt/google/chrome/nacl_irt_x86_64.nexe...(no debugging symbols found)...done.
Don't know how to attach. Try "help target".
(gdb)*
It seems that gdb cannot attach to my application. I tried executing "target exec /path/to/my.nexe", but nothing changed.
Am I missing something here? Is there any other way to debug applications loaded as unpacked extensions with nacl-gdb?
My OS is Ubuntu 12.04 and I am using pepper_27 of nacl_sdk. Chrome version is 27.0.1453.93.
Thanks
I assume you were using this guide, which I was using earlier as well. It is out of date. These are the real instructions. It seems that the way you attach the debugger has completely changed, and it is no longer possible to use --nacl-gdb (that is planned for removal). You must manually attach the debugger by following these steps.
The full guide is here, but I'll summarize:
Launch Chrome with chrome --enable-nacl --enable-nacl-debug --no-sandbox --disable-hang-monitor.
Run <NACL_SDK_ROOT>/toolchain/win_x86_newlib/bin/x86_64-nacl-gdb (with no arguments).
Enter these commands into the gdb prompt:
(gdb) nacl-manifest <path-to-your-.nmf-file>
(gdb) nacl-irt <CHROME-DIR>/nacl_irt_x86_64.nexe
(gdb) target remote localhost:4014
Now you can use gdb as normal. (If you just want to run the application until it crashes, start by typing continue.)