Skip to content

[cloud_firestore] Firestore collection stream does not report errors #185

Description

@KevinTheGray

When there is an error with a Firestore collection listener, the error is never reported back to Flutter. This leads to an odd state where the data is stream is always waiting. It would be better to report the error so that app can handle it.

Steps to Reproduce

  1. Clone my fork of the plugins repository: https://github.com/KevinTheGray/plugins
  2. git checkout branch kg-firebase-stream-error
  3. run the cloud-firestore example project
  4. Notice this print statement is never hit, even though there is clearly an error reported from the plugin due to a permission failure.

Logs

flutter: builder - snapshot: AsyncSnapshot<QuerySnapshot>(ConnectionState.waiting, null, null)
6.2.0 - [Firebase/Firestore][I-FST000001] Listen for query at invalid failed: Missing or insufficient permissions.

Analyze

Analyzing example...                                                    
No issues found! (ran in 16.5s)

Flutter Doctor -v

[✓] Flutter (Channel beta, v1.7.8+hotfix.4, on Mac OS X 10.14.5 18F132, locale en-US)
    • Flutter version 1.7.8+hotfix.4 at /Users/KG/Developer/Flutter/flutter
    • Framework revision 20e59316b8 (3 weeks ago), 2019-07-18 20:04:33 -0700
    • Engine revision fee001c93f
    • Dart version 2.4.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/KG/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/KG/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.3, Build version 10G8
    • CocoaPods version 1.7.1

[!] iOS tools - develop for iOS devices
    ✗ Verify that all connected devices have been paired with this computer in Xcode.
      If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
      To update with Brew, run:
        brew update
        brew uninstall --ignore-dependencies libimobiledevice
        brew uninstall --ignore-dependencies usbmuxd
        brew install --HEAD usbmuxd
        brew unlink usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    • ios-deploy 1.9.4

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 33.3.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] IntelliJ IDEA Community Edition (version 2018.2.5)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 29.1.3
    • Dart plugin version 182.4892.25

Activity

  1. added
    impact: crowdAffects many people, though not necessarily a specific customer with an assigned label. (P2)
    on Oct 23, 2019
  2. iapicca commented on Oct 23, 2019

    @iapicca
  3. Salakar commented on Jul 7, 2020

    @Salakar
    Contributor

    Hey all, as part of our on-going work for #2582, this has been resolved in our Firebase Firestore rework (#2913) - which has now been merged into master. We'll look at publishing some prereleases in the next few days. Thank you

  4. locked and limited conversation to collaborators on Aug 19, 2020
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

    impact: crowdAffects many people, though not necessarily a specific customer with an assigned label. (P2)plugin: cloud_firestoretype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions