Skip to content

ScrollController attached to multiple scroll views #79443

Closed

Description

@0xNF

I don't have easy steps to reproduce this, sorry. The error message said to file an issue so here I am.

════════ Exception caught by gesture ═══════════════════════════════════════════
The following assertion was thrown while handling a gesture:
ScrollController attached to multiple scroll views.
'package:flutter/src/widgets/scroll_controller.dart':
Failed assertion: line 109 pos 12: '_positions.length == 1'

2

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

When the exception was thrown, this was the stack
#2      ScrollController.position
package:flutter/…/widgets/scroll_controller.dart:109
#3      ScrollController.offset
package:flutter/…/widgets/scroll_controller.dart:116
#4      _ReorderableListContentState._scrollTo
package:reorderableitemsview/reorderableitemsview.dart:331
#5      _ReorderableListContentState._wrap.<anonymous closure>.<anonymous closure>
package:reorderableitemsview/reorderableitemsview.dart:631
#6      _DragTargetState.didEnter
package:flutter/…/widgets/drag_target.dart:693
...
Handler: "onStart"
Recognizer: DelayedMultiDragGestureRecognizer#c450e
════════════════════════════════════════════════════════════════════════════════

I'm using reorderableitemsview: ^1.0.0, which is where the exception in question is being thrown from.

I do not manually create any scrollcontrollers, resolutions found https://stackoverflow.com/questions/52484710/flutter-scrollcontroller-attached-to-multiple-scroll-views don't apply

Activity

  1. iapicca commented on Mar 31, 2021

    @iapicca

    @0xNF
    reorderableitemsview is a 3rd party plugin, please open an issue in the dedicated github
    or provide your flutter doctor -v, your flutter run -v
    and a minimal reproducible code sample without 3rd party plugins

  2. 0xNF commented on Mar 31, 2021

    @0xNF
    Author

    I understand that reorderableitemsview is a third party plugin, and I understand that it's frustrating not having a minimal code sample.

    I'd like to make clear that I'm not asking for help -- I'm just doing what the flutter error message specifically told me to do.

    Here's flutter doctor -v and flutter run -v

    PS > flutter doctor -v
    [√] Flutter (Channel beta, 2.1.0-12.2.pre, on Microsoft Windows [Version 10.0.19041.867], locale en-US)
        • Flutter version 2.1.0-12.2.pre at C:\Users\nflower\Documents\NickDocs\projects\external\flutter
        • Framework revision 5bedb7b1d5 (2 weeks ago), 2021-03-17 17:06:30 -0700
        • Engine revision 711ab3fda0
        • Dart version 2.13.0 (build 2.13.0-116.0.dev)
    
    [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) 
        • Android SDK at C:\Users\nflower\AppData\Local\Android\sdk
        • Platform android-30, build-tools 30.0.3
        • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java       
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
        • All Android licenses accepted.
    
    [√] Chrome - develop for the web
        • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe      
    
    [√] Android Studio (version 4.1.0)
        • 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 1.8.0_242-release-1644-b01)
    
    [√] VS Code (version 1.54.3)
        • VS Code at C:\Users\nflower\AppData\Local\Programs\Microsoft VS Code       
        • Flutter extension version 3.20.0
    
    [√] Connected device (3 available)
        • Pixel 3 (mobile) • 8ALX0UTQ2 • android-arm64  • Android 11 (API 30)
        • Chrome (web)     • chrome    • web-javascript • Google Chrome 89.0.4389.90
        • Edge (web)       • edge      • web-javascript • Microsoft Edge 89.0.774.54
    
    • No issues found!
    

    flutter run -v (only up to where it started printing my own application code, since nothing interesting or from the flutter framework happened after that)
    0xnf_multiple_scrollscroller_03-31.txt

  3. TahaTesser commented on Mar 31, 2021

    @TahaTesser
    Contributor

    Hi @0xNF
    Can you please provide a minimal complete reproducible code sample and its flutter run -v logs without using third part packages?
    Thank you

  4. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Mar 31, 2021
  5. pedromassangocode commented on Apr 21, 2021

    @pedromassangocode

    Without additional information, we are unfortunately not sure how to resolve this issue.
    We are therefore reluctantly going to close this bug for now.
    Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
    Thanks for your contribution.

    Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
    All system setups can be slightly different, so it's always better to open new issues and reference related issues.

  6. added
    r: timeoutIssue is closed due to author not providing the requested details in time
    and removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Apr 21, 2021
  7. github-actions commented on Aug 2, 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamr: timeoutIssue is closed due to author not providing the requested details in time

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions