mongoDB Atlas - unity over cellular data not working

I am working on an app in Unity with a mongoDB Atlas database. The app is working in unity editor and phone when it is over different wifi connections. But it stops working when it i connected to my cellular data (Either on the phone or in unity editor). Below is the error:

DnsResponseException: No connection could be established to any of the following name servers: (Udp: 1280).
DnsClient.LookupClient.ResolveQuery (System.Collections.Generic.IReadOnlyCollection`1[T] servers, DnsClient.DnsMessageHandler handler, DnsClient.DnsRequestMessage request, System.Boolean useCache, DnsClient.LookupClientAudit continueAudit) (at <57cd9b7b8c7b47269efcc38c43d25c74>:0)
DnsClient.LookupClient.QueryInternal (System.Collections.Generic.IReadOnlyCollection`1[T] servers, DnsClient.DnsQuestion question, System.Boolean useCache) (at <57cd9b7b8c7b47269efcc38c43d25c74>:0)
DnsClient.LookupClient.Query (System.String query, DnsClient.QueryType queryType, DnsClient.QueryClass queryClass) (at <57cd9b7b8c7b47269efcc38c43d25c74>:0)
MongoDB.Driver.Core.Configuration.ConnectionString.Resolve () (at <5ee0a21073b349b884ac8e9a3ec24723>:0)
MongoDB.Driver.MongoUrl.Resolve () (at <fd0a9f693efa4bb2a8d0097ddd0ec57f>:0)
MongoDB.Driver.MongoClientSettings.FromUrl (MongoDB.Driver.MongoUrl url) (at <fd0a9f693efa4bb2a8d0097ddd0ec57f>:0)
MongoDB.Driver.MongoClientSettings.FromConnectionString (System.String connectionString) (at <fd0a9f693efa4bb2a8d0097ddd0ec57f>:0)
MongoDB.Driver.MongoClient..ctor (System.String connectionString) (at <fd0a9f693efa4bb2a8d0097ddd0ec57f>:0)

Any help as to what should be done?

And I also tried to connect to database in mongoDBCompass but it wouldn’t connect when i was on cellular data

Not sure if you have a requirement to use the MongoDB driver but there is a Realm Unity SDK that is designed to work over cellular from a mobile app

1 Like