Skip to content

A few hot restarts in a row cause a canvaskit failure #90236

Closed
flutter-team-archive/engine
#28675

Description

@annagrin

Repro:

  • open examples/hello_world in VSCode, chose web platform
  • set a breakpoint on line that calls runApp
  • debug
  • when the breakpoint is hit, click hot restart a few times in a row

The app shows "hello world" but continues to throw the assertion after that.

VSCode debug console output

Error: Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/canvaskit/surface_factory.dart:157:12
_cache.contains(surface)
is not true
    at Object.throw_ [as throw] (http://localhost:56119/dart_sdk.js:5081:11)
    at Object.assertFailed (http://localhost:56119/dart_sdk.js:5006:15)
    at _engine.SurfaceFactory.new.isLive (http://localhost:56119/dart_sdk.js:148814:51)
    at _engine.Surface.new.[_contextLostListener] (http://localhost:56119/dart_sdk.js:148511:19)
Restarted application in 80ms.

Chrome console output

Chrome console output
This app is linked to the debug service: ws://127.0.0.1:56210/YikfKpifYBY%3D/ws
canvaskit.js:180 WARNING: Too many active WebGL contexts. Oldest context will be lost.
a.wf.a.getContext @ canvaskit.js:180
ha @ canvaskit.js:180
a.GetWebGLContext @ canvaskit.js:15
[_createNewCanvas] @ surface.dart:296
createOrUpdateSurfaces @ surface.dart:175
acquireFrame @ surface.dart:105
draw @ rasterizer.dart:27
render @ platform_dispatcher.dart:577
render @ window.dart:93
compositeFrame @ view.dart:229
drawFrame @ binding.dart:457
drawFrame @ binding.dart:883
[_handlePersistentFrameCallback] @ binding.dart:319
[_invokeFrameCallback] @ binding.dart:1148
handleDrawFrame @ binding.dart:1084
(anonymous) @ binding.dart:863
internalCallback @ isolate_helper.dart:48
setTimeout (async)
_isolate_helper.TimerImpl.new @ isolate_helper.dart:55
_createTimer @ async_patch.dart:186
createTimer @ zone.dart:1711
new @ timer.dart:45
run @ timer.dart:81
scheduleWarmUpFrame @ binding.dart:861
(anonymous) @ binding.dart:1037
runApp @ binding.dart:1037
main$ @ main.dart:8
main @ web_entrypoint.dart:16
(anonymous) @ async_patch.dart:45
runUnary @ zone.dart:1687
handleValue @ future_impl.dart:160
handleValueCallback @ future_impl.dart:767
_propagateToListeners @ future_impl.dart:796
[_completeWithValue] @ future_impl.dart:602
(anonymous) @ future.dart:401
runUnary @ zone.dart:1687
handleValue @ future_impl.dart:160
handleValueCallback @ future_impl.dart:767
_propagateToListeners @ future_impl.dart:796
[_completeWithValue] @ future_impl.dart:602
(anonymous) @ future_impl.dart:640
_microtaskLoop @ schedule_microtask.dart:40
_startMicrotaskLoop @ schedule_microtask.dart:49
(anonymous) @ async_patch.dart:166
Promise.then (async)
_scheduleImmediateWithPromise @ async_patch.dart:164
_scheduleImmediate @ async_patch.dart:136
_scheduleAsyncCallback @ schedule_microtask.dart:69
_rootScheduleMicrotask @ zone.dart:1495
scheduleMicrotask @ zone.dart:1707
[_asyncCompleteWithValue] @ future_impl.dart:639
[_asyncComplete] @ future_impl.dart:634
complete @ future_impl.dart:46
(anonymous) @ js_util.dart:261
Promise.then (async)
promiseToFuture @ js_util.dart:273
[dartx.arrayBuffer] @ html_dart2js.dart:1683
[_getArrayBuffer] @ fonts.dart:176
runUnary @ zone.dart:1687
handleValue @ future_impl.dart:160
handleValueCallback @ future_impl.dart:767
_propagateToListeners @ future_impl.dart:796
[_completeWithValue] @ future_impl.dart:602
(anonymous) @ future_impl.dart:640
_microtaskLoop @ schedule_microtask.dart:40
_startMicrotaskLoop @ schedule_microtask.dart:49
(anonymous) @ async_patch.dart:166
Promise.then (async)
_scheduleImmediateWithPromise @ async_patch.dart:164
_scheduleImmediate @ async_patch.dart:136
_scheduleAsyncCallback @ schedule_microtask.dart:69
_rootScheduleMicrotask @ zone.dart:1495
scheduleMicrotask @ zone.dart:1707
[_asyncCompleteWithValue] @ future_impl.dart:639
[_asyncComplete] @ future_impl.dart:634
complete @ future_impl.dart:46
(anonymous) @ js_util.dart:261
Promise.then (async)
promiseToFuture @ js_util.dart:273
[dartx.fetch] @ html_dart2js.dart:32916
httpFetch @ util.dart:559
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
httpFetch @ util.dart:558
_registerFont @ fonts.dart:148
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
[_registerFont] @ fonts.dart:145
registerFonts @ fonts.dart:136
(anonymous) @ async_patch.dart:45
runUnary @ zone.dart:1687
handleValue @ future_impl.dart:160
handleValueCallback @ future_impl.dart:767
_propagateToListeners @ future_impl.dart:796
[_completeWithValue] @ future_impl.dart:602
(anonymous) @ future_impl.dart:640
_microtaskLoop @ schedule_microtask.dart:40
_startMicrotaskLoop @ schedule_microtask.dart:49
(anonymous) @ async_patch.dart:166
Promise.then (async)
_scheduleImmediateWithPromise @ async_patch.dart:164
_scheduleImmediate @ async_patch.dart:136
_scheduleAsyncCallback @ schedule_microtask.dart:69
_rootScheduleMicrotask @ zone.dart:1495
scheduleMicrotask @ zone.dart:1707
[_asyncCompleteWithValue] @ future_impl.dart:639
[_asyncComplete] @ future_impl.dart:634
complete @ future_impl.dart:46
(anonymous) @ html_dart2js.dart:18196
_checkAndCall @ operations.dart:334
dcall @ operations.dart:339
(anonymous) @ html_dart2js.dart:37308
load (async)
[_addEventListener] @ html_dart2js.dart:15823
[dartx.addEventListener] @ html_dart2js.dart:15811
[_tryResume] @ html_dart2js.dart:37362
_EventStreamSubscription.new @ html_dart2js.dart:37309
listen @ html_dart2js.dart:37209
request @ html_dart2js.dart:18183
load @ assets.dart:58
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
load @ assets.dart:54
registerFonts @ fonts.dart:95
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
registerFonts @ fonts.dart:91
webOnlySetAssetManager @ initialization.dart:68
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
webOnlySetAssetManager @ initialization.dart:49
_initializePlatform @ initialization.dart:33
(anonymous) @ async_patch.dart:45
runUnary @ zone.dart:1687
handleValue @ future_impl.dart:160
handleValueCallback @ future_impl.dart:767
_propagateToListeners @ future_impl.dart:796
[_completeWithValue] @ future_impl.dart:602
(anonymous) @ future_impl.dart:640
_microtaskLoop @ schedule_microtask.dart:40
_startMicrotaskLoop @ schedule_microtask.dart:49
(anonymous) @ async_patch.dart:166
Promise.then (async)
_scheduleImmediateWithPromise @ async_patch.dart:164
_scheduleImmediate @ async_patch.dart:136
_scheduleAsyncCallback @ schedule_microtask.dart:69
_rootScheduleMicrotask @ zone.dart:1495
scheduleMicrotask @ zone.dart:1707
[_asyncCompleteWithValue] @ future_impl.dart:639
[_asyncComplete] @ future_impl.dart:634
complete @ future_impl.dart:46
initializeCanvasKit @ initialization.dart:108
_initializePlatform @ initialization.dart:29
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
_initializePlatform @ initialization.dart:21
webOnlyInitializePlatform @ initialization.dart:11
main @ web_entrypoint.dart:12
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
main$ @ web_entrypoint.dart:11
(anonymous) @ main_module.bootstrap.js:19
window.$dartRunMain @ main_module.bootstrap.js:18
(anonymous) @ VM964:1
runMain @ client.js:8453
(anonymous) @ client.js:24361
(anonymous) @ client.js:4462
call$2 @ client.js:11512
call$1 @ client.js:11500
runUnary$2$2 @ client.js:13164
call$0 @ client.js:11928
_Future__propagateToListeners @ client.js:4604
_completeWithValue$1 @ client.js:11770
complete$1 @ client.js:11483
_asyncReturn @ client.js:4434
(anonymous) @ client.js:24398
(anonymous) @ client.js:4462
call$2 @ client.js:11512
call$1 @ client.js:11500
runUnary$2$2 @ client.js:13164
call$0 @ client.js:11928
_Future__propagateToListeners @ client.js:4604
_completeWithValue$1 @ client.js:11770
call$0 @ client.js:11856
_microtaskLoop @ client.js:4668
_startMicrotaskLoop @ client.js:4674
call$1 @ client.js:11388
invokeClosure @ client.js:1524
(anonymous) @ client.js:1543
childList (async)
call$1 @ client.js:11398
_scheduleAsyncCallback @ client.js:4688
_rootScheduleMicrotask @ client.js:4879
scheduleMicrotask$1 @ client.js:13189
_asyncCompleteWithValue$1 @ client.js:11792
_asyncComplete$1 @ client.js:11786
complete$1 @ client.js:11566
call$1 @ client.js:17001
call$1 @ client.js:18043
invokeClosure @ client.js:1524
(anonymous) @ client.js:1543
load (async)
_addEventListener$3 @ client.js:16886
addEventListener$3 @ client.js:16880
addEventListener$3$x @ client.js:3999
_tryResume$0 @ client.js:18025
_EventStreamSubscription$ @ client.js:8549
HttpRequest_request @ client.js:8524
(anonymous) @ client.js:24389
(anonymous) @ client.js:4462
call$2 @ client.js:11512
_asyncStartSync @ client.js:4426
_getDigests$0 @ client.js:24401
(anonymous) @ client.js:24322
(anonymous) @ client.js:4462
call$2 @ client.js:11512
call$1 @ client.js:11500
runUnary$2$2 @ client.js:13164
call$0 @ client.js:11928
_Future__propagateToListeners @ client.js:4604
_completeWithValue$1 @ client.js:11770
call$0 @ client.js:11856
_microtaskLoop @ client.js:4668
_startMicrotaskLoop @ client.js:4674
call$1 @ client.js:11388
invokeClosure @ client.js:1524
(anonymous) @ client.js:1543
childList (async)
call$1 @ client.js:11398
_scheduleAsyncCallback @ client.js:4688
_rootScheduleMicrotask @ client.js:4879
scheduleMicrotask$1 @ client.js:13189
_asyncCompleteWithValue$1 @ client.js:11792
_asyncComplete$1 @ client.js:11786
complete$1 @ client.js:11566
eval @ VM920:3
Primitives_applyFunction @ client.js:1194
Function_apply @ client.js:5900
_callDartFunctionFast @ client.js:7907
(anonymous) @ client.js:7898
Promise.then (async)
then$2 @ client.js:9223
then$2$x @ client.js:4089
(anonymous) @ client.js:24314
(anonymous) @ client.js:4462
call$2 @ client.js:11512
_asyncStartSync @ client.js:4426
restart$0 @ client.js:24371
(anonymous) @ client.js:24249
(anonymous) @ client.js:4462
call$2 @ client.js:11512
_asyncStartSync @ client.js:4426
hotRestart$0 @ client.js:24263
call$0 @ client.js:23995
Primitives_applyFunction @ client.js:1191
Function_apply @ client.js:5900
_callDartFunctionFast @ client.js:7907
(anonymous) @ client.js:7898
(anonymous) @ VM963:1
Show 46 more frames
errors.dart:202 Uncaught Error: Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/canvaskit/surface_factory.dart:157:12
_cache.contains(surface)
is not true
    at Object.throw_ [as throw] (errors.dart:251)
    at Object.assertFailed (errors.dart:29)
    at _engine.SurfaceFactory.new.isLive (surface_factory.dart:157)
    at _engine.Surface.new.[_contextLostListener] (surface.dart:233)
DartError @ errors.dart:202
throw_ @ errors.dart:251
assertFailed @ errors.dart:29
isLive @ surface_factory.dart:157
[_contextLostListener] @ surface.dart:233
canvaskit.js:180 WARNING: Too many active WebGL contexts. Oldest context will be lost.
a.wf.a.getContext @ canvaskit.js:180
ha @ canvaskit.js:180
a.GetWebGLContext @ canvaskit.js:15
[_createNewCanvas] @ surface.dart:296
createOrUpdateSurfaces @ surface.dart:175
acquireFrame @ surface.dart:105
draw @ rasterizer.dart:27
render @ platform_dispatcher.dart:577
render @ window.dart:93
compositeFrame @ view.dart:229
drawFrame @ binding.dart:457
drawFrame @ binding.dart:883
[_handlePersistentFrameCallback] @ binding.dart:319
[_invokeFrameCallback] @ binding.dart:1148
handleDrawFrame @ binding.dart:1084
(anonymous) @ binding.dart:863
internalCallback @ isolate_helper.dart:48
setTimeout (async)
_isolate_helper.TimerImpl.new @ isolate_helper.dart:55
_createTimer @ async_patch.dart:186
createTimer @ zone.dart:1711
new @ timer.dart:45
run @ timer.dart:81
scheduleWarmUpFrame @ binding.dart:861
(anonymous) @ binding.dart:1037
runApp @ binding.dart:1037
main$ @ main.dart:8
main @ web_entrypoint.dart:16
(anonymous) @ async_patch.dart:45
runUnary @ zone.dart:1687
handleValue @ future_impl.dart:160
handleValueCallback @ future_impl.dart:767
_propagateToListeners @ future_impl.dart:796
[_completeWithValue] @ future_impl.dart:602
(anonymous) @ future.dart:401
runUnary @ zone.dart:1687
handleValue @ future_impl.dart:160
handleValueCallback @ future_impl.dart:767
_propagateToListeners @ future_impl.dart:796
[_completeWithValue] @ future_impl.dart:602
(anonymous) @ future_impl.dart:640
_microtaskLoop @ schedule_microtask.dart:40
_startMicrotaskLoop @ schedule_microtask.dart:49
(anonymous) @ async_patch.dart:166
Promise.then (async)
_scheduleImmediateWithPromise @ async_patch.dart:164
_scheduleImmediate @ async_patch.dart:136
_scheduleAsyncCallback @ schedule_microtask.dart:69
_rootScheduleMicrotask @ zone.dart:1495
scheduleMicrotask @ zone.dart:1707
[_asyncCompleteWithValue] @ future_impl.dart:639
[_asyncComplete] @ future_impl.dart:634
complete @ future_impl.dart:46
(anonymous) @ js_util.dart:261
Promise.then (async)
promiseToFuture @ js_util.dart:273
[dartx.arrayBuffer] @ html_dart2js.dart:1683
[_getArrayBuffer] @ fonts.dart:176
runUnary @ zone.dart:1687
handleValue @ future_impl.dart:160
handleValueCallback @ future_impl.dart:767
_propagateToListeners @ future_impl.dart:796
[_completeWithValue] @ future_impl.dart:602
(anonymous) @ future_impl.dart:640
_microtaskLoop @ schedule_microtask.dart:40
_startMicrotaskLoop @ schedule_microtask.dart:49
(anonymous) @ async_patch.dart:166
Promise.then (async)
_scheduleImmediateWithPromise @ async_patch.dart:164
_scheduleImmediate @ async_patch.dart:136
_scheduleAsyncCallback @ schedule_microtask.dart:69
_rootScheduleMicrotask @ zone.dart:1495
scheduleMicrotask @ zone.dart:1707
[_asyncCompleteWithValue] @ future_impl.dart:639
[_asyncComplete] @ future_impl.dart:634
complete @ future_impl.dart:46
(anonymous) @ js_util.dart:261
Promise.then (async)
promiseToFuture @ js_util.dart:273
[dartx.fetch] @ html_dart2js.dart:32916
httpFetch @ util.dart:559
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
httpFetch @ util.dart:558
_registerFont @ fonts.dart:148
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
[_registerFont] @ fonts.dart:145
registerFonts @ fonts.dart:136
(anonymous) @ async_patch.dart:45
runUnary @ zone.dart:1687
handleValue @ future_impl.dart:160
handleValueCallback @ future_impl.dart:767
_propagateToListeners @ future_impl.dart:796
[_completeWithValue] @ future_impl.dart:602
(anonymous) @ future_impl.dart:640
_microtaskLoop @ schedule_microtask.dart:40
_startMicrotaskLoop @ schedule_microtask.dart:49
(anonymous) @ async_patch.dart:166
Promise.then (async)
_scheduleImmediateWithPromise @ async_patch.dart:164
_scheduleImmediate @ async_patch.dart:136
_scheduleAsyncCallback @ schedule_microtask.dart:69
_rootScheduleMicrotask @ zone.dart:1495
scheduleMicrotask @ zone.dart:1707
[_asyncCompleteWithValue] @ future_impl.dart:639
[_asyncComplete] @ future_impl.dart:634
complete @ future_impl.dart:46
(anonymous) @ html_dart2js.dart:18196
_checkAndCall @ operations.dart:334
dcall @ operations.dart:339
(anonymous) @ html_dart2js.dart:37308
load (async)
[_addEventListener] @ html_dart2js.dart:15823
[dartx.addEventListener] @ html_dart2js.dart:15811
[_tryResume] @ html_dart2js.dart:37362
_EventStreamSubscription.new @ html_dart2js.dart:37309
listen @ html_dart2js.dart:37209
request @ html_dart2js.dart:18183
load @ assets.dart:58
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
load @ assets.dart:54
registerFonts @ fonts.dart:95
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
registerFonts @ fonts.dart:91
webOnlySetAssetManager @ initialization.dart:68
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
webOnlySetAssetManager @ initialization.dart:49
_initializePlatform @ initialization.dart:33
(anonymous) @ async_patch.dart:45
runUnary @ zone.dart:1687
handleValue @ future_impl.dart:160
handleValueCallback @ future_impl.dart:767
_propagateToListeners @ future_impl.dart:796
[_completeWithValue] @ future_impl.dart:602
(anonymous) @ future_impl.dart:640
_microtaskLoop @ schedule_microtask.dart:40
_startMicrotaskLoop @ schedule_microtask.dart:49
(anonymous) @ async_patch.dart:166
Promise.then (async)
_scheduleImmediateWithPromise @ async_patch.dart:164
_scheduleImmediate @ async_patch.dart:136
_scheduleAsyncCallback @ schedule_microtask.dart:69
_rootScheduleMicrotask @ zone.dart:1495
scheduleMicrotask @ zone.dart:1707
[_asyncCompleteWithValue] @ future_impl.dart:639
[_asyncComplete] @ future_impl.dart:634
complete @ future_impl.dart:46
initializeCanvasKit @ initialization.dart:108
_initializePlatform @ initialization.dart:29
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
_initializePlatform @ initialization.dart:21
webOnlyInitializePlatform @ initialization.dart:11
main @ web_entrypoint.dart:12
runBody @ async_patch.dart:84
_async @ async_patch.dart:123
main$ @ web_entrypoint.dart:11
(anonymous) @ main_module.bootstrap.js:19
window.$dartRunMain @ main_module.bootstrap.js:18
(anonymous) @ VM967:1
runMain @ client.js:8453
(anonymous) @ client.js:24361
(anonymous) @ client.js:4462
call$2 @ client.js:11512
call$1 @ client.js:11500
runUnary$2$2 @ client.js:13164
call$0 @ client.js:11928
_Future__propagateToListeners @ client.js:4604
_completeWithValue$1 @ client.js:11770
complete$1 @ client.js:11483
_asyncReturn @ client.js:4434
(anonymous) @ client.js:24398
(anonymous) @ client.js:4462
call$2 @ client.js:11512
call$1 @ client.js:11500
runUnary$2$2 @ client.js:13164
call$0 @ client.js:11928
_Future__propagateToListeners @ client.js:4604
_completeWithValue$1 @ client.js:11770
call$0 @ client.js:11856
_microtaskLoop @ client.js:4668
_startMicrotaskLoop @ client.js:4674
call$1 @ client.js:11388
invokeClosure @ client.js:1524
(anonymous) @ client.js:1543
childList (async)
call$1 @ client.js:11398
_scheduleAsyncCallback @ client.js:4688
_rootScheduleMicrotask @ client.js:4879
scheduleMicrotask$1 @ client.js:13189
_asyncCompleteWithValue$1 @ client.js:11792
_asyncComplete$1 @ client.js:11786
complete$1 @ client.js:11566
call$1 @ client.js:17001
call$1 @ client.js:18043
invokeClosure @ client.js:1524
(anonymous) @ client.js:1543
load (async)
_addEventListener$3 @ client.js:16886
addEventListener$3 @ client.js:16880
addEventListener$3$x @ client.js:3999
_tryResume$0 @ client.js:18025
_EventStreamSubscription$ @ client.js:8549
HttpRequest_request @ client.js:8524
(anonymous) @ client.js:24389
(anonymous) @ client.js:4462
call$2 @ client.js:11512
_asyncStartSync @ client.js:4426
_getDigests$0 @ client.js:24401
(anonymous) @ client.js:24322
(anonymous) @ client.js:4462
call$2 @ client.js:11512
call$1 @ client.js:11500
runUnary$2$2 @ client.js:13164
call$0 @ client.js:11928
_Future__propagateToListeners @ client.js:4604
_completeWithValue$1 @ client.js:11770
call$0 @ client.js:11856
_microtaskLoop @ client.js:4668
_startMicrotaskLoop @ client.js:4674
call$1 @ client.js:11388
invokeClosure @ client.js:1524
(anonymous) @ client.js:1543
childList (async)
call$1 @ client.js:11398
_scheduleAsyncCallback @ client.js:4688
_rootScheduleMicrotask @ client.js:4879
scheduleMicrotask$1 @ client.js:13189
_asyncCompleteWithValue$1 @ client.js:11792
_asyncComplete$1 @ client.js:11786
complete$1 @ client.js:11566
eval @ VM920:3
Primitives_applyFunction @ client.js:1194
Function_apply @ client.js:5900
_callDartFunctionFast @ client.js:7907
(anonymous) @ client.js:7898
Promise.then (async)
then$2 @ client.js:9223
then$2$x @ client.js:4089
(anonymous) @ client.js:24314
(anonymous) @ client.js:4462
call$2 @ client.js:11512
_asyncStartSync @ client.js:4426
restart$0 @ client.js:24371
(anonymous) @ client.js:24249
(anonymous) @ client.js:4462
call$2 @ client.js:11512
_asyncStartSync @ client.js:4426
hotRestart$0 @ client.js:24263
call$0 @ client.js:23995
Primitives_applyFunction @ client.js:1191
Function_apply @ client.js:5900
_callDartFunctionFast @ client.js:7907
(anonymous) @ client.js:7898
(anonymous) @ VM966:1
Show 46 more frames

Flutter doctor output

flutter doctor -v
[✓] Flutter (Channel master, 2.6.0-6.0.pre.120, on macOS 11.6 20G165 darwin-x64, locale
    en-US)
    • Flutter version 2.6.0-6.0.pre.120 at source/flutter/flutter
    • Upstream repository [email protected]:annagrin/flutter.git
    • Framework revision f10f3e79a6 (76 minutes ago), 2021-09-16 17:57:07 -0400
    • Engine revision 33f5f17bc9
    • Dart version 2.15.0 (build 2.15.0-113.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/annagrin/Library/Android/sdk
    ✗ 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 12.5.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.1

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

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] IntelliJ IDEA Community Edition (version 2021.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 55.1.5
    • Dart plugin version 211.6693.108

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 11.6 20G165 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 93.0.4577.82

! Doctor found issues in 1 category.

Activity

  1. self-assigned this
    on Sep 16, 2021
  2. annagrin commented on Sep 16, 2021

    @annagrin
    ContributorAuthor

    Another bug that looks the same: #90231

  3. changed the title [-]A few hot restarts for in a row cause a canvaskit failure[/-] [+]A few hot restarts in a row cause a canvaskit failure[/+] on Sep 17, 2021
  4. TahaTesser commented on Sep 17, 2021

    @TahaTesser
    Contributor

    HI @annagrin

    Thanks for filing the issue, I can reproduce the issue on the latest master, however current stable, multiple hot restarts lead to a frozen hot restart state (hot restart get stuck).

    Error: Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/canvaskit/surface_factory.dart:157:12
    _cache.contains(surface)
    is not true
        at Object.throw_ [as throw] (http://localhost:40681/dart_sdk.js:5081:11)
        at Object.assertFailed (http://localhost:40681/dart_sdk.js:5006:15)
        at _engine.SurfaceFactory.new.isLive (http://localhost:40681/dart_sdk.js:148814:51)
        at _engine.Surface.new.[_contextLostListener] (http://localhost:40681/dart_sdk.js:148511:19)
    Restarted application in 166ms.
    A fallback font was registered but we cannot retrieve the typeface for it.
    A fallback font was registered but we cannot retrieve the typeface for it.
    flutter doctor -v
    [✓] Flutter (Channel master, 2.6.0-6.0.pre.128, on Zorin OS 16
        5.11.0-34-generic, locale en_US.UTF-8)
        • Flutter version 2.6.0-6.0.pre.128 at /home/taha/Code/flutter_master
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision fa9790ca47 (5 hours ago), 2021-09-17 01:37:03 -0400
        • Engine revision e70febab63
        • Dart version 2.15.0 (build 2.15.0-118.0.dev)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Android SDK at /home/taha/Code/android-sdk
        • Platform android-31, build-tools 31.0.0
        • ANDROID_SDK_ROOT = /home/taha/Code/android-sdk
        • Java binary at: /home/taha/Code/android-studio/jre/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
        • All Android licenses accepted.
    
    [✓] Chrome - develop for the web
        • Chrome at google-chrome
    
    [✓] Linux toolchain - develop for Linux desktop
        • clang version 10.0.0-4ubuntu1
        • cmake version 3.16.3
        • ninja version 1.10.0
        • pkg-config version 0.29.1
    
    [✓] Android Studio (version 2020.3)
        • Android Studio at /home/taha/Code/android-studio
        • Flutter plugin version 60.1.2
        • Dart plugin version 203.8292
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    
    [✓] VS Code
        • VS Code at /snap/code/current
        • Flutter extension version 3.26.0
    
    [✓] Connected device (2 available)
        • Linux (desktop) • linux  • linux-x64      • Zorin OS 16 5.11.0-34-generic
        • Chrome (web)    • chrome • web-javascript • Google Chrome 93.0.4577.82
    
    • No issues found!
    
  5. added
    e: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Web
    engineflutter/engine related. See also e: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    toolAffects the "flutter" command-line tool. See also t: labels.
    and removed
    in triagePresently being triaged by the triage team
    on Sep 17, 2021
  6. annagrin commented on Sep 17, 2021

    @annagrin
    ContributorAuthor

    @TahaTesser

    Thanks for filing the issue, I can reproduce the issue on the latest master, however current stable, multiple hot restarts lead to a frozen hot restart state (hot restart get stuck).

    I believe someone mentioned that in a comment of #89874, but I haven't seen an issue reported for that yet. It is fixed in 2.6.0-5.0.pre and newer though, so I'll wait to see if it is blocking anyone on stable.

  7. KristianBalaj commented on Sep 20, 2021

    @KristianBalaj

    I am experiencing the same issue even on 2.6.0-5.2.pre.

    The initial issue stated that this happens in the debug, but I'm experiencing this even in non-debug run. Also, it starts popping after a few hot restarts.

    flutter doctor -v
    [✓] Flutter (Channel beta, 2.6.0-5.2.pre, on macOS 11.5.2 20G95 darwin-x64, locale en-GB)
        • Flutter version 2.6.0-5.2.pre at /Users/kristian/Documents/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 400608f101 (5 days ago), 2021-09-15 15:50:26 -0700
        • Engine revision 1d521d89d8
        • Dart version 2.15.0 (build 2.15.0-82.2.beta)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Android SDK at /Users/kristian/Library/Android/sdk
        • Platform android-31, build-tools 31.0.0
        • 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 12.5.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.60.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension can be installed from:
          🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    
    [✓] Connected device (1 available)
        • Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.82
    
    • No issues found!
  8. annagrin commented on Sep 20, 2021

    @annagrin
    ContributorAuthor

    @yjbanov does your fix work for both debug and release web builds?

  9. yjbanov commented on Sep 20, 2021

    @yjbanov
    Contributor

    @annagrin AFAIK our release builds do not support hot restart. We just reload the whole page when you use the hot restart shortcut.

  10. annagrin commented on Sep 20, 2021

    @annagrin
    ContributorAuthor

    @KristianBalaj let's see if @yjbanov 's fix will solve both issues.

  11. added
    r: fixedIssue is closed as already fixed in a newer version
    on Sep 22, 2021
  12. github-actions commented on Oct 6, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  13. locked as resolved and limited conversation to collaborators on Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listdependency: dartDart team may need to help use: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.found in release: 2.6Found to occur in 2.6has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versiontoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions