Open aliyazdi75 opened 3 years ago
Hi @aliyazdi75
To better address the issue, Can you please provide your flutter doctor -v
and flutter run --verbose
logs, and a minimal complete reproducible code sample? instead of a project
Thank you
Hi @TahaTesser
Implementing Navigation 2 it's not minimal at all :smile: , but I did my best to reproduce this issue.
1- git clone git@github.com:5be066aa964b799fca66eebabec88c5f.git
in a null-safety flutter project. Hosted here and scrollbar is here
2- flutter run -d chrome --verbose
3- Copy and paste to the end of the base and go to this URL: /book/0
4- Exception:
======== Exception caught by scheduler library =====================================================
The following TypeErrorImpl was thrown during a scheduler callback:
Unexpected null value.
When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 236:49 throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 518:63 nullCheck
packages/flutter/src/widgets/scroll_metrics.dart 150:49 get maxScrollExtent
packages/flutter/src/widgets/scrollbar.dart 1099:16 [_handleScrollNotification]
packages/flutter/src/widgets/notification_listener.dart 206:27 [_dispatch]
...
====================================================================================================
```
[ +74 ms] executing: uname -m
[ +32 ms] Exit code 0 from: uname -m
[ ] x86_64
[ +17 ms] executing: [/home/aliyazdi75/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +6 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] 05ce6ce51153dd92d68092091a465170584d842f
[ ] executing: [/home/aliyazdi75/snap/flutter/common/flutter/] git tag --points-at 05ce6ce51153dd92d68092091a465170584d842f
[ +13 ms] Exit code 0 from: git tag --points-at 05ce6ce51153dd92d68092091a465170584d842f
[ +1 ms] executing: [/home/aliyazdi75/snap/flutter/common/flutter/] git describe --match *.*.* --long --tags 05ce6ce51153dd92d68092091a465170584d842f
[ +32 ms] Exit code 0 from: git describe --match *.*.* --long --tags 05ce6ce51153dd92d68092091a465170584d842f
[ ] 2.1.0-10.0.pre-86-g05ce6ce511
[ +47 ms] executing: [/home/aliyazdi75/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +5 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/master
[ ] executing: [/home/aliyazdi75/snap/flutter/common/flutter/] git ls-remote --get-url origin
[ +5 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +49 ms] executing: [/home/aliyazdi75/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
[ +6 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] master
[ +63 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.
[ +2 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.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +73 ms] executing: /home/aliyazdi75/Android/Sdk/platform-tools/adb devices -l
[ +48 ms] List of devices attached
[ +6 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 '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.
[ +76 ms] Skipping pub get: version match.
[ +133 ms] Generating /home/aliyazdi75/Documents/AndroidStudioProjects/flutter_app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[ +185 ms] Launching lib/main.dart on Chrome in debug mode...
[ +140 ms] Updating assets
[ +120 ms] Waiting for connection from debug service on Chrome...
[ +90 ms] <- reset
[ +6 ms] /home/aliyazdi75/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/aliyazdi75/snap/flutter/common/flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot --sdk-root
/home/aliyazdi75/snap/flutter/common/flutter/bin/cache/flutter_web_sdk/ --incremental --target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill
/tmp/flutter_tools.DRTAMU/flutter_tool.GBYQWZ/app.dill --libraries-spec file:///home/aliyazdi75/snap/flutter/common/flutter/bin/cache/flutter_web_sdk/libraries.json --packages
/home/aliyazdi75/Documents/AndroidStudioProjects/flutter_app/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-root
/tmp/flutter_tools.DRTAMU/flutter_tools.NSVIHJ --filesystem-scheme org-dartlang-app --initialize-from-dill build/b1b715402d823b7fd5c2b68d2edcb2ce.cache.dill.track.dill --platform
file:///home/aliyazdi75/snap/flutter/common/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk_sound.dill --sound-null-safety
[ +28 ms] <- compile org-dartlang-app:/web_entrypoint.dart
[+24839 ms] Waiting for connection from debug service on Chrome... (completed in 24.9s)
[ +1 ms] Synced 29.1MB.
[ +20 ms] <- accept
[ ] Caching compiled dill
[ +293 ms] Using Google Chrome 89.0.4389.82
[ +435 ms] [CHROME]:
[ ] [CHROME]:DevTools listening on ws://127.0.0.1:44903/devtools/browser/8940119f-4b8a-4863-86e1-fcd79cc4f87e
[ +641 ms] DwdsInjector: Received request for entrypoint at http://localhost:45071/main_module.bootstrap.js
[ +38 ms] MetadataProvider: Loading debug metadata...
[ +52 ms] MetadataProvider: Loaded debug metadata (sound null safety)
[ +13 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:45071/main_module.bootstrap.js
[+3475 ms] ChromeProxyService: Initializing expression compiler for main_module.bootstrap.js with sound null safety: true
[ +791 ms] DevHandler: Debug service listening on ws://127.0.0.1:45815/2Hwa9akqGmo=/ws
[ +12 ms] Debug service listening on ws://127.0.0.1:45815/2Hwa9akqGmo=/ws
[ ] πͺ Running with sound null safety πͺ
[ +5 ms] π₯ To hot restart changes while running, press "r" or "R".
[ ] For a more detailed help message, press "h". To quit, press "q".
[+97428 ms] DwdsInjector: Received request for entrypoint at http://localhost:45071/main_module.bootstrap.js
[ ] MetadataProvider: Loading debug metadata...
[ +9 ms] MetadataProvider: Loaded debug metadata (sound null safety)
[ +5 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:45071/main_module.bootstrap.js
[+2267 ms] ChromeProxyService: Initializing expression compiler for main_module.bootstrap.js with sound null safety: true
[+3174 ms] βββ‘ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[ +23 ms] The following TypeErrorImpl was thrown during a scheduler callback:
[ ] Unexpected null value.
[ ] When the exception was thrown, this was the stack:
[ ] dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 236:49 throw_
[ ] dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 518:63 nullCheck
[ ] packages/flutter/src/widgets/scroll_metrics.dart 150:49 get maxScrollExtent
[ ] packages/flutter/src/widgets/scrollbar.dart 1099:16 [_handleScrollNotification]
[ ] packages/flutter/src/widgets/notification_listener.dart 206:27 [_dispatch]
[ +19 ms] packages/flutter/src/widgets/notification_listener.dart 122:19 visitAncestor
[ +4 ms] packages/flutter/src/widgets/scroll_notification.dart 31:18 visitAncestor
[ ] packages/flutter/src/widgets/framework.dart 4037:39 visitAncestorElements
[ ] packages/flutter/src/widgets/notification_listener.dart 138:13 dispatch
[ ] packages/flutter/src/widgets/scroll_activity.dart 94:90 dispatchScrollUpdateNotification
[ ] packages/flutter/src/widgets/scroll_position.dart 870:5 didUpdateScrollPositionBy
[ ] packages/flutter/src/widgets/scrollbar.dart 908:25
``` [β] Flutter (Channel master, 2.1.0-11.0.pre.86, on Linux, locale en_US.UTF-8) β’ Flutter version 2.1.0-11.0.pre.86 at /home/aliyazdi75/snap/flutter/common/flutter β’ Framework revision 05ce6ce511 (6 days ago), 2021-03-03 11:04:02 -0800 β’ Engine revision cd0e54348b β’ Dart version 2.13.0 (build 2.13.0-93.0.dev) [β] Android toolchain - develop for Android devices (Android SDK version 30.0.3) β’ Android SDK at /home/aliyazdi75/Android/Sdk β’ Platform android-30, build-tools 30.0.3 β’ Java binary at: /home/aliyazdi75/Application/android-studio/jre/bin/java β’ Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) β’ All Android licenses accepted. [β] Chrome - develop for the web β’ Chrome at google-chrome [β] Linux toolchain - develop for Linux desktop β’ clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) β’ cmake version 3.10.2 β’ ninja version 1.8.2 β’ pkg-config version 0.29.1 [β] Android Studio (version 4.1) β’ Android Studio at /home/aliyazdi75/Application/android-studio β’ Flutter plugin version 54.0.1 β’ Dart plugin version 201.9335 β’ Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [β] Connected device (2 available) β’ Linux (desktop) β’ linux β’ linux-x64 β’ Linux β’ Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 89.0.4389.82 β’ No issues found! ```
Hi @aliyazdi75 Thanks for the code sample, I can reproduce the issue. No exception without scrollbar
Thank you
@TahaTesser I think adding nnbd tag is useful.
This issue is related to declarative navigation 2 and
Navigator.pages
. If I request a page by URL and that page has another page underneath which containsScrollbar
this error happens:My project is open source: This is pages: https://github.com/aliyazdi75/gallery/blob/main/lib/presentation/screens/gallery/router.dart#L38 This is
Scrollbar
: https://github.com/aliyazdi75/gallery/blob/main/lib/presentation/screens/album/view/media/view/media.dart#L103If I open the application by this URL:
/gallery/album/album2?view=photo8
navigator.pages
contains two pages:AlbumPage
which has theScrollbar
andMediaFullscreenPage
which is the front page.Summary: If we open the application in a declarative way by the browser and it has a page underneath that contains
Scrollbar
this problem triggers.