{"record":{"id":"08eff6a46f9cac3b","repo":"CloakHQ/CloakBrowser","slug":"cloakbrowser-failed-to-seed-widevine-cdm-hint-fi","errorCode":null,"errorMessage":"[cloakbrowser] Failed to seed Widevine CDM hint file:","messagePattern":"\\[cloakbrowser\\] Failed to seed Widevine CDM hint file:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"js/src/widevine.ts","lineNumber":124,"sourceCode":"    }\n\n    const hintDir = path.join(userDataDir, \"WidevineCdm\");\n    fs.mkdirSync(hintDir, { recursive: true });\n    const hintFile = path.join(hintDir, HINT_FILENAME);\n    // cdmDir is already absolute/resolved.\n    const content = JSON.stringify({ Path: cdmDir });\n\n    try {\n      if (isFile(hintFile) && fs.readFileSync(hintFile, \"utf-8\") === content) {\n        return; // already seeded correctly\n      }\n    } catch {\n      console.warn(\"[cloakbrowser] Existing Widevine hint unreadable; rewriting\");\n    }\n    fs.writeFileSync(hintFile, content);\n  } catch (e) {\n    // Best-effort: never break the launch, but surface the failure.\n    console.warn(\"[cloakbrowser] Failed to seed Widevine CDM hint file:\", e);\n  }\n}\n","sourceCodeStart":106,"sourceCodeEnd":127,"githubUrl":"https://github.com/CloakHQ/CloakBrowser/blob/d6bad5de261bedf025280ace1d14e800aee13923/js/src/widevine.ts#L106-L127","documentation":"The final best-effort write of the Widevine hint file into the persistent profile failed (the caught exception is printed). Launch still proceeds; the consequence is that Widevine DRM may not be enabled for that session because Chromium never gets the CDM hint.","triggerScenarios":"writeFileSync(hintFile, content) throwing inside seedWidevineHint during launchPersistentContext: read-only profile dir, ENOSPC, EACCES, profile on a read-only mount, or the file locked by another process.","commonSituations":"Running the browser as a different user than the profile owner, Docker containers with read-only volumes for the profile, disk-full CI runners, or profiles on network filesystems with flushing/locking quirks.","solutions":["Make the profile directory writable by the running user (chmod -R u+rwX <profileDir> or chown).","Free up disk space / enlarge the volume if ENOSPC.","If the volume must be read-only, mount a writable subpath for the profile or accept degraded DRM support.","Ignore the warning if DRM playback is not needed for your workload."],"exampleFix":"# before: read-only profile volume\ndocker run -v /data/profile:/profile:ro ...\n\n# after: writable profile mount\ndocker run -v /data/profile:/profile:rw ...","handlingStrategy":"validation","validationCode":"import fs from 'node:fs';\nfs.accessSync(profileDir, fs.constants.W_OK | fs.constants.R_OK); // throws early if profile not writable","typeGuard":"const isWritableDir = (dir: string): boolean => {\n  try { fs.accessSync(dir, fs.constants.W_OK); return true; } catch { return false; }\n};","tryCatchPattern":null,"preventionTips":["Ensure the profile directory is writable by the browser process user (especially in Docker).\nKeep profiles off read-only or network mounts.\nWatch disk space on long-running automation boxes; ENOSPC is a common cause."],"tags":["widevine","filesystem","permissions","launch"],"backgroundTag":"permission-denied","analyzedSha":"d6bad5de261bedf025280ace1d14e800aee13923","analyzedAt":"2026-08-28T14:13:12.918Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}