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!
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
Logs