| Previous | Next |
| STATEREPOSITORY_E_CONFIGURATION_INVALID | STATEREPOSITORY_ERROR_DICTIONARY_CORRUPTED |
STATEREPOSITORY_E_UNKNOWN_SCHEMA_VERSION
STATEREPOSITORY_E_UNKNOWN_SCHEMA_VERSION belongs to Windows StateRepository. It marks the repository schema version is not understood by the installed component. The useful starting point is the exact API, object and state transition that returned 0x80670004, because a shell or application message can hide that boundary.
First rejecting layer
StateRepository is infrastructure for the Windows application model., the HRESULTs expose distinctions familiar from transactional stores: optimistic concurrency, an unfinished prepared statement, database-versus-table locking, shared-cache contention, recovery, schema compatibility, corruption, and service shutdown. During a this result investigation, these are not interchangeable reasons to delete the repository.
When it is returned, schema version mismatch can follow upgrade, rollback, image restoration, or copying repository data across builds. During a this result investigation, the bytes may be internally consistent yet incompatible with the current reader.
The first owner to inspect is the StateRepository request, database connection, prepared statement, transaction, schema generation, or service lifecycle that rejected the operation.
Smallest faithful test
During a this result investigation, reduce the case while preserving the condition described by the HRESULT.
- First: Preserve the repository before repair.
- Next: Confirm supported migration direction.
- Then: Complete pending servicing or use a matching build.
- Finally: Test migration on a copy rather than editing version fields.
Diagnostic matrix
- On-disk schema version. for it, this creates a stable comparison across retries or another machine within the Windows StateRepository boundary.
- OS and component build. for it, this pins the event to an object or resource generation within the Windows StateRepository boundary.
- Upgrade or rollback history. for it, this places the event on the lifecycle or transaction timeline within the Windows StateRepository boundary.
- Database provenance and restore time. for it, this separates caller input from environment and service state within the Windows StateRepository boundary.
What each result would imply
- Isolated connection against a repository copy: for it, a changed result separates retained object, connection, path, host, or device state from the original input. Hold constant: for it, preserve schema, data generation, and transaction sequence.
- Reduced failing operation: If this result follows the reduced step, the rejecting transition is localized. Hold constant: for it, retain on-disk schema version and remove only unrelated work.
- Targeted corrective control: Use this as a diagnostic branch rather than a blanket workaround: preserve the repository before repair. Hold constant: for it, keep the original it sample available for the final regression test.
Limits of the HRESULT
Dictionary or cache corruption means invalid content; UNKNOWN_SCHEMA_VERSION can describe valid data from another format generation.
Do not change the version number manually or transplant tables between builds.
Prove the repair
Treat it as corrected only when a supported migration or matching component opens the repository and survives restart with the same schema; retain the original negative case so fallback cannot be mistaken for repair.
Technical references
The references below define the API family or storage/protocol behavior used to interpret it.
- Microsoft Win32 metadata: winerror.h
- SQLite: Database file format
- Microsoft: Windows service guidance for StateRepository
- SQLite: File locking and concurrency
Looking for a different code? Search another status or error code.
