JavaScript error in main process - TypeError: h.setProgressBar is not a function

Open 💬 3 comments Opened Aug 26, 2026 by akgularda
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

26.820.7780.0

What subscription do you have?

Pro

What platform is your computer?

Microsoft Windows NT 10.0.29648.0 x64

What issue are you seeing?

A JavaScript error occurred in the main process when handling a download item:

Uncaught Exception:
TypeError: h.setProgressBar is not a function
at DownloadItem.<anonymous> (C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\resources\...:289603)
at DownloadItem.emit (node:events:508:28)

What steps can reproduce the bug?

  1. Launch the Codex Desktop application on Windows.
  2. Trigger an action that initiates an internal download or file save operation. Mine was steering a new message.
  3. The application throws an "Uncaught Exception" dialog in the main process during the DownloadItem event.

<img width="606" height="270" alt="Image" src="https://github.com/user-attachments/assets/31c89d53-a285-414e-b185-ac46c40e124d" />

What is the expected behavior?

The file or asset should open or trigger an action with progress updating smoothly without throwing an Electron main process error dialog.

Additional information

The error indicates that the Electron window/taskbar reference (h) passed to the DownloadItem progress handler is either undefined or missing the setProgressBar method on Windows.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 1 day ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #40778

Powered by Codex Action

Meo0324 · 1 day ago

I’m seeing the same issue on Windows with Codex App version 26.820.7780.0.
It happens consistently when I try to save a generated image using either:

  • “Download a copy”
  • Right-click → “Save Image As…”

The image displays normally, but the save/download action triggers:
TypeError: h.setProgressBar is not a function
at DownloadItem.<anonymous>
I can reproduce this every time. Screenshot attached.

<img width="767" height="316" alt="Image" src="https://github.com/user-attachments/assets/440ad7c0-8764-4198-b72c-aa85d4ade84a" />

akashuraguitars · 12 hours ago

Title: Windows desktop app crashes with “h.setProgressBar is not a function” during downloads

I am using the Codex desktop app on Windows x64.

App version: 26.820.10647.0
Codex version: 151.0.7922.170

When I try to download or save a file from a Codex conversation, the application displays this error:

A JavaScript error occurred in the main process

Uncaught Exception:
TypeError: h.setProgressBar is not a function

The error points to a DownloadItem handler in the Codex application:

at DownloadItem.<anonymous> (...\resources\app.asar:...)

The error may appear repeatedly while the download or save operation is in progress.

Expected behavior:
The file should download or save normally without displaying an error dialog.

Actual behavior:
A JavaScript main-process error dialog appears, and the download/save operation may fail or become unreliable.

Steps to reproduce:

  1. Open the Codex desktop app on Windows.
  2. Open or start a Codex conversation.
  3. Trigger an action that downloads or saves a file.
  4. The error dialog appears.

Please investigate the Windows download progress handler. It appears that setProgressBar() is being called on an object that does not provide that method.

<img width="598" height="223" alt="Image" src="https://github.com/user-attachments/assets/d3b90985-2e67-425b-9079-3834208ef51e" />