iOS icon indicating copy to clipboard operation
iOS copied to clipboard

[mTLS] Custom widgets do not work

Open unleftie opened this issue 7 months ago • 9 comments

Preflight checks

  • [x] I am using the experimental mTLS feature
  • [x] I have reproduced this issue at least once after restarting the app

App platform

iOS

Device and app information

Model Name: Iphone 13 mini OS Version: 26.4.2 App Version: 2026.4.1 (2026.1904)

Home Assistant environment

Home Assistant Core Version: 2026.4.4 Installation Type: Container Host 0S: Ugos Pro (Debian-based Linux distro for NAS) Reverse Proxy: none TLS Termination Point: no TLS for Internal url, Cloudflare Tunnel for External url

mTLS setup details

Client certificate source: generated by Cloudflare Client certificate format: PKCS#12 Certificate validity window: 6 April 2026 - 3 April 2036 Signing CA type: public Server certificate issuer: Cloudflare Full chain served by server?: unknown

Failure symptoms

When does it fail?: on click Frequency: always Time of most recent failure: 2026-04-26 4:39:16.608 PM UTC

Steps to reproduce

  1. Click the lamp toggle widget or another custom widget

Expected vs actual behavior

Expected: The lamp turns on or off.

Actual: The lamp does not turn on or off using both internal or external url.

Removing server and adding it again didn't help. I also noticed that WebSocket status remains 'connecting' all the time.

If the mTLS certificate is removed, the widgets start working again on the internal URL.

The problem is reproduced on two different devices.

Additional context

HomeAssistant-Extensions-Widgets.txt

unleftie avatar Apr 26 '26 16:04 unleftie

I am experiencing the exact same issue. Added my details below

Preflight checks

  • [x] I am using the experimental mTLS feature
  • [x] I have reproduced this issue at least once after restarting the app

App platform

iOS

Device and app information

Model Name: Iphone 17 OS Version: 26.5 App Version: 2026.4.1 (2026.1904)

Home Assistant environment

Home Assistant Core Version: 2026.5.4 Installation Type: HA OS Host 0S: HA OS Reverse Proxy: none TLS Termination Point: no TLS for Internal url, Cloudflare Tunnel for External url

mTLS setup details

Client certificate source: generated by Cloudflare Client certificate format: PKCS#12 Certificate validity window: 15 May 2026 - 15 May 2041 Signing CA type: public Server certificate issuer: Cloudflare Full chain served by server?: unknown

Failure symptoms

When does it fail?: on click Frequency: always Time of most recent failure: 2026-05-25 22:00:03.615 PT

Steps to reproduce

  1. Click the light widget

Expected vs actual behavior

Expected: The light turns on or off.

Actual: The light does not turn on or off using both internal or external url.

If the mTLS certificate is removed, the widgets start working again on the internal URL.

Script widgets work fine.

Additional context

HomeAssistant-Extensions-Widgets.txt

cohenbenjamin05 avatar May 26 '26 05:05 cohenbenjamin05

I've been testing widgets through mTLS for a while now and they are performing correctly, so to move forward I need to know some specifics, can you first try the latest testflight build?

bgoncal avatar Jul 06 '26 13:07 bgoncal

For anyone still experiencing the issue, please reproduce it a few times then export your full companion app logs and DM to me in discord (@ bgoncal2)

bgoncal avatar Jul 06 '26 16:07 bgoncal

@bgoncal it has the same behavior with the latest testflight build but I did find something interesting. It works fine if I disable this rule in cloudflare. I'm assuming that the widget requests are not using mTLS?

Image

cohenbenjamin05 avatar Jul 07 '26 03:07 cohenbenjamin05

They should be, can you export your logs and send to me in discord?

bgoncal avatar Jul 07 '26 06:07 bgoncal

After some more investigation, we found a pattern related to the minimum TLS version, if you are using cloud flare can you change that to default (1.0) and retry?

bgoncal avatar Jul 07 '26 09:07 bgoncal

Yeah it's already default 1.0

Image

cohenbenjamin05 avatar Jul 07 '26 19:07 cohenbenjamin05

@cohenbenjamin05 in that case your issue is different, please send me your logs in discord.

bgoncal avatar Jul 07 '26 19:07 bgoncal

It worth rebooting your phone though, the other user that was debugging with me had to do that to have it working.

bgoncal avatar Jul 07 '26 19:07 bgoncal