| Previous | Next |
| ERROR_STATE_OPEN_CONTAINER_FAILED | ERROR_STATE_DELETE_CONTAINER_FAILED |
ERROR_STATE_CREATE_CONTAINER_FAILED
A state container could not be created
ERROR_STATE_CREATE_CONTAINER_FAILED occurs when the state service cannot allocate or commit a new logical container. The error can appear during first run, package initialization, profile setup, or migration.
Frequent causes
- The name is invalid or conflicts with an existing object.
- The repository is read-only, full, or unavailable.
- The caller lacks rights in the selected scope.
- A concurrent creator wins the race and changes the expected state.
Diagnosis and repair
Log the exact container name, scope, creation flags, and underlying error. Recheck whether the container now exists before retrying. Repeated blind creation attempts can turn a race into noisy failures.
Implementation note
Make initialization idempotent: open an existing compatible container or create it once, then validate its schema before use.
Naming and scope checks
Before creation, validate the final normalized name and confirm that the intended scope is local, roaming, user, or package specific. A correct name in the wrong scope can create duplicate state that later appears to be missing.
Race-resistant initialization
After a collision or ambiguous failure, attempt to open and validate the existing container rather than simply retrying creation. This handles the case where another process completed initialization first.
References
Looking for a different code? Search another status or error code.
