objectbox-swift: Could not put (-30786) (10199)
Describe the bug While trying to insert around 200 records the following error is received.
[ERROR] Storage error (code -30786)
Error occurred: Could not put (-30786) (10199)
"storageGeneral" "Could not put (-30786)"
Basic info (please complete the following information):
- ObjectBox version (are you using the latest version?): 1.6.0 (No the latest version is not used)
- Reproducibility: occasionally without visible pattern
- Device: Iphone 12 mini
- OS: iOS 15.7
To Reproduce Steps to reproduce the behavior:
- Try to insert around 200 rows in a table
- Apply the generic put statement for eg - try box?.put(arrayOfObjects)
- Sometimes this error is received - “storageGeneral” “Could not put (-30786)”
Expected behavior It is expected that the data should be inserted in the database on “put” statement.
Code If applicable, add code to help explain your problem.
- Include affected entity classes.
class Assignment : Entity{
var id : Id
// objectbox: unique
var assignmentId : String
var createdDate : String
var name : String
var signature : String
var picture : String
var picture1 : String
var picture2 : String
// var startTime : String
// var endTime : String
var priority : String
var employeeFullName : String
var roomId : String
var roomType : String
var roomName : String
var buildingName : String
var floorPicklist : String
var functionalAreaName : String
var asset : String
var status : String
var formattedDate : String
var dueDate : String
var startDueTime : String
var endDueTime : String
var order: Int
var sortDate: Date
var isOverdue: Bool
var isLocallyEdited : Bool
var isAddedAfterStart : Bool
var deSelectedQuestionCommaSeparated : String
var site : ToOne<Site> = nil
var nameValue : String
var assignmentStartTime : String
var assignmentEndTime : String
var comment : String
var isquestionONEselected : Bool
var isquestionTWOselected : Bool
var isquestionTHREEselected : Bool
var description : String
var siteEquipmentname : String
var signatureImageName : String
var firstPictureImageName : String
var secondPictureImageName : String
var thirdtPictureImageName : String
var helpDeskId : String
// Requestor Info
var requestorVisible: Bool
var requestorName: String
var requestorEmail: String
var requestorPhone: String
var clientServiceName: String
var workType: String
// objectbox: backlink = "assignment"
var interruptions : ToMany<Interruption> = nil
// objectbox: backlink = "assignment"
var issues : ToMany<Issue> = nil
required init() {
self.id = 0
self.assignmentId = ""
self.createdDate = ""
self.name = ""
self.signature = ""
self.picture = ""
self.picture1 = ""
self.picture2 = ""
self.priority = ""
self.employeeFullName = ""
self.roomId = ""
self.roomType = ""
self.roomName = ""
self.buildingName = ""
self.floorPicklist = ""
self.functionalAreaName = ""
self.asset = ""
self.status = ""
self.formattedDate = ""
self.isLocallyEdited = false
self.isAddedAfterStart = false
self.dueDate = ""
self.startDueTime = ""
self.endDueTime = ""
self.deSelectedQuestionCommaSeparated = ""
self.nameValue = ""
self.assignmentStartTime = ""
self.assignmentEndTime = ""
order = Int.max
sortDate = Date()
isOverdue = false
self.comment = ""
self.isquestionONEselected = true
self.isquestionTWOselected = true
self.isquestionTHREEselected = true
self.description = ""
self.siteEquipmentname = ""
self.signatureImageName = ""
self.firstPictureImageName = ""
self.secondPictureImageName = ""
self.thirdtPictureImageName = ""
self.helpDeskId = ""
requestorVisible = false
requestorName = ""
requestorEmail = ""
requestorPhone = ""
clientServiceName = ""
workType = ""
}
This is the method that have been used to insert - try assignmentBox?.put(assignments)
assignments is an array.
Logs, stack traces
[ERROR] Storage error (code -30786)
Error occurred: Could not put (-30786) (10199)
"storageGeneral" "Could not put (-30786)"
Additional context Add any other context about the problem here.
- Is there anything special about your code? Nothing special is done. Server is called and the response is being tried to insert into database.
- May transactions or multi-threading play a role? Transactions is not used.
- Did you find any workarounds to prevent the issue? Not as of yet.
Kindly let me know the probable cases where this error may appear.
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 17 (9 by maintainers)
I’m trying to create a reduced sample project that will have the same issue. I’ll surely share if i can create similar issue there.
I tested on the simulator (iPhone 12 mini , iOS 15.5). It is working fine on simulator. The problem only occurs on device.