TLS/SSL Cert. error on web socket connection to sync.gateway

I have an app that has not been updated in 6 months - so obviously all of the develop. tools etc. move ahead - and that may be causing this issue… But I cannot find any pointers to solve it.

I have changed my Mac to an M1 version where I run Visual Studio 2019 for Mac. So I had to create new Android emulators (running ARM - blistering fast!). But when my app tries to connect to the sync.gateway I get errors like this:

[CouchbaseLite] [Thread Pool Worker]| [Replicator] (WebSocketWrapper) [Thread Pool Worker (31)] Error validating TLS chain: RemoteCertificateChainErrors
Thread started:  #34
Thread finished:  #34
Thread started:  #35
Thread started:  #36
Thread finished:  #35
Thread started:  #37
[CouchbaseLite] [37]| [Network] {N8litecore4repl12C4SocketImplE#3} WebSocket failed to connect! (reason=Network error 8)
[CouchbaseLite] [38]| [Replicator] {Repl#4} Got LiteCore error: Network error 8 "Certificate verification failed (RemoteCertificateChainErrors)"
[DbDataStore] PushAndPull Replicator: 0/0, error CouchbaseLiteException (NetworkDomain / 8): Certificate verification failed (RemoteCertificateChainErrors)., activity = Connecting
[DbDataStore] Error :: Couchbase.Lite.CouchbaseNetworkException: CouchbaseLiteException (NetworkDomain / 8): Certificate verification failed (RemoteCertificateChainErrors).
[DbDataStore] PushAndPull Replicator: 0/0, error CouchbaseLiteException (NetworkDomain / 8): Certificate verification failed (RemoteCertificateChainErrors)., activity = Stopped
[DbDataStore] Error :: Couchbase.Lite.CouchbaseNetworkException: CouchbaseLiteException (NetworkDomain / 8): Certificate verification failed (RemoteCertificateChainErrors).

This is working on iOS so the certificate isn’t really invalid. It is a LetsEncrypt cert. that expires on 22-04-2022.

Sync. gateway is version 2.8.2 CE
Couchbase Lite is version: 2.8.6

I would rather not upgrade to 3 until there is due time to fix any breaking functionality :innocent:

Any ideas what could be causing this issue?

Can you confirm that you are using the iOS platform, not Java on Windows?

Not entirely sure what you are asking about. I see the problem on Android (10 & 12). And it is working on an iOS simulator (iOS 15.4).

Visual Studio is version 2019 on MacOS running Monterey (version 12.2.1)

The sync.gateway is running on CentOS 7

So no Windows involved anywhere :slightly_smiling_face:

Hmmmm… this may be a more generic issue with Android emulators as I seem not to be able to use a control to show an image from an HTTPS source either… :unamused:

duh… my bad. I meant Java on MacOS, sorry.

The reason I as is that that does not look like any Android log that I’ve ever seen. I’m just trying to figure out what it is.