openai / openai/codex

[Windows] In-app updater enqueues a paused Store item it cannot commit: "Preparing the update" hangs forever and the Microsoft Store Update button stops working

Open
#44,601 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

app bug windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Summary

The ChatGPT Desktop in-app updater queues its own Microsoft Store update in a paused state, downloads the payload, then tries to commit the install from inside the running process whose files the install must replace. That can never succeed, so the UI hangs on "Preparing the update" with the bar about half filled: download complete, install impossible.

Worse, the abandoned paused queue item is left in invalid state, which makes the Microsoft Store's own Update button inert for this product. Pressing the in-app button therefore disables the one path that does work, and the app can sit many builds behind indefinitely.

Environment
OS Windows 11 Home Single Language 26100
Package OpenAI.Codex_2p2nqsd0c76g0 (Store product 9PLM9XGG6VKS)
Versions seen 26.820.7780.0 through 26.903.9818.0
Install source Microsoft Store (MSIX)
What happens

From Microsoft-Windows-Store/Operational, after pressing Update inside ChatGPT:

18:34:58  ResumeWithFlags request: productId = 9PLM9XGG6VKS, clientAppId = ChatGPT
18:34:58  DirectDownloadState check: clientId=ChatGPT, installType=Update
18:34:58  BeginAcquireLicense -> EndAcquireLicense -> BeginDownload
18:35:01  DownloadProgressHeartbeat :: ClientAppId = Update;ChatGPT-SearchForUpdatesWithPausedAddAsync
18:37:15  EndDownload                                    <-- payload fully downloaded
06:07:10  FulfillmentComplete ... DownloadSize = 620977902
06:50:17  ResumeWithFlags request: clientAppId = ChatGPT  <-- errors
06:59:45  ResumeWithFlags request: clientAppId = ChatGPT  <-- errors
07:20:10  ResumeWithFlags request: clientAppId = ChatGPT  <-- errors

The commit fails because the app is running. From AppXDeploymentServer/Operational:

Packages were not updated because affected apps are still running.
  Running apps: {OpenAI.Codex_2p2nqsd0c76g0!App}
error 0x80073D02: Unable to install because the following apps need to be closed
  OpenAI.Codex_<version>_x64__2p2nqsd0c76g0

Afterwards the Store's own button is dead. Every press logs only:

MoveToFront request: productId = 9PLM9XGG6VKS
Queue item cannot be moved to front of queue, invalid state  Item = 9PLM9XGG6VKS
[Warning] Download running, not restarting   Function: UWAInstallWork::Resume
[Error]   ResumeWithFlags2  QueueItemId = {...}

while Delivery Optimization confirms nothing is transferring:

ForegroundDownloadCount : 0     BackgroundDownloadCount : 0
ForegroundDownloadsPending : 0  BackgroundDownloadsPending : 0
Impact

Full 600 to 800 MB packages are downloaded, staged, then discarded when registration fails, and re-downloaded on the next build. Observed repeatedly:

Date Build Outcome
08-28 26.820.10647.0 register failed 0x80073D02, removed 2h33m later
09-01 26.831.1445.0 staged 757 MB, removed next morning, never registered
09-03 26.901.1978.0 register failed twice (13:20, 14:32), removed next day
09-10 26.903.9818.0 staged 06:41, removed 10:51

At one point the Delivery Optimization cache held 3.9 GB across seven partial Codex payloads (0%, 1%, 5%, 27%, 50%, 82%, 83%) from discarded builds. The app stayed on a build from five days earlier while this repeated daily.

Hibernation makes it self-sustaining: it preserves running processes, so the app resumes still running and effectively never exits, so registration never gets its window.

Expected behaviour

The updater should either request the install with ForceTargetApplicationShutdown and exit, or defer the commit to next launch, which is the pattern Chrome and other Electron updaters use. It should not attempt to commit an MSIX install from inside the process being replaced, and it should not leave a paused queue item behind when it gives up.

Workaround for other users
  1. Never press the in-app Update button.
  2. Fully quit ChatGPT (tray icon, Quit). Closing the window leaves around 9 processes alive.
  3. Update from the Microsoft Store product page with the app closed.

If the Store button is already dead, the queue item has to be cleared first: stop InstallService, wuauserv, DoSvc and BITS, clear %LOCALAPPDATA%\Packages\Microsoft.WindowsStore_8wekyb3d8bbwe\LocalCache, then run wsreset. Note that a Microsoft.WindowsStore item stuck at 0x80240016 ("another installation is already in progress") in the same queue can head-of-line block this product.

Notes for triage
  • downloadSize: 1 in early InstallState notifications is a normal placeholder, not corruption. Healthy items show it too, before the real size resolves.
  • The Store UI is unreliable here: it displayed "Downloading" and "Queued" while AppInstallManager.GetCurrentStatus() reported ReadyToDownload or Pending with 0 bytes.
  • AppInstallItem.Restart() and AppInstallManager.Restart(productId) both return E_FAIL on the stuck item. Cancel() reports success without removing it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Windows in-app Update button into the Microsoft Store flow, using AppInstallManager.GetCurrentStatus(), AppInstallItem.Restart(), and the Store and AppXDeploymentServer operational logs described here. Done means the update is committed only after the running app exits or is deferred to the next launch, and abandoning an attempt does not leave an invalid queue item that blocks the Store button.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop, release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.