Universal Tuya docsHomeSupported devicesRequest a deviceFAQChangelogArchitectureKnowledge baseCreditsSourcesContributing

Athom "socket hang up" / processing_failed / AggregateError — root-cause study (P2930, 21/10/2026 Paris)

Upload always succeeds; Athom's processing of the build fails 40–70 s later with no error body. Data: Athom build history of the three apps (read-only workflow athom-build-history.yml, run 39570436772 / 39570806991), the publish-size-telemetry artifacts (41 rows) and the publish run logs.

1. Natural experiment — failure rate vs manifest size

AppWindowBuildsprocessing_failedRateDriversFlow cards in payloadapp.json sent
Bastien19→24/09 (full manifest, before P2724 slim)1055350 %~full~full~3+ MB
Bastien25/09→21/10 (house-fleet slim, P2724)9078 % (0/38 since 13/10)27~1 0000.6 MB
Stable17/09→21/101995829 %3385 4553.2 MB
Masterlast 60 builds593661 %347–3496 111–6 1183.6 MB

Same account, same CLI, same pipeline: the rate follows the manifest (drivers × flow cards), and Bastien's own rate dropped from 50 % to 8 % on the day its manifest was slimmed.

2. Hypotheses rejected with data

HypothesisEvidenceVerdict
Concurrent uploads of the 3 appsUpload within ±5 min of another app: 3 fail / 9; alone: 13 fail / 21 (33 % vs 62 %)No positive correlation — no cross-app serialization added
Payload bytes / file countStable payload (33 MB) is larger than master (31 MB) yet fails half as often; Bastien 21 MB/2 511 files ≈ 0 %Not the driver
"66 MB / 8 678 files stable retries passed"Telemetry artifact: it counted the nested .homeybuild the CLI writes; the CLI uploads one treeTelemetry fixed (skips .homeybuild)
Oversized images451 large.png 500×500, 451 small.png 75×75, total images 5.4 MB, largest 149 kBNot the cause
Zero-byte files, symlinks, non-ASCII names0 / 0 / 0 in the buildNot the cause
Same content flips pass/fail9.0.1560–1563 near-identical: 4 fails then 1565–1567 passNon-deterministic → time budget on Athom's worker, scaled by manifest work

3. Defects found in the payload (fixed)

DefectMaster beforeMaster afterStable beforeStable after
Orphan flow cards (device filter names only absent drivers)1 507 / 6 118 (25 %)0 / 4 6111 409 / 5 455 (26 %)0 / 4 046
app.json sent3.65 MB3.09 MB (−15 %)3.23 MB2.73 MB
Driver folders absent from the manifest (dead payload)102 dirs, 2.78 MB, 682 files0104 dirs0

Cause: the Zigbee matrix compaction prunes 102 synthetic drivers from the manifest but kept their flow cards and folders (the publish hold already dropped its own). Bastien had the same defect (430 orphans, P2928). Every orphan card makes Athom's processor resolve a filter against a driver that does not exist. Fix: scripts/maintenance/prune-orphan-flow-cards.cjs, called by scripts/prepare-publish.js (step 5a3, fail-closed), lossless (no Flow can use a card of a driver that is not shipped); mixed filters only lose the absent ids. Payload validated by homey-lib at level publish on both branches.

4. OTA firmware

27 .bin files, 2.8 MB (~8 % of bytes, incompressible), some duplicated across drivers (e.g. oem_zg_tl8258_plug_OTA_1.1.2.bin in smartplug + plug_energy_monitor). None in pruned folders. Fetching on demand would save ~2.5 MB gz but changes runtime OTA behaviour; not done here. Size is not the main driver (section 2), so this is an optimisation, not the root-cause fix.

5. Other CI fixes in P2930

6. To measure next

Failure rate of master/stable builds after 9985538dc4 / f178ceb896 (master) and 89214d1a88 / 94148bfc03 (stable), via athom-build-history.yml. Remaining lever if still > ~10 %: reduce the 4 611 remaining cards (driver-level duplicates) — needs a user decision as card ids are user-visible.

7. First results after the fix (21/10/2026, Paris time)

AppBuildPayloadResult
Stable5.12.487 (11:12)28.0 MB / 3 655 files, 9.7 MB gz, app.json 2.59 MB, 4 046 cards, 0 orphansprocessing_failed
Stable5.12.488 (11:23)sameprocessing_failed
Master9.0.1579 (11:05)orphan prune + dead folders removedprocessing_failed
Bastien (unchanged, 27 drivers)1.0.188 (11:11)21 MB, 0.65 MB app.jsonprocessing_failed

Since 09:30 all three apps fail together, including the slim Bastien app (0/38 failures from 13/10 to this morning). Removing the orphan cards (−25 % cards, −15 % app.json, −10 % files) did not flip the outcome on its own. HEIMAN is ruled out as a trigger (stable and Bastien do not ship it). Today's data points to an Athom-side degradation that hits every app; the historical manifest-size correlation (section 1) is still real, but it is not the whole explanation. Next measurement: the share of failures per app over the next days, with athom-build-history.yml.

P2930f — bisect du 21/10/2026 (11:50–14:10, heure de Paris)

Bastien (bastien-home) : contenu exact 1.0.187 puis P2931 → P2934 ajoutés un par un sur une branche temporaire (supprimée).

master : dernier Test 9.0.1574 (20/10). Échecs AggregateError depuis 9.0.1575 (21/10 09:05 Paris).

← Knowledge base index · source