Skip to content

[Web][Canvaskit]: Rendering breaks when several links are on the page #87245

@stx

Description

@stx

If you create too many links (using Link()) you will receive this error:

Flutter was unable to create enough overlay surfaces. This is usually caused by too many platform views being displayed at once. You may experience incorrect rendering.

import 'package:flutter/material.dart';
import 'package:url_launcher/link.dart';

void main() => runApp(
      MaterialApp(
        home: Material(
          child: ListView(
            children: List<Widget>.generate(100, (int i) {
              return Link(
                uri: Uri.parse('https://google.com'),
                builder: (_, __) {
                  return Text(
                    '$i',
                    style: const TextStyle(
                      fontSize: 26,
                    ),
                  );
                },
              );
            }),
          ),
        ),
      ),
    );

Widgets disappear at random. Scroll the example code up and down.

flutter doctor -v
[✓] Flutter (Channel master, 2.5.0-2.0.pre.63, on macOS 11.3.1 20E241 darwin-x64, locale en-US)
    • Flutter version 2.5.0-2.0.pre.63 at /Users/james/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 246f313c51 (12 minutes ago), 2021-07-28 22:09:02 -0400
    • Engine revision 1eeb722a6c
    • Dart version 2.14.0 (build 2.14.0-361.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Xcode 13.0, Build version 13A5192j
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
    • 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.8+10-b944.6916264)

[✓] VS Code (version 1.58.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.24.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 11.3.1 20E241 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 92.0.4515.107

! Doctor found issues in 1 category.

image

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listc: renderingUI glitches reported at the engine/skia or impeller rendering levele: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.f: scrollingViewports, list views, slivers, etc.found in release: 2.5Found to occur in 2.5frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: url_launcherPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.platform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions