Repository navigation
[cloud_firestore] crashes if you insert "/" char into .document(value) [only iOS] #2338
Copy link
Copy link
Closed
Labels
impact: customerA bug with low impact (e.g. affecting only a few customers or has a workaround). (P3)A bug with low impact (e.g. affecting only a few customers or has a workaround). (P3)plugin: cloud_firestoretype: bugSomething isn't workingSomething isn't working
Description
Activity
- changed the title
[-][cloud_firestore] crashes if you insert "/" char into .document(value)[/-][+][cloud_firestore] crashes if you insert "/" char into .document(value) [only iOS][/+]on Apr 10, 2020 Hi @mustafarenkci
can you please provide yourflutter doctor -vandflutter run --verbose?
Thank you- addedblocked: customer-responseWaiting for customer response, e.g. more information was requested.Waiting for customer response, e.g. more information was requested.
on Apr 14, 2020 Hi @mustafarenkci
can you please provide yourflutter doctor -vandflutter run --verbose?
Thank youHere;
Flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.4 19E287, locale tr-TR) • Flutter version 1.12.13+hotfix.9 at /Users/mustafarenkci/Documents/flutter • Framework revision f139b11009 (2 weeks ago), 2020-03-30 13:57:30 -0700 • Engine revision af51afceb8 • Dart version 2.7.2 [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • Android SDK at /Users/mustafarenkci/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 28.0.3 • ANDROID_HOME = /Users/mustafarenkci/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_212-release-1586-b4-5784211) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 11.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 11.4, Build version 11E146 • CocoaPods version 1.9.1 [✓] Android Studio (version 3.6) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 45.1.1 • Dart plugin version 192.7761 • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211) [✓] Connected device (1 available) • iPhone 8 • 6090B51F-8963-4F09-8FF8-CA3DE8DA2521 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator) • No issues found!flutter run --verbose
[ +12 ms] [DEVICE LOG] 2020-04-15 02:08:52.846210+0300 localhost Runner[15946]: (Foundation) *** Assertion failure in firebase::firestore::api::DocumentReference::DocumentReference(model::ResourcePath, std::shared_ptr<Firestore>)(), /Users/mustafarenkci/Documents/FlutterProjects/fetvasor/ios/Pods/FirebaseFirestore/Firestore/core/src/firebase/firestore/api/document_reference.cc:67 [ +63 ms] Service protocol connection closed. [ ] Lost connection to device. [ +1 ms] DevFS: Deleting filesystem on the device (file:///Users/mustafarenkci/Library/Developer/CoreSimulator/Devices/6090B51F-8963-4F09-8FF8-CA3DE8DA2521/data/Containers/Data/Application/E62318B1-B7FC-49CD-9F97-210DE1EA0DA5/tmp/fetvasorjvQZNv/fet vasor/) [ ] Sending to VM service: _deleteDevFS({fsName: fetvasor}) [ ] [DEVICE LOG] 2020-04-15 02:08:52.903145+0300 localhost Runner[15946]: (CoreFoundation) *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'FIRESTORE INTERNAL ASSERTION FAILED: Invalid document reference. Document references must have an even number of segments, but liked/Abdesti bozan/bozmayan durumlarda farklı mezhepten imam ve cemaatin durumu has 3' [ ] [DEVICE LOG] *** First throw call stack: [ ] [DEVICE LOG] ( [ ] [DEVICE LOG] 0 CoreFoundation 0x00007fff23e3dcce __exceptionPreprocess + 350 [ ] [DEVICE LOG] 1 libobjc.A.dylib 0x00007fff50b3b9b2 objc_exception_throw + 48 [ ] [DEVICE LOG] 2 CoreFoundation 0x00007fff23e3da48 +[NSException raise:format:arguments:] + 88 [ ] [DEVICE LOG] 3 Foundation 0x00007fff258ac85b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166 [ ] [DEVICE LOG] 4 Runner 0x0000000103943d67 _ZN8firebase9firestore4util16ObjcThrowHandlerENS1_13ExceptionTypeEPKcS4_iRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 343 [ ] [DEVICE LOG] 5 Runner 0x00000001 [ ] *** First throw call stack: [ ] ( [ ] 0 CoreFoundation 0x00007fff23e3dcce __exceptionPreprocess + 350 [ ] 1 libobjc.A.dylib 0x00007fff50b3b9b2 objc_exception_throw + 48 [ ] 2 CoreFoundation 0x00007fff23e3da48 +[NSException raise:format:arguments:] + 88 [ ] 3 Foundation 0x00007fff258ac85b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166 [ ] 4 Runner 0x0000000103943d67 _ZN8firebase9firestore4util16ObjcThrowHandlerENS1_13ExceptionTypeEPKcS4_iRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 343 [ ] 5 Runner 0x00000001 [ +252 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed [ +3 ms] "flutter run" took 398.786ms.- removedblocked: customer-responseWaiting for customer response, e.g. more information was requested.Waiting for customer response, e.g. more information was requested.
on Apr 15, 2020 .collection('liked').document("xyz**/**xyz");A pointer to a document must be an event amount of segments so the error is correct. What happens on Android?
Collection/Document names cannot include
/characters.- addedimpact: customerA bug with low impact (e.g. affecting only a few customers or has a workaround). (P3)A bug with low impact (e.g. affecting only a few customers or has a workaround). (P3)
on Apr 18, 2020 I'm getting the same issue. Previous version used to work with the above format even on iOS. On Android, it works as expected.
On JS, that code produces this error:
FirebaseError: Invalid document reference. Document references must have an even number of segments, but liked/xyz/xyz has 3This will be caught but the correct behaviour is to throw an error.
- locked and limited conversation to collaborators
on Aug 7, 2020
Metadata
Metadata
Assignees
Labels
impact: customerA bug with low impact (e.g. affecting only a few customers or has a workaround). (P3)A bug with low impact (e.g. affecting only a few customers or has a workaround). (P3)plugin: cloud_firestoretype: bugSomething isn't workingSomething isn't working
Describe the bug
im using firestore and it works well but when i try to use a string which contains "/" char into document(), app crashes ONLY ON iOS DEVICES.
For example;
At runtime, the following crash occurs, closing the app (it is not handled by Flutter):
im using cloud_firestore: ^0.13.4+2