Skip to content

Simple Firestore transaction crashes on physical iOS device (only) #35806

Description

@guit4eva

I have a simple transaction that updates a Firestore document. It works correctly on Android devices, Android Emulators and iOS emulators, but crashes on a physical iOS device. I have no idea what the error means?

Steps to Reproduce

Firestore.instance.runTransaction((Transaction tx) async {
    DocumentSnapshot docSnapshot = await tx.get(docRef);

      tx.update(
        docRef,
        {
          'title':'A Title'
        },
      );
    }

Logs

> Assertion failure in void firebase::firestore::core::Transaction::EnsureCommitNotCalled()(), /Users/path_to_app/ios/Pods/FirebaseFirestore/Firestore/core/src/firebase/firestore/core/transaction.mm:198
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'FIRESTORE INTERNAL ASSERTION FAILED: A transaction object cannot be used after its update callback has been invoked. (expected !committed_)'


**Flutter doctor -v :**

> [✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132, locale en-ZA)
>     • Flutter version 1.5.4-hotfix.2 at /Users/me/flutter
>     • Framework revision 7a4c33425d (2 months ago), 2019-04-29 11:05:24 -0700
>     • Engine revision 52c7a1e849
>     • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
> 
>  
> [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
>     • Android SDK at /Users/me/Library/Android/sdk
>     • Android NDK location not configured (optional; useful for native profiling support)
>     • Platform android-28, build-tools 28.0.3
>     • 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-1343-b01)
>     • All Android licenses accepted.
> 
> [✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
>     • Xcode at /Applications/Xcode.app/Contents/Developer
>     • Xcode 10.2.1, Build version 10E1001
>     • ios-deploy 1.9.4
>     • CocoaPods version 1.7.1
> 
> [✓] Android Studio (version 3.4)
>     • Android Studio at /Applications/Android Studio.app/Contents
>     • Flutter plugin version 36.1.1
>     • Dart plugin version 183.6270
>     • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
> 
> [✓] VS Code (version 1.36.0)
>     • VS Code at /Applications/Visual Studio Code.app/Contents
>     • Flutter extension version 3.2.0
> 
> [✓] Connected device (1 available)
>     • My iPhone • 7f3fa5e8324c4b79dc44e124318f483d0b63695c • ios • iOS 9.3.5
> 
> • No issues found!

Activity

  1. guit4eva commented on Oct 7, 2019

    @guit4eva
    Author

    Still experiencing the issue... :/

  2. kroikie commented on Oct 13, 2019

    @kroikie

    @guit4eva

    This issue has been moved to firebase/flutterfire#1216. Any further collaboration will be done there.

  3. github-actions commented on Aug 27, 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.

  4. locked as resolved and limited conversation to collaborators on Aug 27, 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

    p: cloud_firestoreObsolete - Firebase Firestore pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specifically

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions