-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in save<Models> from DataStoreBaseBehavior #3716
Comments
@amruth-movano Thanks for submitting your issue. To help reduce produce the issue, can you provide your model/schema and the request parameters that resulted in the crash? |
@phantumcode Hi, currently it is not reproducible, so not sure how can I help wth parameters which were resulted in crash |
@amruth-movano Are you able to provide your model schema or a example schema or test app that can help reproduce the issue? |
@phantumcode
0 libswiftCore.dylib 0x38870 assertionFailure(::file:line🎏) + 264 |
We addressed a similar issue in #3595, with the patch released in version 2.29.1. We'll investigate this further, but could you also double confirm the version associated with the crash log? |
Describe the bug
Hi Team,
Today I got crash while running the ios app.
The crash was in extension class DataStoreBaseBehavior-
func save<M: Model>(_ models: [M], where predicate: QueryPredicate?) async throws -> [M] {
let results = try await withThrowingTaskGroup(of: M.self) { group in
for model in models {
group.addTask {
try await save(model, where: predicate) // Crash line
}
}
Steps To Reproduce
Expected behavior
App should not crash in save models
Amplify Framework Version
2.33.6
Amplify Categories
DataStore
Dependency manager
Swift PM
Swift version
5.9.2
CLI version
12.11.1
Xcode version
15.2
Relevant log output
Thread 94: Fatal error: SWIFT TASK CONTINUATION MISUSE: save(_:modelSchema:where:) tried to resume its continuation more than once, throwing DataStoreError: The operation couldn’t be completed. (SQLite.Result error 0.) Recovery suggestion: The operation couldn’t be completed. (SQLite.Result error 0.) Caused by: cannot rollback - no transaction is active (code: 1)!
Is this a regression?
No
Regression additional context
No response
Platforms
iOS
OS Version
iOS 17.5
Device
iPhone 15 Plus
Specific to simulators
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: