Skip to content

[Flutter Web] compositing error with SweepGradient, RadialGradient decoration #41389

@maryx

Description

@maryx

Steps to Reproduce

  1. Build basic Flutter app (flutter create myapp) on Flutter Web (chrome). Works fine.
  2. Replace the body with this background widget:
final background = Container(
  decoration: BoxDecoration(
    gradient: SweepGradient(
      center: FractionalOffset.center,
      startAngle: -(math.pi / 2),
      endAngle: math.pi * 2 - (math.pi / 2),
      colors: const <Color>[
        Color(0xFF4285F4), // blue
        Color(0xFF34A853), // green
        Color(0xFFFBBC05), // yellow
        Color(0xFFEA4335), // red
        Color(0xFF4285F4), // blue
      ],
      stops: const <double>[0.0, 0.25, 0.5, 0.75, 1.0],
    ),
  ),
);
  1. Run flutter run -d <emulator>. You get this:
    Screenshot from 2019-09-26 10-15-05

  2. run flutter run -d chrome. You get an error and no UI on screen.

Logs

$ flutter run -d chrome --verbose
[  +18 ms] executing: [REDACTED_DIRECTORY] git -c log.showSignature=false log -n 1
--pretty=format:%H
[  +41 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 9bd02a1787bd264fde13a445a900ca28d08e3cef
[        ] executing: [REDACTED_DIRECTORY] git describe --match v*.*.* --first-parent --long
--tags
[  +23 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.10.5-73-g9bd02a1787
[   +9 ms] executing: [REDACTED_DIRECTORY] git rev-parse --abbrev-ref --symbolic @{u}
[   +7 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/master
[   +2 ms] executing: [REDACTED_DIRECTORY] git ls-remote --get-url origin
[   +6 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +52 ms] executing: [REDACTED_DIRECTORY] git rev-parse --abbrev-ref HEAD
[   +9 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[  +78 ms] executing: REDACTED_DIRECTORY/Android/Sdk/platform-tools/adb devices -l
[   +9 ms] Exit code 0 from: REDACTED_DIRECTORY/Android/Sdk/platform-tools/adb devices -l
[        ] List of devices attached
[  +21 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ +248 ms] Launching lib/main.dart on Chrome in debug mode...
[   +1 ms] Building application for the web...
[+10170 ms] Starting daemon...
[ +135 ms] Initializing inputs
[   +5 ms] Reading cached asset graph...
[ +137 ms] Reading cached asset graph completed, took 134ms

[ +195 ms] Checking for updates since last build...
[ +460 ms] Checking for updates since last build completed, took 460ms

[   +6 ms] Initializing inputs
[   +1 ms] Reading cached asset graph...
[        ] Reading cached asset graph completed, took 134ms
[        ] Checking for updates since last build...
[        ] Checking for updates since last build completed, took 460ms
[ +189 ms] Serving DevTools at http://127.0.0.1:36717

[ +603 ms] About to build [web]...
[   +7 ms] Running build...
[ +121 ms] Running build completed, took 53ms

[        ] Caching finalized dependency graph...
[   +4 ms] Caching finalized dependency graph completed, took 93ms

[   +3 ms] Succeeded after 151ms with 0 outputs (0 actions)

[+3241 ms] Failed to load asset at path: packages/build_web_compilers/src/dev_compiler/dart_sdk.js.

Status code: 404

Headers:
{
"date": "Thu, 26 Sep 2019 16:51:54 GMT",
"content-length": "9",
"x-frame-options": "SAMEORIGIN",
"content-type": "text/plain; charset=utf-8",
"x-xss-protection": "1; mode=block",
"x-content-type-options": "nosniff",
"server": "dart:io with Shelf",
"via": "1.1 shelf_proxy"
}

Content:
Not Found

[+1773 ms] Debug service listening on ws://127.0.0.1:43875/ivFmLDnL28Q=

[  +16 ms] Building application for the web... (completed in 17.1s)
[   +1 ms] 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻
[        ] Warning: Flutter's support for building web applications is highly experimental.
[        ] For more information see https://github.com/flutter/flutter/issues/34082.
[        ] 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻 👻
[        ] 🔥  To hot restart (and rebuild state), press "R".
[        ] For a more detailed help message, press "h". To quit, press "q".
[   +6 ms] Debug service listening on ws://127.0.0.1:43875/ivFmLDnL28Q=
[ +419 ms] Another exception was thrown: Assertion failed:
file:////b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/ui/src/ui/compositing.dart:343:12
[ +986 ms] Another exception was thrown: Assertion failed:
file:////b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/ui/src/ui/compositing.dart:343:12
[+1000 ms] Another exception was thrown: Assertion failed:
file:////b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/ui/src/ui/compositing.dart:343:12
[+1136 ms] Another exception was thrown: UnimplementedError
[ +869 ms] Another exception was thrown: Assertion failed:

file:////b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/_engine/engine/surface/surface.dart:1071:14
[ +991 ms] Another exception was thrown: Assertion failed:
file:////b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/ui/src/ui/compositing.dart:343:12
[ +999 ms] Another exception was thrown: Assertion failed:
file:////b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/ui/src/ui/compositing.dart:343:12
[ +999 ms] Another exception was thrown: Assertion failed:
file:////b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/ui/src/ui/compositing.dart:343:12
[+1000 ms] Another exception was thrown: Assertion failed:
file:////b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/ui/src/ui/compositing.dart:343:12
[ +999 ms] Another exception was thrown: Assertion failed:
file:////b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/ui/src/ui/compositing.dart:343:12
[+1000 ms] Another exception was thrown: Assertion failed:
file:////b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/ui/src/ui/compositing.dart:343:12
[ +999 ms] Another exception was thrown: Assertion failed:
file:////b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/ui/src/ui/compositing.dart:343:12
[+1002 ms] Another exception was thrown: Assertion failed:
file:////b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/ui/src/ui/compositing.dart:343:12
[ +999 ms] Another exception was thrown: Assertion failed:

$ flutter analyze
Analyzing clock_competition...                                          
No issues found! (ran in 1.9s)
$ flutter doctor -v
[✓] Flutter (Channel master, v1.10.6-pre.73, on Linux, locale en_US.UTF-8)
    • Flutter version 1.10.6-pre.73 at REDACTED_DIRECTORY/github-forks/flutter
    • Framework revision 9bd02a1787 (20 hours ago), 2019-09-25 13:55:29 -0700
    • Engine revision 0bfca375b3
    • Dart version 2.6.0 (build 2.6.0-dev.2.0 69b5681546)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at  REDACTED_DIRECTORY/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-stable, build-tools 28.0.3
    • Java binary at: /opt/android-studio-with-blaze-3.5/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Android Studio (version 3.3)
    • Android Studio at  REDACTED_DIRECTORY/Downloads/android-studio
    • Flutter plugin version 34.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] Android Studio (version 3.4)
    • Android Studio at /opt/android-studio-with-blaze-3.4
    • Flutter plugin version 37.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)

[✓] Android Studio (version 3.5)
    • Android Studio at /opt/android-studio-with-blaze-3.5
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.23.1)
    • VS Code at /usr/share/code
    • Flutter extension version 2.14.0

[✓] Connected device (2 available)
    • Chrome • chrome • web-javascript • Google Chrome 77.0.3865.90
    • Server • web    • web-javascript • Flutter Tools

• No issues found!

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listc: renderingUI glitches reported at the engine/skia or impeller rendering levelcustomer: junecustomer: web10dependency: skiaSkia team may need to help use: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webe: web_htmlHTML rendering backend for Webengineflutter/engine related. See also e: labels.found in release: 1.20Found to occur in 1.20has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specifically

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions