JanDeDobbeleer/oh-my-posh · error
QueryInterface IAsyncInfo: 0x%08x
Error message
QueryInterface IAsyncInfo: 0x%08x
What it means
When awaiting a Windows Runtime async operation from the SMTC (System Media Transport Controls) media player integration, oh-my-posh first QueryInterface's the returned object for IAsyncInfo. A non-zero HRESULT here is reported as this error, meaning the async operation object did not expose the IAsyncInfo interface - so its status can never be polled and the await aborts.
Source
Thrown at src/runtime/smtc_windows.go:196
return ret
}
func comRelease(ptr unsafe.Pointer) {
if ptr == nil {
return
}
comCall(ptr, iunknownRelease)
}
// Polls instead of registering a Completed handler, to avoid implementing a COM callback object in Go.
func awaitAsync(asyncOp unsafe.Pointer) error {
var asyncInfo unsafe.Pointer
hr := comCall(asyncOp, iunknownQueryInterface,
uintptr(unsafe.Pointer(&iidAsyncInfo)),
uintptr(unsafe.Pointer(&asyncInfo)),
)
if hr != 0 {
return fmt.Errorf("QueryInterface IAsyncInfo: 0x%08x", hr)
}
defer comRelease(asyncInfo)
deadline := time.Now().Add(smtcAsyncTimeout)
for {
var status uint32
comCall(asyncInfo, asyncInfoGetStatus, uintptr(unsafe.Pointer(&status)))
switch status {
case asyncStatusCompleted:
return nil
case asyncStatusCanceled:
return errors.New("async cancelled")
case asyncStatusError:
return errors.New("async failed")
}
if time.Now().After(deadline) {
return errors.New("async timed out")
}View on GitHub (pinned to 0976794618)
Solutions
- Update Windows - very old builds may not implement the expected SMTC async interfaces
- Confirm the process runs on a thread where WinRT is usable (the code initializes RO_INIT_MULTITHREADED just before)
- Treat the media segment as unavailable - the error already degrades the segment rather than crashing the prompt
- If reproducible on a supported Windows 10/11 build, report it with the exact HRESULT code in the message
Defensive patterns
Strategy: fallback
Try / catch
info, err := runtime.QueryMediaPlayer(env)
if err != nil {
// render the media segment empty / hide it instead of failing the prompt
return mediaSegment{}
} Prevention
- Only enable the media segment on Windows 10 1809+
- Hide/degrade the segment gracefully on any media query error
- Keep Windows updated so WinRT async surfaces behave as expected
- Log the HRESULT from the error message when filing bugs
When it happens
Trigger: QueryMediaPlayer or readMediaProperties calling awaitAsync on a Windows version/WinRT surface where the async operation object fails to provide IAsyncInterface; corrupted COM aggregation or an unexpected object returned by the RequestAsync call.
Common situations: Old or stripped-down Windows builds where GlobalSystemMediaTransportControlsSessionManager behaves unusually; COM initialization issues in the calling thread; third-party shell environments interfering with WinRT activation.
Related errors
- RoInitialize: 0x%08x
- RoGetActivationFactory: 0x%08x
- RequestAsync: 0x%08x
- GetResults manager: 0x%08x
- GetSessions: 0x%08x
AI-assisted analysis of JanDeDobbeleer/oh-my-posh@0976794618 (2026-08-31).
Data as JSON: /api/errors/1090b88aa38578c8.
Report an issue: GitHub.