[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

Merged posts

These posts were merged into this one. Their comments are now part of the conversation below, marked with where they came from.

Report details

Reproduction steps

Host a selfhost With HTTPS on your LAN network. Modify caddy to give you a self certificate grab it and install it onto your device, Then open the fluxer mobile app and try to connect to the lan ip.

Expected behaviour

It Should connect like normal for anything else

Actual behaviour

It will Refuse as "unknown issuer"

Build information

Version 2026.11.100, Beta 4, Channel Beta, Build 3007, Android 14 (arm64)

Platform

Android

Evidence

[warning] | [InstanceDiscovery] Request failed for https://lanip/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: unable to get local issuer certificate(handshake.cc:319)) StackTrace: #0 DioMixin.fetch (package:dio/src/dio_mixin.dart:598) <asynchronous suspension> #1 InstanceDiscoveryService._fetchWellKnown (package:fluxer_app/core/instance/instance_discovery_service.dart:96) <asynchronous suspension> #2 InstanceDiscoveryService.connectToEndpoint (package:fluxer_app/core/instance/instance_discovery_service.dart:137) <asynchronous suspension> #3 InstanceSelector.connectToUrl (package:fluxer_app/features/auth/providers/instance_selector_provider.dart:224) <asynchronous suspension> #4 _InstanceSelectorControlState._connectTo (package:fluxer_app/features/auth/presentation/widgets/instance_selector.dart:91) <asynchronous suspension> [warning] | [InstanceSelector] Discovery failed for "LANIP": Failed to reach https://192.168.1.138/api/.well-known/fluxer (unknown) I Hid my lan IP, I know it can cause no harm but its just security measures even though i understand there is 0 risks, With the PHP stuff. idk what is next

6 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.