7

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.

devansvd
  • 889
  • 1
  • 12
  • 23
  • 1
    The banner is just a warning that chrome is less secure in this mode. Some flags do that. https://stackoverflow.com/questions/14215382/got-you-are-using-unsupported-command-line-flag-disable-web-security-stabil – Josh Lee Feb 07 '18 at 13:12
  • 1
    Are you on example.com or subdomain.example.com? – Josh Lee Feb 07 '18 at 13:13
  • @JoshLee not on subdomain. I haven't still figured it out. Btw banner might be a warning, but it says unsupported flag – devansvd Feb 07 '18 at 17:07
  • Open in New Tab, chrome://flags/ then Reset All to Default. – yeshansachithak Jun 28 '20 at 10:58

1 Answers1

2

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.

CletusW
  • 3,890
  • 1
  • 27
  • 42
  • 1
    Also note that the domain you specify must include the port if you need to specify one in the URL bar. – CletusW Apr 17 '18 at 22:35
  • 9
    On Chrome 67 (OS X): not working, results in a `You are using an unsupported command-line flag: --unsafely-treat-insecure-origin-as-secure…` error. – Fabien Snauwaert Jun 11 '18 at 18:37
  • 1
    I'm on Linux Chrome 73.0.3683.103 and it also doesn't work for me. I'm getting a "You are using unsupported command-line flag.." error and the supplied host is still assumed insecure. – Íhor Mé Jun 04 '19 at 10:02
  • 1
    @ÍhorMé drop the quotes. **Bad:** `--unsafely-treat-insecure-origin-as-secure="http://example.com"`. **Working:** `--unsafely-treat-insecure-origin-as-secure=http://example.com` – dziku86 Dec 12 '20 at 20:49
  • Thanks, will try that next time – Íhor Mé Jan 01 '21 at 22:48