[Android] Self-hosted instance discovery fails with user-installed CA (CERTIFICATE_VERIFY_FAILED)

(#4126) Bug Open: Confirmed Priority: P2 mobile self-hosting

Reproduction steps

Install a private CA on Android; open the self-hosted discovery endpoint successfully in Brave; enter the same HTTPS hostname into Fluxer's Android instance switcher; press Connect; observe the failure.

Expected behaviour

Fluxer should securely recognise a CA explicitly trusted by the user, while maintaining certificate-chain and hostname verification.

Actual behaviour

Instance discovery fails before login. The app displays a generic connection error, while ADB confirms CERTIFICATE_VERIFY_FAILED.

Build information

2026.10.100-beta.8

Platform

Android, Self-hosting

Evidence

DioException [unknown]: null Error: HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: self signed certificate in certificate chain(handshake.cc:320)) StackTrace: #0 DioMixin.fetch (package:dio/src/dio_mixin.dart:598) #1 InstanceDiscoveryService.connectToEndpoint (package:fluxer_app/core/instance/instance_discovery_service.dart:58) #2 ActiveInstance.connectToEndpoint (package:fluxer_app/core/providers/active_instance_provider.dart:43) #3 InstanceSelector.connectToUrl (package:fluxer_app/features/auth/providers/instance_selector_provider.dart:255)
  1. Wolfae changed the status from Awaiting confirmation to Confirmed

4 comments

Sign in with Fluxer to comment and vote.
Comment by mesub
mesubMod 1 vote 1 reply
Status changed from Needs triage to Awaiting confirmation
Hi, is this still an issue for you?
Comment by Wolfae
Wolfae OP1 vote Still happening
Yes, the issue is still reproducible as of 25 October 2026, using Android version 2026.10.100-beta.11. I reproduced the problem again at 13:29 GMT. The Android application still fails during discovery of my self-hosted instance with the following error:
DioExceptionType.unknown
DioException [unknown]: null
HandshakeException: Handshake error in client

CERTIFICATE_VERIFY_FAILED:
self signed certificate in certificate chain
(handshake.cc:320)

InstanceDiscoveryService.connectToEndpoint
(instance_discovery_service.dart:58)
My instance uses a private certificate authority installed in Android's user certificate store. As previously reported, the discovery endpoint is accessible through Brave on the same Android device, but Fluxer's Android application rejects the TLS connection before completing instance discovery. The self-hosted deployment is operational, with all 25 running Docker containers reporting healthy status. It has not yet been upgraded to the 24 October server release, so this reproduction isolates the newer Android client against the existing working server. Current status: Still reproducible on beta 11. This appears consistent with the Android application's certificate trust configuration not recognising the user-installed CA.
Comment by Wolfae
Wolfae OP1 vote
Update — 6 November 2026: Still reproducible on latest Android beta and freshly updated self-hosted instance I've retested this issue after updating both the server and Android client. Current environment:
  • Android client: 2026.11.100-beta.4
  • Device: Samsung Galaxy S25 Ultra
  • Android version: 17
  • Server: Freshly updated Fluxer self-hosted deployment (5 November 2026 Compose release)
  • Instance: https://(LAN URL)
  • TLS: Private CA, installed and trusted by Android's user certificate store
Observed behaviour: The Android application now displays a different frontend error: Failed to reach https://(LAN URL)/api/.well-known/fluxer (unknown) However, ADB Logcat reveals that the underlying failure is unchanged:
[InstanceDiscovery] Request failed for
https://(LAN URL)/api/.well-known/fluxer
type=DioExceptionType.unknown status=unknown message=null

DioException [unknown]: null
Error: HandshakeException: Handshake error in client
(OS Error: CERTIFICATE_VERIFY_FAILED:
self signed certificate in certificate chain
(handshake.cc:319))
The exception originates from InstanceDiscoveryService._fetchWellKnown at instance_discovery_service.dart:96. Conclusion: Despite updating both the server and Android application, the original certificate verification failure remains reproducible. The frontend error presentation has changed, but the underlying Flutter/Dart TLS handshake failure has not. This appears consistent with the original report concerning certificate trust for privately hosted instances. I can provide additional ADB diagnostics if useful.