Repository: flutter
Issue: [Google Maps - Web] `TypeError: Cannot read properties of null (reading 'Ye')` while resizing browser window
Labels: c: regression,platform-web,a: error message,has reproducible steps,P2,found in release: 2.8,found in release: 2.9,a: plugins,team-web,triaged-web

## Steps to Reproduce

1. Execute `flutter run -d chrome` on the code sample ([here](https://gist.github.com/sperochon/7c69777c8fc11d0b15ba27fb2563cc37))
2. resize the browser window with your mouse
3. Do it again few times until getting the Exception (sometimes it crash immediately, sometimes it needs few seconds more...)

https://user-images.githubusercontent.com/1877340/147343377-e1cf7253-b4fd-42b2-a525-7596bfa08697.mov


**Expected results:**
No Exception

**Actual results:**
```
[+5441 ms] ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY 
[   +4 ms] The following JSNoSuchMethodError was thrown during a scheduler callback:
[        ] TypeError: Cannot read properties of null (reading 'Ye')
[        ] When the exception was thrown, this was the stack:
[        ] https://unpkg.com/canvaskit-wasm@0.30.0/bin/canvaskit.js 191:407  Z
[        ] https://unpkg.com/canvaskit-wasm@0.30.0/bin/canvaskit.js 249:59   Nc
[        ] https://unpkg.com/canvaskit-wasm@0.30.0/bin/canvaskit.js 174:403  Surface$_flush
[        ] https://unpkg.com/canvaskit-wasm@0.30.0/bin/canvaskit.js 12:244   flush
[        ] lib/_engine/engine/canvaskit/surface.dart 389:14                  flush
[        ] lib/_engine/engine/canvaskit/surface.dart 359:5                   [_presentSurface]
[        ] lib/_engine/engine/canvaskit/surface.dart 110:14                  <fn>
[        ] lib/_engine/engine/canvaskit/surface.dart 27:26                   submit
[        ] lib/_engine/engine/canvaskit/rasterizer.dart 35:12                draw
[        ] lib/_engine/engine/platform_dispatcher.dart 579:7                 render
[        ] lib/ui/src/ui/window.dart 93:50                                   render
[        ] packages/flutter/src/rendering/view.dart 229:15                   compositeFrame
[        ] packages/flutter/src/rendering/binding.dart 501:18                drawFrame
[        ] packages/flutter/src/widgets/binding.dart 883:13                  drawFrame
[        ] packages/flutter/src/rendering/binding.dart 363:5                 [_handlePersistentFrameCallback]
[        ] packages/flutter/src/scheduler/binding.dart 1145:15               [_invokeFrameCallback]
[        ] packages/flutter/src/scheduler/binding.dart 1082:9                handleDrawFrame
[        ] packages/flutter/src/scheduler/binding.dart 996:5                 [_handleDrawFrame]
[        ] lib/_engine/engine/platform_dispatcher.dart 1005:13               invoke
[        ] lib/_engine/engine/platform_dispatcher.dart 159:5                 invokeOnDrawFrame
[        ] lib/_engine/engine.dart 455:45                                    <fn>
```



<details>
  <summary>Logs</summary>

```
[ +135 ms] executing: sysctl hw.optional.arm64
[  +30 ms] Exit code 0 from: sysctl hw.optional.arm64
[   +3 ms] hw.optional.arm64: 1
[   +9 ms] executing: [/Users/seb/dev/sdk/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +32 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] cf4400006550b70f28e4b4af815151d1e74846c6
[   +1 ms] executing: [/Users/seb/dev/sdk/flutter/] git tag --points-at cf4400006550b70f28e4b4af815151d1e74846c6
[  +43 ms] Exit code 0 from: git tag --points-at cf4400006550b70f28e4b4af815151d1e74846c6
[        ] 2.8.0
[  +12 ms] executing: [/Users/seb/dev/sdk/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +18 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/Users/seb/dev/sdk/flutter/] git ls-remote --get-url origin
[  +17 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[ +142 ms] executing: [/Users/seb/dev/sdk/flutter/] git rev-parse --abbrev-ref HEAD
[  +25 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[   +8 ms] executing: sw_vers -productName
[  +20 ms] Exit code 0 from: sw_vers -productName
[        ] macOS
[        ] executing: sw_vers -productVersion
[  +19 ms] Exit code 0 from: sw_vers -productVersion
[        ] 12.0.1
[        ] executing: sw_vers -buildVersion
[  +19 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 21A559
[  +66 ms] 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.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' 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.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +62 ms] 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 'WindowsUwpEngineArtifacts' 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.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +37 ms] executing: sysctl hw.optional.arm64
[  +11 ms] Exit code 0 from: sysctl hw.optional.arm64
[        ] hw.optional.arm64: 1
[        ] executing: /usr/bin/arch -arm64e xcrun xcodebuild -version
[  +96 ms] Exit code 0 from: /usr/bin/arch -arm64e xcrun xcodebuild -version
[        ] Xcode 13.1
           Build version 13A1030d
[  +94 ms] Skipping pub get: version match.
[  +31 ms] Found plugin flutter_plugin_android_lifecycle at /Users/seb/dev/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-2.0.5/
[   +9 ms] Found plugin google_maps_flutter at /Users/seb/dev/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-2.1.1/
[   +5 ms] Found plugin google_maps_flutter_web at /Users/seb/dev/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter_web-0.3.2/
[ +106 ms] Found plugin flutter_plugin_android_lifecycle at /Users/seb/dev/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-2.0.5/
[   +2 ms] Found plugin google_maps_flutter at /Users/seb/dev/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-2.1.1/
[   +2 ms] Found plugin google_maps_flutter_web at /Users/seb/dev/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter_web-0.3.2/
[  +19 ms] Generating /Users/seb/dev/bug/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[ +253 ms] Launching lib/main.dart on Chrome in debug mode...
[ +200 ms] Updating assets
[  +94 ms] Waiting for connection from debug service on Chrome...
[   +9 ms] Found plugin flutter_plugin_android_lifecycle at /Users/seb/dev/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-2.0.5/
[   +2 ms] Found plugin google_maps_flutter at /Users/seb/dev/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-2.1.1/
[   +1 ms] Found plugin google_maps_flutter_web at /Users/seb/dev/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter_web-0.3.2/
[  +12 ms] Found plugin flutter_plugin_android_lifecycle at /Users/seb/dev/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-2.0.5/
[   +1 ms] Found plugin google_maps_flutter at /Users/seb/dev/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-2.1.1/
[   +1 ms] Found plugin google_maps_flutter_web at /Users/seb/dev/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter_web-0.3.2/
[  +48 ms] <- reset
[   +7 ms] /Users/seb/dev/sdk/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /Users/seb/dev/sdk/flutter/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root
/Users/seb/dev/sdk/flutter/bin/cache/flutter_web_sdk/ --incremental --target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill
/var/folders/5d/w8_lchx95zv51vmj40cwqp_40000gn/T/flutter_tools.voaCDL/flutter_tool.VyqoT5/app.dill --libraries-spec file:///Users/seb/dev/sdk/flutter/bin/cache/flutter_web_sdk/libraries.json --packages
/Users/seb/dev/bug/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-root
/var/folders/5d/w8_lchx95zv51vmj40cwqp_40000gn/T/flutter_tools.voaCDL/flutter_tools.Gr0YKp --filesystem-scheme org-dartlang-app --initialize-from-dill
build/b1b715402d823b7fd5c2b68d2edcb2ce.cache.dill.track.dill --platform file:///Users/seb/dev/sdk/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk_sound.dill --sound-null-safety
[  +24 ms] <- compile org-dartlang-app:/web_entrypoint.dart
[+13848 ms] Waiting for connection from debug service on Chrome... (completed in 13,9s)
[   +5 ms] Synced 30.9MB.
[        ] <- accept
[        ] Caching compiled dill
[  +79 ms] Using Google Chrome 96.0.4664.110 
[  +74 ms] executing: sysctl hw.optional.arm64
[  +14 ms] Exit code 0 from: sysctl hw.optional.arm64
[        ] hw.optional.arm64: 1
[  +19 ms] Found ARM Chrome installation at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome, forcing native launch.
[ +286 ms] [CHROME]:
[   +1 ms] [CHROME]:DevTools listening on ws://127.0.0.1:64971/devtools/browser/2a9cf306-064c-4a20-a15e-1852656821e9
[ +655 ms] DwdsInjector: Received request for entrypoint at http://localhost:64885/main_module.bootstrap.js
[   +8 ms] MetadataProvider: Loading debug metadata...
[  +16 ms] MetadataProvider: Loaded debug metadata (sound null safety)
[   +8 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:64885/main_module.bootstrap.js
[+1480 ms] ChromeProxyService: Initializing expression compiler for main_module.bootstrap.js with sound null safety: true
[  +98 ms] DevHandler: Debug service listening on ws://127.0.0.1:64998/dFbIIaeM7go=/ws
[  +27 ms] This app is linked to the debug service: ws://127.0.0.1:64998/dFbIIaeM7go=/ws
[  +10 ms] Debug service listening on ws://127.0.0.1:64998/dFbIIaeM7go=/ws
[   +1 ms] 💪 Running with sound null safety 💪
[   +7 ms] 🔥  To hot restart changes while running, press "r" or "R".
[        ] For a more detailed help message, press "h". To quit, press "q".
[   +1 ms] An Observatory debugger and profiler on Chrome is available at: http://127.0.0.1:64998/dFbIIaeM7go=
[+1085 ms] The Flutter DevTools debugger and profiler on Chrome is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:64998/dFbIIaeM7go=
[+5441 ms] ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
[   +4 ms] The following JSNoSuchMethodError was thrown during a scheduler callback:
[        ] TypeError: Cannot read properties of null (reading 'Ye')
[        ] When the exception was thrown, this was the stack:
[        ] https://unpkg.com/canvaskit-wasm@0.30.0/bin/canvaskit.js 191:407  Z
[        ] https://unpkg.com/canvaskit-wasm@0.30.0/bin/canvaskit.js 249:59   Nc
[        ] https://unpkg.com/canvaskit-wasm@0.30.0/bin/canvaskit.js 174:403  Surface$_flush
[        ] https://unpkg.com/canvaskit-wasm@0.30.0/bin/canvaskit.js 12:244   flush
[        ] lib/_engine/engine/canvaskit/surface.dart 389:14                  flush
[        ] lib/_engine/engine/canvaskit/surface.dart 359:5                   [_presentSurface]
[        ] lib/_engine/engine/canvaskit/surface.dart 110:14                  <fn>
[        ] lib/_engine/engine/canvaskit/surface.dart 27:26                   submit
[        ] lib/_engine/engine/canvaskit/rasterizer.dart 35:12                draw
[        ] lib/_engine/engine/platform_dispatcher.dart 579:7                 render
[        ] lib/ui/src/ui/window.dart 93:50                                   render
[        ] packages/flutter/src/rendering/view.dart 229:15                   compositeFrame
[        ] packages/flutter/src/rendering/binding.dart 501:18                drawFrame
[        ] packages/flutter/src/widgets/binding.dart 883:13                  drawFrame
[        ] packages/flutter/src/rendering/binding.dart 363:5                 [_handlePersistentFrameCallback]
[        ] packages/flutter/src/scheduler/binding.dart 1145:15               [_invokeFrameCallback]
[        ] packages/flutter/src/scheduler/binding.dart 1082:9                handleDrawFrame
[        ] packages/flutter/src/scheduler/binding.dart 996:5                 [_handleDrawFrame]
[        ] lib/_engine/engine/platform_dispatcher.dart 1005:13               invoke
[        ] lib/_engine/engine/platform_dispatcher.dart 159:5                 invokeOnDrawFrame
[        ] lib/_engine/engine.dart 455:45                                    <fn>
[        ] ════════════════════════════════════════════════════════════════════════════════════════════════════
[ +127 ms] Another exception was thrown: Bad state: PictureRecorder is not recording
[ +153 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[ +200 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[        ] Another exception was thrown: RuntimeError: null function or function signature mismatch
[        ] Another exception was thrown: RuntimeError: null function or function signature mismatch
[        ] Another exception was thrown: RuntimeError: null function or function signature mismatch
[        ] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +13 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +15 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +15 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[   +8 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +19 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +14 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +18 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +14 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +15 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +15 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +15 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +15 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +15 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[ +438 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +11 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +18 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +18 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +14 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +15 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +18 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +14 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +15 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +19 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +14 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +18 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +15 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +16 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
[  +17 ms] Another exception was thrown: RuntimeError: null function or function signature mismatch
```


```
flutter analyze

Analyzing bug...                                                        
No issues found! (ran in 2.1s)
```


```
flutter doctor -v

[✓] Flutter (Channel stable, 2.8.0, on macOS 12.0.1 21A559 darwin-arm, locale fr-FR)
    • Flutter version 2.8.0 at /Users/seb/dev/sdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision cf44000065 (2 weeks ago), 2021-12-08 14:06:50 -0800
    • Engine revision 40a99c5951
    • Dart version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/seb/dev/sdk/android
    • Platform android-31, build-tools 31.0.0
    • ANDROID_SDK_ROOT = /Users/seb/dev/sdk/android/
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.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-7249189)

[✓] VS Code (version 1.62.0)
    • 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 (2 available)
    • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64  • Android 11 (API 30) (emulator)
    • Chrome (web)              • chrome        • web-javascript • Google Chrome 96.0.4664.110

• No issues found!
```

</details>