deepseek-ai/deepseek-harness · error · Win32Error
ConvertStringSidToSidW failed (Win32 ${win32Code}): ${sid}
Error message
ConvertStringSidToSidW failed (Win32 ${win32Code}): ${sid} What it means
Error "ConvertStringSidToSidW failed (Win32 ${win32Code}): ${sid}" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/sandbox/sandbox-windows-acl/src/index.ts:235
get tempDir(): string | null | undefined {
return this.tempDirResolved
}
/** Create the restricted token and apply the capability-SID grants. Idempotent-unsafe: once per instance. */
async init(): Promise<void> {
if (this.api !== undefined) throw new Error('AclSandbox is already initialized')
const api = await win32()
const currentToken = openCurrentProcessToken(api)
let currentTokenOpen = true
let restrictedToken: NativePtr | undefined
try {
const parseSid = (sid: string): NativePtr => {
const sidSlot = allocPtrSlot()
if (api.convertStringSidToSidW(sid, sidSlot) === 0) {
throwLastError(api, 'ConvertStringSidToSidW', sid)
}
const parsedSid = decodePtr(sidSlot)
if (parsedSid === null) throw new Win32Error('ConvertStringSidToSidW', api.getLastError(), sid)
return parsedSid
}
this.writeSidPtr = this.writeSid === undefined ? undefined : parseSid(this.writeSid)
this.tempWriteSidPtr = this.tempWriteSid === undefined ? undefined : parseSid(this.tempWriteSid)
const tempDir = this.mode === 'read-only' || this.tempDirOption === null ? null : this.tempDirOption
/* v8 ignore next -- constructor validation requires workspace-write to supply
an explicit temp directory or null; the other branches normalize to null. */
if (tempDir === undefined) throw new Error('AclSandbox workspace-write temp directory was not resolved')
if (tempDir !== null) {
if (!existsSync(tempDir) || !statSync(tempDir).isDirectory()) {
throw new Error(`AclSandbox temp dir does not exist or is not a directory: ${tempDir}`)
}
assertPrivateTempDisjoint(this.writableDirs, tempDir)
}
this.tempDirResolved = tempDir
// manageDacls: false — the caller (the sandbox seam's grant) alreadyView on GitHub (pinned to b150a551b8)
Solutions
- Fix the SID string: it must be a valid SDDL SID (S-1-...) accepted by ConvertStringSidToSidW.
When it happens
Trigger: Thrown at packages/sandbox/sandbox-windows-acl/src/index.ts:235 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/c40e7e262861fb5c.
Report an issue: GitHub.