fix(network): migrate to mqtt-client 0.4.0 (IP-literal TLS fix)#5895
Merged
Conversation
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>
89e285a to
35081b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mqtt-client 0.4.0 is a breaking release that splits the monolithic
org.meshtastic:mqtt-clientartifact 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 withDomain 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
org.meshtastic:mqtt-clientwithmqtt-client-bom+mqtt-client-core+mqtt-client-transport-tcp+mqtt-client-transport-wsingradle/libs.versions.toml(transports are versionless, pinned by the BOM).core:networkconsumes the BOM viaproject.dependencies.platform(...)because the KMPcommonMaindependency handler doesn't exposeplatform(). Keptapi(notimplementation) so:core:dataand:desktopAppkeep resolvingorg.meshtastic.mqtt.*types transitively.+combinator at eachMqttClientconfig site — the live proxy client (MQTTRepositoryImpl) and the "Test connection" probe (MqttManagerImpl):TcpTransportFactory()(TCP/TLS, the default)+WebSocketTransportFactory()(covers user-enteredws:///wss://broker addresses). 0.4.0 throws at connect and at probe when the transport is unset.🐛 Bug Fixes
🧹 Chores
mqttastic0.3.8 → 0.4.0.Testing Performed
Local baseline on JDK 21:
spotlessCheck,detekt,assembleDebug(google + fdroid), andkmpSmokeCompileall green. The fulltest/allTestsrun on the base migration was also green apart from one pre-existing flake (feature:messaging→MessageViewModelTest.testDeleteMessages, the known Room-ioDispatcher/runTesttiming 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.