Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

'package:flutter/src/widgets/page_view.dart': Failed assertion: line 130 pos 15: 'viewportFraction > 0.0': is not true. #335

@Megidd

Description

@Megidd

Describe the bug
I clone the repository and don't change any code. I run the Gallery on the master channel and I do pub get. I connect my smartphone to the computer and I build and run by Android Studio. However, an exception is thrown:

...
Launching lib\main.dart on SM N900 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Waiting for SM N900 to report its views...
Debug service listening on ws://127.0.0.1:56995/mPuNd28yIWQ=/ws
Syncing files to device SM N900...

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown building NotificationListener<KeepAliveNotification>:
'package:flutter/src/widgets/page_view.dart': Failed assertion: line 130 pos 15: 'viewportFraction > 0.0': is not true.

The relevant error-causing widget was: 
  ListView-[<'HomeListView'>] file:///C:/Users/m3/repos/fork/gallery/lib/pages/home.dart:367:9
When the exception was thrown, this was the stack: 
#2      new PageController (package:flutter/src/widgets/page_view.dart:130:15)
#3      _CarouselState.didChangeDependencies (package:gallery/pages/home.dart:714:21)
#4      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4814:11)
#5      ComponentElement.mount (package:flutter/src/widgets/framework.dart:4630:5)
...     Normal element mounting (33 frames)
...
════════════════════════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 259 pos 16: 'child == null || indexOf(child) > index': is not true.
The relevant error-causing widget was: 
  ListView-[<'HomeListView'>] file:///C:/Users/m3/repos/fork/gallery/lib/pages/home.dart:367:9
════════════════════════════════════════════════════════════════════════════════════════════════════

Flutter doctor
Output of flutter doctor -v:

C:\Users\m3\Downloads\flutter_windows_1.20.4-stable\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel master, 1.23.0-8.0.pre.69, on Microsoft Windows [Version 10.0.19041.264], locale en-US)
    • Flutter version 1.23.0-8.0.pre.69 at C:\Users\m3\Downloads\flutter_windows_1.20.4-stable\flutter
    • Framework revision a06f385145 (2 days ago), 2020-09-29 21:37:04 -0400
    • Engine revision d18c3ea75c
    • Dart version 2.11.0 (build 2.11.0-178.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at C:\Users\m3\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.1
    • 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.

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 48.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] Connected device (1 available)
    • SM N900 (mobile) • 4d00b6ae472d80eb • android-arm • Android 5.0 (API 21)

• No issues found!

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repository
  2. Switch to master channel
  3. Run pub get
  4. Connect your Samsung Galaxy Note 3 to your computer via USB cable
  5. On Android Studio run the application
  6. After building and installing the app on smartphone, the exceptions are thrown

Expected behavior
No exception is expected

Screenshots

Screenshot_2020-10-02-09-56-30

Desktop:

  • OS: Microsoft Windows 10 Pro 64-bit
  • Browser: Opera 70.0.3728.189
  • Version: 10.0.19041 Build 19041

Smartphone:

  • Device: Samsung Galaxy Note 3
  • OS: Android 5.0
  • Browser: Opera
  • Version 5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions