Skip to content
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

Swift 6 crash #881

Open
brzzdev opened this issue Sep 24, 2024 · 0 comments
Open

Swift 6 crash #881

brzzdev opened this issue Sep 24, 2024 · 0 comments
Labels
bug triage Issues that need to be triaged

Comments

@brzzdev
Copy link

brzzdev commented Sep 24, 2024

Describe the bug
I'm seeing an unexpected crash inside AppAuthCore when the module that calls into AppAuth is in Swift 6 mode.
Setting

swiftSettings: [
  .swiftLanguageMode(.v5),
]

makes the crash go away.

To Reproduce
Steps to reproduce the behavior:

let request = OIDAuthorizationRequest(
  configuration: config,
  clientId:clientId,
  scopes: nil,
  redirectURL: URL(string: redirectUri)!,
  responseType: OIDResponseTypeCode,
  additionalParameters: nil
)
OIDAuthState.authState(
  byPresenting: request,
  presenting: NSApp.keyWindow ?? NSWindow()
) { authState, error in ... }

then dismiss Safari and get an EXC_BREAKPOINT crash on the line callback(nil, authorizationError); in OIDAuthState.m

Expected behavior
The Swift 5 behaviour: The same library line is still hit, but no crash occurs

Environment

  • Device: [ MacBook Pro ]
  • OS: [ macOS 15.0 ]
  • Browser: [ Safari ]
@brzzdev brzzdev added bug triage Issues that need to be triaged labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues that need to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant