Skip to content

fix(network): migrate to mqtt-client 0.4.0 (IP-literal TLS fix)#5895

Merged
jamesarich merged 1 commit into
mainfrom
claude/thirsty-cori-5265e2
Jun 22, 2026
Merged

fix(network): migrate to mqtt-client 0.4.0 (IP-literal TLS fix)#5895
jamesarich merged 1 commit into
mainfrom
claude/thirsty-cori-5265e2

Conversation

@jamesarich

@jamesarich jamesarich commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

mqtt-client 0.4.0 is a breaking release that splits the monolithic org.meshtastic:mqtt-client artifact into a BOM + core + per-transport modules and makes the transport a required public SPI. Bumping to it ships the upstream fix for TLS to a private MQTT broker addressed by an IP literal, which previously failed with Domain specific configurations require that hostname aware checkServerTrusted(...) is used.

Resolves #5894 — the fix landed upstream in meshtastic/MQTTastic-Client-KMP#67, released as v0.4.0.

🛠️ Refactoring & Architecture

  • Dependency split (breaking upstream): replaced the single org.meshtastic:mqtt-client with mqtt-client-bom + mqtt-client-core + mqtt-client-transport-tcp + mqtt-client-transport-ws in gradle/libs.versions.toml (transports are versionless, pinned by the BOM).
  • core:network consumes the BOM via project.dependencies.platform(...) because the KMP commonMain dependency handler doesn't expose platform(). Kept api (not implementation) so :core:data and :desktopApp keep resolving org.meshtastic.mqtt.* types transitively.
  • Transport is now an explicit SPI. Both transports are registered and composed with the + combinator at each MqttClient config site — the live proxy client (MQTTRepositoryImpl) and the "Test connection" probe (MqttManagerImpl): TcpTransportFactory() (TCP/TLS, the default) + WebSocketTransportFactory() (covers user-entered ws:///wss:// broker addresses). 0.4.0 throws at connect and at probe when the transport is unset.

🐛 Bug Fixes

🧹 Chores

  • mqttastic 0.3.8 → 0.4.0.

Testing Performed

Local baseline on JDK 21: spotlessCheck, detekt, assembleDebug (google + fdroid), and kmpSmokeCompile all green. The full test / allTests run on the base migration was also green apart from one pre-existing flake (feature:messagingMessageViewModelTest.testDeleteMessages, the known Room-ioDispatcher / runTest timing race) which passes on isolated re-run and is unrelated to this change. The WebSocket-transport addition is additive (no test constructs a client/transport). No test files were modified.

@github-actions github-actions Bot added the bugfix PR tag label Jun 22, 2026
mqtt-client 0.4.0 is a breaking release: it splits the single
org.meshtastic:mqtt-client artifact into a BOM + core + per-transport
modules and promotes the transport to a required public SPI. Bumping to it
ships the upstream fix for TLS handshakes to a private MQTT broker addressed
by IP literal, which previously failed with "Domain specific configurations
require that hostname aware checkServerTrusted(...) is used".

- Catalog: bump mqttastic 0.3.8 -> 0.4.0; replace the single artifact alias
  with mqtt-client-bom + mqtt-client-core + mqtt-client-transport-tcp +
  mqtt-client-transport-ws (transports versionless, pinned by the BOM).
- core:network: consume the BOM via project.dependencies.platform(...) since
  the KMP commonMain dependency handler has no platform() DSL; keep `api`
  exposure so :core:data and :desktopApp keep resolving org.meshtastic.mqtt.*
  transitively.
- Register both transports, composed with the `+` combinator at both client
  sites -- the live proxy client (MQTTRepositoryImpl) and the "Test connection"
  probe (MqttManagerImpl): TcpTransportFactory() (tcp://-/ssl://, the default)
  + WebSocketTransportFactory() (user-entered ws://-/wss:// brokers). 0.4.0
  throws at connect/probe when the transport is unset.

Resolves #5894

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jamesarich jamesarich force-pushed the claude/thirsty-cori-5265e2 branch from 89e285a to 35081b6 Compare June 22, 2026 13:55
@jamesarich jamesarich enabled auto-merge June 22, 2026 13:57
@jamesarich jamesarich added this pull request to the merge queue Jun 22, 2026
Merged via the queue into main with commit ba9319c Jun 22, 2026
23 checks passed
@jamesarich jamesarich deleted the claude/thirsty-cori-5265e2 branch June 22, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: TLS handshake fails with private MQTT broker

1 participant