Repository: flutter
Issue: [Web]App crashes on load on Chromium browser
Labels: c: new feature,tool,platform-web,a: build,has reproducible steps,P3,found in release: 2.10,found in release: 2.11,team-web,triaged-web

## Steps to Reproduce

For context, we are targeting displays that have Chromium 56 embedded into them, so the target is static and can't be updated.

1. Get a copy of Chromium 56 to test on (Mac: https://sourceforge.net/projects/osxportableapps/files/Chromium/).
2. Build any flutter app for web with any flutter version after 2.5.3 and try to run it from that version of Chromium.
3. Remove the part of the index.html file that would load the service to by pass several errors.
4. Try again.

**Expected results:** 
Would expect the app to load and run.

**Actual results:** 
The window is blank and in the console you fine the following error:
```
Uncaught Error: SyntaxError: Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to parse the rule '    .flt-text-editing::placeholder {
      opacity: 0;
    }
    '.
    at Object.ahp (main.dart.js:415)
    at CE.dH (main.dart.js:21399)
    at Object.fy (main.dart.js:399)
    at Object.av5 (main.dart.js:1215)
    at main.dart.js:7339
    at a8e.a (main.dart.js:5076)
    at a8e.$2 (main.dart.js:30356)
    at Object.L (main.dart.js:5062)
    at Object.rb (main.dart.js:7357)
    at Object.avR (main.dart.js:7334)
```

![](https://cdn.discordapp.com/attachments/530797119389564939/942875199265722491/Screen_Shot_2022-02-14_at_2.07.18_PM.png)

To get it to work you have to revert to flutter version 2.5.3 and build with `--web-renderer html`.

<details>
<summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              const Text(
                'You have pushed the button this many times:',
              ),
            ],
          ),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () {},
          tooltip: 'Increment',
          child: const Icon(Icons.add),
        ), // This trailing comma makes auto-formatting nicer for build methods.
      ),
    );
  }
}
```

modified index.html:
```html
<!DOCTYPE html>
<html>
<head>
  <base href="/">

  <meta charset="UTF-8">
  <meta content="IE=Edge" http-equiv="X-UA-Compatible">
  <meta name="description" content="A new Flutter project.">

  <!-- iOS meta tags & icons -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="newthing">
  <link rel="apple-touch-icon" href="icons/Icon-192.png">

  <!-- Favicon -->
  <link rel="icon" type="image/png" href="favicon.png"/>

  <title>newthing</title>
  <link rel="manifest" href="manifest.json">
</head>
<body>
  <script>
    var serviceWorkerVersion = '2146141352';
    var scriptLoaded = false;
    function loadMainDartJs() {
      if (scriptLoaded) {
        return;
      }
      scriptLoaded = true;
      var scriptTag = document.createElement('script');
      scriptTag.src = 'main.dart.js';
      scriptTag.type = 'application/javascript';
      document.body.append(scriptTag);
    }
    loadMainDartJs();
  </script>
</body>
</html>
```

</details>

<details>
  <summary>Logs</summary>

To host the app I'm using `python3 -m http.server` in the `/build/web` folder so that I can test it in a different browser than the default. So no logs from flutter run or the server. However,  there is an error in the console of the browser and I posted it above.

Output of flutter doctor -v:

```
[newthing] flutter doctor -v
[✓] Flutter (Channel stable, 2.10.1, on macOS 12.1 21C52 darwin-arm, locale
    en-US)
    • Flutter version 2.10.1 at /Users/mclark4386/bin/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db747aa133 (5 days ago), 2022-02-09 13:57:35 -0600
    • Engine revision ab46186b24
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/mclark4386/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/mclark4386/sdk
    • ANDROID_SDK_ROOT = /Users/mclark4386/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] VS Code (version 1.64.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.34.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.1 21C52 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Google Chrome 98.0.4758.80
    ! Error: iPhone is not connected. Xcode will continue when iPhone is
      connected. (code -13)

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>