Xamarin - /No such host is known - on Device only

I am logging in with email and password on Xamarin Forms
It works on the emulator but on a realy device i am getting this exception
code 999: Unable to resolve host "realm.mongodb.com": No address associated with hostname

Changing the HttpClientHandler as described here gives me the following exception:
code 998: An unexpected error occurred while sending the request: No such host is known

The device has Android 10 (API 29)

How can i fix this?

Hi Johannes,

  1. Can you show us the code that is throwing the exception?
  2. What version of Android is running on the emulator?
  3. What version of Android is running on the device?
  4. Can you also try to run the same application on another device that runs a different android version?

The issue with the HttpClientHandler that you’re linking should not be related to your issue.

Andrea

RealmApp = Realms.Sync.App.Create(appId);
 await RealmApp.LogInAsync(Credentials.EmailPassword(emailentry.Text, passwordentry.Text));

2.3. Both are running Android 10 (API 29)
4. Unfortunately dont have another one

Those 2 lines look correct.
Could you share a minimal repro project that fails in the same way?