Today I updated to VS for Mac v8.3 and to Xcode 11.0 and I started getting this exception each time I try to sign in using:
UserInformation userInfo = await Auth.SignInAsync();
Exception message:
Foundation.NSErrorException: 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.}
at AppCenterBaaS.ViewModels.AuthPageViewModel.SignIn () [0x00034] in /[myAppName]/ViewModels/AuthPageViewModel.cs:102
This was working yesterday before I updated. Please let me know what I can do. I'm using AppCenter.Auth v2.1.1
VS for Mac version details attached.
Thanks @TomSoderling for posting! We鈥檒l investigate this.
Thanks.
This may be related? https://github.com/AzureAD/microsoft-authentication-library-for-objc/issues/603
Confirmed facing the same issue as well...
Hello everyone! The new SDK version with partial iOS 13 support for Auth is released today, please check it out. Full support will come in one of the next releases, but it already should work as it is.
Thank you!! Will test it out shortly!
Hello everyone! The new SDK version with partial iOS 13 support for Auth is released today, please check it out. Full support will come in one of the next releases, but it already should work as it is.
Actually will an updated package for appcenter-sdk-dotnet come out as well? I'm facing this issue in a Xamarin.Forms app.
Thanks,
Rich
@richp582 the releases for the wrapper SDKs usually come a couple of days later.
@richp582 the releases for the wrapper SDKs usually come a couple of days later.
Ok thanks! wondering if I should create a copy of the bug over there, but I guess I'll hold off for now.
Thanks again for the quick response!
-Rich
Np. I transferred the issue.
Hello everyone! The new SDK version with partial iOS 13 support for Auth is released today, please check it out. Full support will come in one of the next releases, but it already should work as it is.
@annakocheshkova Thank you for the quick response. Like Rich, I'll have to wait till this comes to appcenter-sdk-dotnet so I can consume it in my Xamarin.Forms app
Hello there. The App Center SDK DotNet 2.4.0-preview is released! 馃帀
Just tried the new package on my iOS 13 device and it still is not working. It asks if I want to use B2C to Login pops a browser page for a split second then drops back to the app.
This worked for me on iOS for my Xamarin.Forms app. I was able to authenticate on an iOS 13 iPhone 11 and pull down docs from my App Center backend.
I updated both the AppCenter & AppCenter.Auth packages in my Shared and iOS projects to version 2.4.0-preview. I'm still using Xcode 10.3 and VS for Mac v8.2.6 however
@richp582 This is very interesting, can I ask you to open a separate issue and provide all the details (environment info, verbose logs). Looks like something different than before.
@TomSoderling great to hear that! I'm closing this issue, if anyone sees the original exception again on the new version feel free to re-open it.
@annakocheshkova Thanks very much!
I am still getting this issue after upgrading packages to 2.4.0 in core and IOS project. IOS 13 simulator, VS Mac 8.3.1 build 18, XCode 11.0
Foundation.NSErrorException: 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.}
at MyProject.ViewModels.LoginPageViewModel.SignIn () [0x00025] in /Users/me/Projects/MyProject/MyProject/ViewModels/LoginPageViewModel.cs:23
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.
at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.2.0.42/src/Xamarin.iOS/Foundation/NSAction.cs:178
Hi @matt-goldman! Could you please share the verbose logs?
Hi @matt-goldman! Could you please share the verbose logs?
See attached - hope that helps!
AppCenterAuth.log
Apologies - I rolled back to grab you the logs as I'd started testing with MSAL direct to the tenant. and rolled back the package version too. Reinstalled 2.4.0 and now all is working.
Most helpful comment
Np. I transferred the issue.