[Android ] High Battery drain when server isnt available #7602

Open
opened 2026-02-05 13:10:29 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @pustekuchen91 on GitHub (Oct 23, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

Setup

Immich with Nginx Proxy and SSL Certificate for internal domain. (immich.internal.mydomain.de)

Problem

When im not in my home network, immich tries very oft to reach the domain and fails with a ssl certificate error.

The battery drain seems also be higher then it should. The app wasnt in foreground for that time. the request are happening in the background.

Image

The OS that Immich Server is running on

synology nas / docker

Version of Immich Server

2.1.0

Version of Immich Mobile App

2.1.0

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

Honor Magic Pro 5

Your docker-compose.yml content

not relevant

Your .env content

not relevant

Reproduction steps

  1. Leave WLAN
  2. let immich app run in background

Relevant log output

2025-10-23 18:11:16.612332 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:11:11.817405 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:11:11.490585 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:11:06.388289 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:11:06.365037 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:11:01.267665 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:11:01.263174 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:56.161661 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:56.140199 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:51.064991 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:51.053274 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:45.953493 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:45.948784 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:40.856406 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:40.855293 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:35.767628 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:35.758279 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:30.650158 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:30.648042 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:25.554236 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:25.549290 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |
2025-10-23 18:10:20.443335 | severe   | HttpSSLCertOverride  | Invalid SSL certificate for immich.internal.mydomain.de:443 |

Additional information

No response

Originally created by @pustekuchen91 on GitHub (Oct 23, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug # Setup Immich with Nginx Proxy and SSL Certificate for internal domain. (`immich.internal.mydomain.de`) # Problem When im not in my home network, immich tries very oft to reach the domain and fails with a ssl certificate error. The battery drain seems also be higher then it should. The app wasnt in foreground for that time. the request are happening in the background. ![Image](https://github.com/user-attachments/assets/90757e6c-6f8f-4249-81df-aea8b031c5de) ### The OS that Immich Server is running on synology nas / docker ### Version of Immich Server 2.1.0 ### Version of Immich Mobile App 2.1.0 ### Platform with the issue - [ ] Server - [ ] Web - [x] Mobile ### Device make and model Honor Magic Pro 5 ### Your docker-compose.yml content ```YAML not relevant ``` ### Your .env content ```Shell not relevant ``` ### Reproduction steps 1. Leave WLAN 2. let immich app run in background ### Relevant log output ```shell 2025-10-23 18:11:16.612332 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:11:11.817405 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:11:11.490585 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:11:06.388289 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:11:06.365037 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:11:01.267665 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:11:01.263174 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:56.161661 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:56.140199 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:51.064991 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:51.053274 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:45.953493 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:45.948784 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:40.856406 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:40.855293 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:35.767628 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:35.758279 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:30.650158 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:30.648042 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:25.554236 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:25.549290 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | 2025-10-23 18:10:20.443335 | severe | HttpSSLCertOverride | Invalid SSL certificate for immich.internal.mydomain.de:443 | ``` ### Additional information _No response_
Author
Owner

@Hinfty commented on GitHub (Oct 27, 2025):

I wonder whether it could help to enable the URL switching feature for your home wifi and leave the external network section empty

@Hinfty commented on GitHub (Oct 27, 2025): I wonder whether it could help to enable the URL switching feature for your home wifi and leave the external network section empty
Author
Owner

@pustekuchen91 commented on GitHub (Oct 28, 2025):

Hey @Hinfty,

I tested it out. It doesn't help. I think it's because of the server url which is used at login. The url is always unreachable from external networks

@pustekuchen91 commented on GitHub (Oct 28, 2025): Hey @Hinfty, I tested it out. It doesn't help. I think it's because of the server url which is used at login. The url is always unreachable from external networks
Author
Owner

@YarosMallorca commented on GitHub (Dec 8, 2025):

@shenlong-tanwen could you please take a look at this if possible? Thanks :)

@YarosMallorca commented on GitHub (Dec 8, 2025): @shenlong-tanwen could you please take a look at this if possible? Thanks :)
Author
Owner

@shenlong-tanwen commented on GitHub (Dec 9, 2025):

