fix(core): allow 60 s for the metadata load and name the URL on timeout #26

Merged
james.maes merged 1 commits from fix/metadata-load-timeout into main 2026-11-09 20:01:50 +00:00
Owner

Fixes "Error loading QInstance: timeout" when the scanner app opens the Echo print app.

Root cause: the metadata load (GET /qqq/v1/metaData, via QViewModel.loadQInstance -> NetworkQQQRepository.getMetaData) used the repository's Retrofit client, which has OkHttp default timeouts (10 s read). A platform-admin response on staging is 1,722,327 bytes and takes the server 4 to 8 s to build, so handhelds timed out. (The 5 s call timeouts in UiApiCompatibility, HostRuntime and MobileSessionApi cover only the small /version, presentation and session calls and are unchanged.)

Change: only the metadata call uses a client with a 60 s call and read timeout (METADATA_LOAD_TIMEOUT_SECONDS). A timeout now reads "Timed out after 60.0s loading the server's metadata from /qqq/v1/metaData" (no query string, cookies or tokens).

Tests (NetworkQQQRepositoryTest): metaDataLoadSurvivesAServerThatAnswersAfterTheOldDefaultTimeout (11 s delayed response; fails with SocketTimeoutException before, passes after), metaDataTimeoutNamesTheMetadataLoadAndUrlWithoutSecrets, otherCallsStillUseTheShortDefaultTimeout.

Verified locally: core 60, mobileapp 62, scanner-host 125 unit tests, 0 failures; :scanner-host:lintRelease 0 errors 0 warnings; check-source-standards passed.

CI note: the hosted emulator step is red for a host reason (KVM group), not for this change; merging with admin rights.

Includes PR 24 (already merged) as base.

Fixes "Error loading QInstance: timeout" when the scanner app opens the Echo print app. Root cause: the metadata load (GET /qqq/v1/metaData, via QViewModel.loadQInstance -> NetworkQQQRepository.getMetaData) used the repository's Retrofit client, which has OkHttp default timeouts (10 s read). A platform-admin response on staging is 1,722,327 bytes and takes the server 4 to 8 s to build, so handhelds timed out. (The 5 s call timeouts in UiApiCompatibility, HostRuntime and MobileSessionApi cover only the small /version, presentation and session calls and are unchanged.) Change: only the metadata call uses a client with a 60 s call and read timeout (METADATA_LOAD_TIMEOUT_SECONDS). A timeout now reads "Timed out after 60.0s loading the server's metadata from <server>/qqq/v1/metaData" (no query string, cookies or tokens). Tests (NetworkQQQRepositoryTest): metaDataLoadSurvivesAServerThatAnswersAfterTheOldDefaultTimeout (11 s delayed response; fails with SocketTimeoutException before, passes after), metaDataTimeoutNamesTheMetadataLoadAndUrlWithoutSecrets, otherCallsStillUseTheShortDefaultTimeout. Verified locally: core 60, mobileapp 62, scanner-host 125 unit tests, 0 failures; :scanner-host:lintRelease 0 errors 0 warnings; check-source-standards passed. CI note: the hosted emulator step is red for a host reason (KVM group), not for this change; merging with admin rights. Includes PR 24 (already merged) as base.
james.maes added 1 commit 2026-11-09 20:01:39 +00:00
fix(core): allow 60 s for the metadata load and name the URL on timeout
android / android (push) Successful in 15m7s
build / android (push) Successful in 15m7s
4467d8ec64
GET /qqq/v1/metaData returns about 1.7 MB and takes the server 4 to 8 s to
build; the default 10 s read timeout surfaced as 'Error loading QInstance:
timeout' on handhelds. Only the metadata call gets the long limit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
james.maes merged commit 3b15183f52 into main 2026-11-09 20:01:50 +00:00
Sign in to join this conversation.