mongodb / stitch-ios-sdk

Apache License 2.0
42 stars 25 forks source link

updateOne and $unset fails sometimes #195

Open moofus opened 4 years ago

moofus commented 4 years ago

Here's the code being executed: do { let filter:Document = [MLDb.Field.k_id.rawValue:user_id] logI("filter='(filter)'") let update:Document = ["$unset": [MLDb.Field.kImage_id.rawValue:1] as Document] logI("update='(update)'") let result = try MLUserDb.coll.updateOne(filter: filter, update: update) logI("result='(String(describing: result))'") } catch { logE(error) fatalError("(error)") }

Here's the output screen: filter='{ "_id" : { "$oid" : "5dc73b7cda08e87a7b05c573" } }' update='{ "$unset" : { "i" : 1 } }' mongo_embedded was compiled with optimization - stepping may behave oddly; variables may not be available. (lldb)

Here's the stack from Xcode:

mongo1 mongo2 mongo3
moofus commented 4 years ago

Update: it died again. This time the stack look very different, but it died executing the same code. Below is the Podfile and another listing of the stack: source 'https://github.com/CocoaPods/Specs.git' platform :ios, '12.0' use_frameworks!

target 'moofuslist' do

For core functionality and the Remote MongoDB Service

pod 'StitchSDK', '= 6.1.0'
pod 'StitchLocalMongoDBService', '~> 6.1.0'

# optional: for using the AWS service
#pod 'StitchSDK/StitchAWSService', '= 6.0.0'
# optional: for using the Firebase Cloud Messaging service
#pod 'StitchSDK/StitchFCMService', '= 6.0.0'
# optional: for using the HTTP service
#pod 'StitchSDK/StitchHTTPService', '= 6.0.0'
# optional: for using the twilio service
#pod 'StitchSDK/StitchTwilioService', '= 6.0.0'

target 'moofuslistTests' do inherit! :search_paths

Pods for testing

end

target 'moofuslistUITests' do inherit! :search_paths

Pods for testing

end

end

mongo4