Skip to content

Commit 17b4542

Browse files
authored
[ Tool ] Remove --no-sandbox when launching web apps on Chrome device (flutter#178670)
Fixes flutter#175227
1 parent 43d438f commit 17b4542

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

packages/flutter_tools/lib/src/web/chrome.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,13 @@ class ChromiumLauncher {
245245
// debugging purposes.
246246
// See: https://github.com/flutter/flutter/issues/153928
247247
'--disable-search-engine-choice-screen',
248-
'--no-sandbox',
249248

250-
if (headless) ...<String>['--headless', '--disable-gpu', '--window-size=2400,1800'],
249+
if (headless) ...<String>[
250+
'--no-sandbox',
251+
'--headless',
252+
'--disable-gpu',
253+
'--window-size=2400,1800',
254+
],
251255
...webBrowserFlags,
252256
url,
253257
];

packages/flutter_tools/test/integration.shard/isolated/dart_data_asset_test.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ void main() {
9797
'-d',
9898
device,
9999
'--$mode',
100-
if (device == 'chrome') '--no-web-resources-cdn',
100+
if (device == 'chrome') ...[
101+
'--no-web-resources-cdn',
102+
'--web-browser-flag=--no-sandbox',
103+
],
101104
],
102105
root.path,
103106
<Transition>[

packages/flutter_tools/test/web.shard/chrome_test.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const kChromeArgs = <String>[
3030
'--disable-default-apps',
3131
'--disable-translate',
3232
'--disable-search-engine-choice-screen',
33-
'--no-sandbox',
3433
];
3534

3635
const kCodeCache = <String>['Cache', 'Code Cache', 'GPUCache'];
@@ -536,6 +535,7 @@ void main() {
536535
'--user-data-dir=/.tmp_rand0/flutter_tools_chrome_device.rand0',
537536
'--remote-debugging-port=12345',
538537
...kChromeArgs,
538+
'--no-sandbox',
539539
'--headless',
540540
'--disable-gpu',
541541
'--window-size=2400,1800',
@@ -621,6 +621,7 @@ void main() {
621621
'--user-data-dir=/.tmp_rand0/flutter_tools_chrome_device.rand0',
622622
'--remote-debugging-port=12345',
623623
...kChromeArgs,
624+
'--no-sandbox',
624625
'--headless',
625626
'--disable-gpu',
626627
'--window-size=2400,1800',
@@ -654,6 +655,7 @@ void main() {
654655
'--user-data-dir=/.tmp_rand0/flutter_tools_chrome_device.rand0',
655656
'--remote-debugging-port=12345',
656657
...kChromeArgs,
658+
'--no-sandbox',
657659
'--headless',
658660
'--disable-gpu',
659661
'--window-size=2400,1800',
@@ -691,6 +693,7 @@ void main() {
691693
'--user-data-dir=/.tmp_rand0/flutter_tools_chrome_device.rand0',
692694
'--remote-debugging-port=12345',
693695
...kChromeArgs,
696+
'--no-sandbox',
694697
'--headless',
695698
'--disable-gpu',
696699
'--window-size=2400,1800',

0 commit comments

Comments
 (0)