@pustekuchen91 Can you share the entire mobile app log? The time from the screenshot is between 13:00-14:00 while the one from the log is around 18:00

@shenlong-tanwen commented on GitHub (Dec 9, 2025): @pustekuchen91 Can you share the entire mobile app log? The time from the screenshot is between 13:00-14:00 while the one from the log is around 18:00
Author
Owner

@pustekuchen91 commented on GitHub (Dec 9, 2025):

@shenlong-tanwen the log around 13-14 has the same entries. The issue still persists with the latest app version.

@pustekuchen91 commented on GitHub (Dec 9, 2025): @shenlong-tanwen the log around 13-14 has the same entries. The issue still persists with the latest app version.
Author
Owner

@pustekuchen91 commented on GitHub (Dec 9, 2025):

Here are two more errors which ocurre once. The other logs mentions are spammed all day.

HandshakeException: Handshake error in client (OS Error: 
	CERTIFICATE_VERIFY_FAILED: Hostname mismatch(handshake.cc:297))
#0      _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:101)
#1      _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:146)
#2      _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:1009)
#3      _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1139)
<asynchronous suspension>
ParallelWaitError(2 errors): ApiException 400: TLS/SSL communication failed: GET /users/me (Inner exception: HandshakeException: Handshake error in client (OS Error: 
	CERTIFICATE_VERIFY_FAILED: Hostname mismatch(handshake.cc:297)))

#0      _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:101)
#1      _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:146)
#2      _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:1009)
#3      _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1139)
<asynchronous suspension>

#0      ApiClient.invokeAPI (package:openapi/api_client.dart:111)
<asynchronous suspension>
#1      UsersApi.getMyUser (package:openapi/api/users_api.dart:287)
<asynchronous suspension>
#2      FutureRecord2.wait.<anonymous closure> (dart:async/future_extensions.dart:88)
<asynchronous suspension>
#3      UserApiRepository.getMyUser (package:immich_mobile/infrastructure/repositories/user_api.repository.dart:14)
<asynchronous suspension>
#4      UserService.refreshMyUser (package:immich_mobile/domain/services/user.service.dart:38)
<asynchronous suspension>
#5      Future.timeout.<anonymous closure> (dart:async/future_impl.dart:1061)
<asynchronous suspension>
#6      AuthNotifier.saveAuthInfo (package:immich_mobile/providers/auth.provider.dart:134)
<asynchronous suspension>
#7      SplashScreenPageState.resumeSession.<anonymous closure> (package:immich_mobile/pages/common/splash_screen.page.dart:60)
<asynchronous suspension>
@pustekuchen91 commented on GitHub (Dec 9, 2025): Here are two more errors which ocurre once. The other logs mentions are spammed all day. ``` HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: Hostname mismatch(handshake.cc:297)) ``` ``` #0 _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:101) #1 _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:146) #2 _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:1009) #3 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1139) <asynchronous suspension> ``` ``` ParallelWaitError(2 errors): ApiException 400: TLS/SSL communication failed: GET /users/me (Inner exception: HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: Hostname mismatch(handshake.cc:297))) #0 _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:101) #1 _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:146) #2 _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:1009) #3 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1139) <asynchronous suspension> ``` ``` #0 ApiClient.invokeAPI (package:openapi/api_client.dart:111) <asynchronous suspension> #1 UsersApi.getMyUser (package:openapi/api/users_api.dart:287) <asynchronous suspension> #2 FutureRecord2.wait.<anonymous closure> (dart:async/future_extensions.dart:88) <asynchronous suspension> #3 UserApiRepository.getMyUser (package:immich_mobile/infrastructure/repositories/user_api.repository.dart:14) <asynchronous suspension> #4 UserService.refreshMyUser (package:immich_mobile/domain/services/user.service.dart:38) <asynchronous suspension> #5 Future.timeout.<anonymous closure> (dart:async/future_impl.dart:1061) <asynchronous suspension> #6 AuthNotifier.saveAuthInfo (package:immich_mobile/providers/auth.provider.dart:134) <asynchronous suspension> #7 SplashScreenPageState.resumeSession.<anonymous closure> (package:immich_mobile/pages/common/splash_screen.page.dart:60) <asynchronous suspension> ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#7602