Closed skyfoxa closed 5 months ago
Hi @skyfoxa! Thanks for opening this issue.
We will take a look and post updates here.
This should be fixed in the latest release 2.36.1.
Could you please update your dependency and verify? Thanks!
@ruisebas the SDK doesn't crash anymore, however it won't open the hosted UI, calling the AWSMobileClient.default().showSignIn(navigationController: signInUIOptions: hostedUIOptions: _:)
method returns this error:
Error Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=2 "Cannot start ASWebAuthenticationSession without providing presentation context. Set presentationContextProvider before calling -start." UserInfo={NSDebugDescription=Cannot start ASWebAuthenticationSession without providing presentation context. Set presentationContextProvider before calling -start.}
@skyfoxa my apologies for that.
I've merged a fix to the main
branch. Would you be able to verify it it addresses your issues?
If you cannot, no worries, we will release a new version for you to try.
Thanks!
@ruisebas I tried it, but it looks https://github.com/aws-amplify/aws-sdk-ios-spm
doesn't contain that change yet, I'll probably wait for the release
Describe the bug Calling
AWSMobileClient.default().showSignIn(navigationController: signInUIOptions: hostedUIOptions: _:)
leads to an uncaught exception and crashes the app.This issue started occurring when we updated the SDK from version 2.35.0 to 2.36.0. It's probably connected to the recent update from
SFAuthenticationSession
toASWebAuthenticationSession
. It may be the same issue as was discussed hereTo Reproduce
Here is our awsconfiguration:
Steps to reproduce the behavior:
AWSMobileClient.default().showSignIn(navigationController:signInUIOptions:hostedUIOptions:_:)
HostedUIOptions(scopes: ["openid", "email", "profile"], identityProvider: "Google")
Observed Behavior
Expected Behavior Hosted UI is opened and user can sign in, app doesn't crash.
Stack Trace
Code Snippet
Unique Configuration
Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)? AWSMobileClient
Screenshots
Environment(please complete the following information):
Device Information (please complete the following information):
Additional context
Relevant Console Output
Logs
Log Messages
``` *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'The provided scheme is not valid. A scheme should not include special characters such as ":" or "/".' *** First throw call stack: (0x1a677ab28 0x19e5eaf78 0x21e71b618 0x21e71b214 0x10bb3dc10 0x10bb3dae0 0x10bb3da4c 0x1a55687f4 0x1a5596d0c 0x1a5594594 0x1a5593684 0x1a559619c 0x1a5595f08 0x10c617764 0x10c6067bc 0x10c6098e0 0x10c608bb8 0x10c61aae4 0x10c61b4d8 0x202670ee4 0x202670fc0) libc++abi: terminating due to uncaught exception of type NSException ```