Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion test/inc/WindowsAppRuntime.Test.Bootstrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,29 @@ namespace Test::Bootstrap
TP::WindowsAppRuntimeMain::c_PackageNamePrefix));
}

VERIFY_SUCCEEDED(MddBootstrapInitialize(version_MajorMinor, nullptr, minVersion));
// AB#62489699: On slow/loaded test agents (observed on the x86 Win10 22H2 stage) the State

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is AB#62489699?

If this is a reference to issue # 62489699 in the internal Microsoft tracker, use the task.ms URL e.g.

// https://task.ms/62489699 blah blah blah

// Repository can still be indexing the DDLM package we just installed when the bootstrapper
// enumerates it, so MddBootstrapInitialize fails with STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED

@DrusTheAxe Howard Kapustein (DrusTheAxe) Aug 13, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not how it works. Indexing happens as part of Stage, Add and Register if the package is not on the machine. If you "just installed" a package (using any of the above) then, by definition the package has been indexed.

See There is no Install – it’s ‘Stage’ and ‘Register’ for (some) more information.

Can you explain what deployment operation(s) you're doing before this, where you think you're seeing a transient failure?

// (0x80670016). This is transient and clears once indexing completes, so retry with a bounded
// backoff. Only this specific HRESULT is retried; any other failure is verified immediately and
// is not masked.
constexpr HRESULT c_stateRepositoryDependencyNotResolved{ static_cast<HRESULT>(0x80670016) }; // STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED
constexpr UINT32 c_maxInitAttempts{ 10 };
constexpr DWORD c_initRetryDelayMs{ 300 };
HRESULT initHR{ E_FAIL };
for (UINT32 attempt = 1; attempt <= c_maxInitAttempts; ++attempt)
{
initHR = MddBootstrapInitialize(version_MajorMinor, nullptr, minVersion);
if (SUCCEEDED(initHR) || (initHR != c_stateRepositoryDependencyNotResolved) || (attempt == c_maxInitAttempts))
{
break;
}
WEX::Logging::Log::Comment(WEX::Common::String().Format(
L"MddBootstrapInitialize returned STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED (0x%X); State Repository likely still indexing the just-installed package. Attempt %u/%u. Retrying after %ums.",
initHR, attempt, c_maxInitAttempts, c_initRetryDelayMs));
Sleep(c_initRetryDelayMs);
}
VERIFY_SUCCEEDED(initHR);
s_bootstrapDll = std::move(bootstrapDll);
}

Expand Down
Loading