Skip to content

Enabling Dynamic Actor Isolation feature for Swift 6 Language mode in project causes app crash. #3986

Open
@harish-suthar

Description

@harish-suthar

Describe the bug
Enabling Dynamic Actor Isolation feature for Swift 6 Language mode in project causes app crash.
Image

  • App crashes when using AWSCloudWatchLoggingPlugin

To Reproduce

  • Enable Dynamic Actor Isolation feature for Swift language 6 mode in project
  • Configure AWS Cloud Watch Logging using below code
public func configureAuthSDK() {
    do {
        try Amplify.add(plugin: AWSCognitoAuthPlugin())
        try Amplify.add(plugin: AWSCloudWatchLoggingPlugin())
        try Amplify.configure()
    } catch {
    }
}
  • Run the app and it crashes

Screenshots
Image

❗ Key Concurrency Problem:

  • self is captured implicitly by the Task.
  • The enclosing object (self) may not be available safely within the Task, unless it’s explicitly isolated (@mainactor, @sendable, etc.).
  • Also, the closure passed as @autoclosure () -> String could be capturing non-Sendable context if used inside a concurrent task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest a new featureloggingIssues related to the Logging category

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions