Skip to content
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

Persistent command window shown when launching from console #714

Closed
srirambv opened this issue Aug 9, 2018 · 6 comments · Fixed by brave/brave-core#945
Closed

Persistent command window shown when launching from console #714

srirambv opened this issue Aug 9, 2018 · 6 comments · Fixed by brave/brave-core#945

Comments

@srirambv
Copy link
Contributor

srirambv commented Aug 9, 2018

Description

Persistent command window shown when launching from console

Steps to Reproduce

  1. Build from master and launch by running npm run start Release in a git bash window
  2. Empty command prompt window pops up which is persistent
  3. Close the command prompt, opens another one
  4. Sometimes closing the command prompt causes a tab to have webview crash

Actual result:

annoying command prompt

Expected result:

Should not retain the command prompt. after browser is launched

Reproduces how often:

100% on Windows

Brave version (about:brave info)

master

Reproducible on current release:

N/A

Website problems only:

  • Does the issue resolve itself when disabling Brave Shields?
  • Is the issue reproducible on the latest version of Chrome?

Additional Information

cc: @emerick @bbondy

@srirambv srirambv added this to the Backlog milestone Aug 9, 2018
@darkdh darkdh self-assigned this Sep 11, 2018
@darkdh
Copy link
Member

darkdh commented Sep 12, 2018

The root cause is
Audio Service get launched as unsandboxed out of process service.
see services/service_manager/sandbox/win/sandbox_win.cc
It is supposed to be in process on all platforms for Chrome and Chromium

// Runs the audio service in a separate process.
const base::Feature kAudioServiceOutOfProcess{
    "AudioServiceOutOfProcess", base::FEATURE_DISABLED_BY_DEFAULT};

// Enables audio service sandbox.
// (Only causes an effect when feature kAudioServiceOutOfProcess is enabled.)
const base::Feature kAudioServiceSandbox{"AudioServiceSandbox",
                                         base::FEATURE_DISABLED_BY_DEFAULT};

But the feature is enabled only on Windows, I printed out the value in

bool AudioServiceOutOfProcess() {
  // Returns true iff kAudioServiceOutOfProcess feature is enabled and if the
  // embedder does not provide its own in-process AudioManager.
  return base::FeatureList::IsEnabled(features::kAudioServiceOutOfProcess) &&
         !GetContentClient()->browser()->OverridesAudioManager();
}

And I can't find the where the feature get enabled in the code. Although we can manually disable it in BraveMainDelegate::BasicStartupComplete, @bbondy suggested we should find out how it get changed.

@darkdh
Copy link
Member

darkdh commented Oct 1, 2018

it is because

    "AudioService": [
        {
            "platforms": [
                "windows"
            ],
            "experiments": [
                {
                    "name": "AudioProcess_LaunchOnStartup_v6",
                    "params": {
                        "teardown_timeout_s": "0"
                    },
                    "enable_features": [
                        "AudioServiceAudioStreams",
                        "AudioServiceLaunchOnStartup",
                        "AudioServiceOutOfProcess"
                    ]
                }
            ]
        },

in testing/variations/fieldtrial_testing_config.json

@emerick
Copy link
Contributor

emerick commented Oct 1, 2018

I feel like we should skip field trials in Brave, otherwise we'll end up with hard-to-repro scenarios.

@darkdh
Copy link
Member

darkdh commented Oct 1, 2018

brave/brave-core#531 (comment)

@darkdh
Copy link
Member

darkdh commented Nov 21, 2018

    "AudioService": [
        {
            "platforms": [
                "linux"
            ],
            "experiments": [
                {
                    "name": "AudioProcess_LaunchOnStartup_v6",
                    "params": {
                        "teardown_timeout_s": "0"
                    },
                    "enable_features": [
                        "AudioServiceAudioStreams",
                        "AudioServiceLaunchOnStartup",
                        "AudioServiceOutOfProcess"
                    ]
                }
            ]
        },
        {
            "platforms": [
                "mac",
                "windows"
            ],
            "experiments": [
                {
                    "name": "AudioProcess_LaunchOnStartup_Sandboxed_APM_v8",
                    "params": {
                        "teardown_timeout_s": "0"
                    },
                    "enable_features": [
                        "AudioServiceAudioStreams",
                        "AudioServiceLaunchOnStartup",
                        "AudioServiceOutOfProcess",
                        "AudioServiceSandbox",
                        "WebRtcApmInAudioService"
                    ]
                }
            ]
        },
...
]

now it is all platforms

@btlechowski
Copy link

Verification passed on

Brave 0.59.14 Chromium: 72.0.3626.28 (Official Build) beta(64-bit)
Revision 997b1040b63bac324e815797ba52be0cd8f616ed-refs/branch-heads/3626@{#461}
OS Windows 7

Used Test Plan from brave/brave-core#945

Utility: Audio Service was not found in Task Manager

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment