Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkc: crashStack traces logged to the consoleStack traces logged to the consolec: regressionIt was better in the past than it is nowIt was better in the past than it is nowfound in release: 3.35Found to occur in 3.35Found to occur in 3.35found in release: 3.36Found to occur in 3.36Found to occur in 3.36frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
I have a Flutter project that runs fine with Flutter SDK 3.32.X, but crashes at a specific point after upgrading to Flutter 3.35.1. I am not allowed to disclose this project and therefore derived a smaller version from it:
The output from the debug console is contained in the "debug console.txt" within the folder of the project.
To cause the exception:
- Execute the application in debug mode,
- Click the Button (with label "Login") and
- Click the button on the right (with label "Tools"). Then the exception is triggered.
Flutter doctor output when having and using Flutter 3.35.1:
[√] Flutter (Channel stable, 3.35.1, on Microsoft Windows [Version 10.0.26100.4946], locale de-DE) [230ms]
• Flutter version 3.35.1 on channel stable at C:\Progs\Flutter\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 20f8274939 (6 days ago), 2025-08-14 10:53:09 -0700
• Engine revision 1e9a811bf8
• Dart version 3.9.0
• DevTools version 2.48.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-lldb-debugging
[√] Windows Version (11 Pro 64-bit, 24H2, 2009) [2,1s]
[√] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [1.645ms]
• Android SDK at C:\Progs\Android\SDK
• Emulator version 36.1.9.0 (build_id 13823996) (CL:N/A)
• Platform android-36, build-tools 36.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)
• All Android licenses accepted.
[√] Chrome - develop for the web [70ms]
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.14.12) [69ms]
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.14.36408.4
• Windows 10 SDK version 10.0.26100.0
[√] Android Studio (version 2025.1.2) [13ms]
• Android Studio at C:\Program Files\Android\Android Studio
• 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 21.0.6+-13391695-b895.109)
[√] VS Code, 64-bit edition (version 1.103.1) [11ms]
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.116.0
[√] Connected device (3 available) [174ms]
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26100.4946]
• Chrome (web) • chrome • web-javascript • Google Chrome 139.0.7258.128
• Edge (web) • edge • web-javascript • Microsoft Edge 137.0.3296.93
[√] Network resources [267ms]
• All expected network resources are available.
• No issues found!
For running the app with Flutter 3.32.8:
- Go to the folder with the Flutter SDK,
- Switch the working copy to branch "3.32.8",
- Run "flutter doctor -v" to let adjust to the switched branch,
- Change the version for the Dart sdk under "environment:" "sdk:" to "^3.8.1" in file pubspec.yaml of the project,
- Run "flutter pub get" to update the packages.
- Execute the app in debug mode and execute the same steps as above.
To revert to the latest SDK:
- Execute "flutter channel stable",
- Execute "flutter doctor -v"
- Change the version for the Dart SDK back to 3.9.0 in file pubspec.yaml of the project,
- Run "flutter pub get" to update the packages.
Reacted by Rui Craveiro, Filip Hracek, Erfa, Eliote, arazinger, Aleksandr Savin, Stephen Vaudreuil and Sebastian Stautz
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkc: crashStack traces logged to the consoleStack traces logged to the consolec: regressionIt was better in the past than it is nowIt was better in the past than it is nowfound in release: 3.35Found to occur in 3.35Found to occur in 3.35found in release: 3.36Found to occur in 3.36Found to occur in 3.36frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Activity
ruicraveiro commentedon Aug 21, 2025
darshankawar commentedon Aug 21, 2025
@TB-StarcMed Thanks for the report and code. I was able to replicate this on latest sdk, but looking at the code you provided, it seem to still have lot of implementation and is not minimal. What we would like to have is a minimal but complete runnable code sample (ex: only main.dart) that still triggers the reported error. You may remove unrelated implementations like localization and other implementations which isn't required to trigger this error and just provide us updated code.
TB-StarcMed commentedon Aug 21, 2025
@darshankawar I made a more minimalistic variant that still produces the error:
overlay_portal_assertion (2).zip
I have figured out now that going to the previous Flutter version is achievable by executing:
The upgrade back to the latest Flutter SDK then works by executing:
The Dart SDK option does not need to be changed to "^3.9.0" when switching to the latest Flutter SDK, since the value "^3.8.1" works for both Flutter SDKs.
I have added git to the folder in case someone wants to switch to an earlier version of the project.
As a hint to the possible cause: When I commented out the Category4Widget in the original version, the error disappears. Since the widget contains some sliders, it think it is likely that the error is related to the Slider widget.
darshankawar commentedon Aug 22, 2025
Thanks for the update. I was able to replicate this on latest stable and master but not in 3.32.8 in which the app renders properly showing the slider as below:
In latest versions, it throws the error as below:
error log
runnable code
28 remaining items
idipak commentedon Mar 4, 2026
This works
TB-StarcMed commentedon Mar 5, 2026
This is just a workaround. Normally, the Slider component should work without such a workaround in a table. The Flutter developers need to decide how to fix this issue. I am more or less just a user. At the moment, I am using a structure consisting of Column (Partially with crossAxisAlignment = CrossAxisAlignment.stretch), IntrinsicWidth and ConstrainedBox components, that set each a minimum width that is determined by calculating a maximum width vaue for the texts that the surrounding Text components have at max using TextSpan and TextPainter class instances, instead of using a table for the part that contains the sliders.
idipak commentedon Mar 5, 2026
I know this is not a fix, I have just posted a work around for those who are blocked.
Fix owner-mismatch crash for OverlayPortal inside a deferred-mount pa…
Fix owner-mismatch crash for OverlayPortal inside a deferred-mount pa…
Fix owner-mismatch crash for OverlayPortal inside a deferred-mount pa…
Fix owner-mismatch crash for OverlayPortal inside a deferred-mount pa…
Fix owner-mismatch crash for OverlayPortal inside a deferred-mount pa…
Fix owner-mismatch crash for OverlayPortal inside a deferred-mount pa…
Fix owner-mismatch crash for OverlayPortal inside a deferred-mount pa…
Fix owner-mismatch crash for OverlayPortal inside a deferred-mount pa…
github-actions commentedon Jul 14, 2026
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 -vand a minimal reproduction of the issue.