Universal Tuya docsHomeSupported devicesRequest a deviceFAQChangelogArchitectureKnowledge baseCreditsSourcesContributing

Athom processing_failed | socket hang up — evidence, conclusion, fixes (2026-10-19)

Question from the user: "it is an app size problem". This note records what the run logs of 2026-10-18/19 show, what we changed on our side, and what stays unproven. Nothing here involved contacting Athom.

Evidence (CI run logs, one row per Athom build)

Master (auto-publish-on-push.yml, upload with the Homey CLI, archive = what the CLI reports):

versionbuildCLI archivefilesapp.jsonoutcome
9.0.1516359735.83 MB45363.93 MBTest
9.0.1517359835.83 MB45363.93 MBTest
9.0.1518359935.83 MB45363.93 MBTest
9.0.1519360035.84 MB45373.93 MBsocket hang up
9.0.1520360135.85 MB45373.93 MBTest
9.0.1521360235.85 MB45373.93 MBTest
9.0.1522360335.85 MB45373.93 MBsocket hang up
9.0.1523360435.86 MB45423.93 MBTest (whd02 released)
9.0.1524360535.85 MB45373.93 MBsocket hang up
9.0.1525360635.87 MB45473.93 MBsocket hang up (spi released)
9.0.1526360735.87 MB45473.93 MBsocket hang up (spi released)

Stable (publish-stable.yml, Homey CLI): 38.18–38.52 MB, 4610–4631 files, app.json 3.50 MB. #339 v5.12.445 F, #341 v5.12.447 F, #343 v5.12.449 T with the same 38.33 MB / 4631-file archive.

Bastien (bastien-publish.yml, direct Apps API upload): 21.1–21.5 MB raw, 5.1 MB gz, 2667–2673 files, ~30 drivers. Builds #170–#176 (v1.0.162–1.0.168): 7 of 7 reached Test, "ready as test" about 2 s after upload.

Findings

  1. Within one app the size does not decide the outcome. Archives that are byte-for-byte the same size (±0.02 MB, same file count) flip between Test and socket hang up (master 3601/3602 T vs 3603 F; stable 343 T vs 339/341 F). So size is not a deterministic cause and no per-app threshold exists in the data.
  2. Across apps there is a weak correlation. The small app (30 drivers, 5 MB gz) never fails; the two big apps (335–346 drivers, 4,500+ files, 35–38 MB raw) fail about 40–45 % of the time. That fits "Athom's processing of a big app times out sometimes" (volume/complexity raises the odds) better than a hard size limit. It is not proof; only a controlled series would show it.
  3. stateMeta=socket hang up is written by Athom after our upload was accepted. Upload retries/backoff on our side therefore cannot prevent it; the only remedy on our side is a new build (new version) of the same content.
  4. Not the cause (checked): runner network (upload accepted every time), concurrency with other apps (a failing master upload at 23:55:52 and a succeeding stable upload at 23:56:11 overlapped), token/session (same session in the same run), the 4 MB app.json limit (3.93 MB passes; it was already compacted before every build).
  5. The pipeline was not retrying: assert-athom-final turned the job green via SOFT-EXPECT while an older Test stayed healthy, and transient-publish-retry (P2831) refused to retry whenever any Test existed. Net effect: three master builds in a row stayed failed and Test lagged the source by 4 versions. This is the part we could fix.

What dominates the payload (master, after prepare-publish, MiB)

drivers 15.3 (2893 files: js 4.2, png 3.5, html 2.7, svg 2.3, firmware .bin 2.5), lib 10.4 (1034 files), app.json 3.9, node_modules 1.9 after prune, data 1.1, config 0.5. About 6.4 MiB of drivers/ is byte-identical duplicates (png/svg/html). They are not safe to dedupe: LearnmodeTemplates resolves {{driverAssetsPath}}/icon.svg and ButtonVisual reads the driver large.png by path at runtime, and pair views cannot be shared between drivers.

Changes (additive, lossless)

Still open

Update 2026-10-19 09:40 (Europe/Paris): measure the uploaded app.json, shrink it losslessly (P2830h)

Wrong artifact. homey app validate/build writes .homeybuild/app.json (and on stable the root app.json) with every driver Flow card merged in. That file is not uploaded: prepare-publish sanitizes, compacts the Zigbee matrix and syncs the prepared manifest back. When a job stopped before prepare-publish (master run 39212802011, guidelines error), the metadata-commit pre-commit hook judged the raw 4.75 MB build and failed. Stable's pre-step judged the 4.34 MB composed root (warn-only step). The gate now projects such a file through sanitize + compact + strip, the same steps as prepare-publish, and fails only if the projection is above 4.00 MB.

appraw build app.jsonupload app.json beforeafter P2830hstrip savedcards stripped
master 9.0.15364.75-4.80 MB3.92-3.93 MB3.46-3.48 MB0.467 MB4930
stable 5.12.4594.29-4.34 MB~3.5 MB3.07-3.08 MB0.439 MB4679
bastien4.47 MB~0.64 MB0.56 MB0.080 MB761

Lossless strip. scripts/maintenance/strip-redundant-title-formatted.cjs removes titleFormatted only when homey-lib App._validateFlowCard ignores it: no argument other than the first driver_id-filtered device argument, no droptoken, and no [[..]]. The Flow UI then renders the title. Card ids, args, tokens and titles are unchanged. homey app validate --level publish gives the same 116 titleFormatted warnings before and after on master. It runs on the publish copy only; the compose sources are not modified.

Results:

Other options checked and not taken:

← Knowledge base index · source