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

Calling LogInAsync in new release (10.11.0) Throws Realms.Sync.Exceptions Code 998 (ssl CERT related) #2892

Closed
dgerding opened this issue Mar 30, 2022 · 3 comments · Fixed by #2894
Assignees

Comments

@dgerding
Copy link

dgerding commented Mar 30, 2022

What happened?

I've checked twice now. When I update to 10.11.0, the following code suddenly stops working:

_realmsUser = await App.RealmsSyncApp.LogInAsync(_realmCredentials);

And instead throws an exception. Here are the details on the exception.

e = {Realms.Sync.Exceptions.AppException: code 998: An unexpected error occurred while sending the request: Authentication failed, see inner exception.: Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
at /Users/builder/jenkins/works...

Reverting to 10.10.0 fixes the problem.

Repro steps

Use valid credentials and sign in via RealmsSyncApp.LogInAsync using 10.10.0 Nuget of Realms.

Update to 10.11.0

Throws error.

Version

.net standard 2.1

What SDK flavour are you using?

MongoDB Realm (i.e. Sync, auth, functions)

What type of application is this?

Xamarin

Client OS and version

Xamarin Forms Android

Code snippets

No response

Stacktrace of the exception/crash you're getting

at Realms.Sync.AppHandle.LogInAsync (Realms.Sync.Native.Credentials credentials) [0x00055] in D:\a\realm-dotnet\realm-dotnet\Realm\Realm\Handles\AppHandle.cs:291 
  at Realms.Sync.App.LogInAsync (Realms.Sync.Credentials credentials) [0x0003d] in D:\a\realm-dotnet\realm-dotnet\Realm\Realm\Sync\App.cs:214 
  at LitFit.XF.App.InitializeExistingUserPersistence (System.String username, System.String pw) [0x000c5] in D:\lf\LitFit.XF\App_Persistence.xaml.cs:179

Relevant log output

No response

@dgerding dgerding changed the title Urgent: Calling RealmsSyncApp.LogInAsync in new release (10.11.0) Throws Realms.Sync.Exceptions Code 998 (ssl CERT related) Calling LogInAsync in new release (10.11.0) Throws Realms.Sync.Exceptions Code 998 (ssl CERT related) Mar 30, 2022
@nirinchev
Copy link
Member

This looks like a regression with the way we setup the http client. The issue is that the managed http handler is more strict than the native one so it rejects the expired root certificate that we're using to trick older android devices.

@dgerding
Copy link
Author

@nirinchev Sorry to bother, but does this mean it's closed because it's already scheduled for a fix or is there something different I should be doing with my code in the meantime? Thanks.

@nirinchev
Copy link
Member

We fixed it and released 10.11.1 that should address it.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants