{"record":{"id":"905c2fa824ea941d","repo":"CloakHQ/CloakBrowser","slug":"cloakbrowser-cloakbrowser-widevine-cdm-is-set-bu","errorCode":null,"errorMessage":"[cloakbrowser] CLOAKBROWSER_WIDEVINE_CDM is set but has no manifest.json; skipping Widevine hint seeding","messagePattern":"\\[cloakbrowser\\] CLOAKBROWSER_WIDEVINE_CDM is set but has no manifest\\.json; skipping Widevine hint seeding","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"js/src/widevine.ts","lineNumber":100,"sourceCode":" * Write the Widevine CDM hint file into a persistent profile before launch.\n * `binaryPath` is the resolved chrome executable; the CDM is looked for next to\n * it. No-op on non-Linux, when disabled via CLOAKBROWSER_WIDEVINE, or when no\n * sideloaded CDM is present. Never throws — a failure must not break launch.\n */\nexport function seedWidevineHint(userDataDir: string, binaryPath: string): void {\n  if (process.platform !== \"linux\") return;\n  if (seedingDisabled()) return;\n  // Empty userDataDir = Playwright's ephemeral profile (its own temp dir);\n  // a persistent hint can't be placed there, and \"\" would pollute the CWD.\n  if (!userDataDir) return;\n\n  // Everything below is best-effort and must never break the browser launch,\n  // so the whole body (resolution + write) is guarded.\n  try {\n    const cdmDir = resolveWidevineCdmDir(binaryPath);\n    if (cdmDir === null) {\n      if (process.env.CLOAKBROWSER_WIDEVINE_CDM !== undefined) {\n        console.warn(\n          \"[cloakbrowser] CLOAKBROWSER_WIDEVINE_CDM is set but has no manifest.json; \" +\n            \"skipping Widevine hint seeding\",\n        );\n      }\n      return;\n    }\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 {","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/CloakHQ/CloakBrowser/blob/d6bad5de261bedf025280ace1d14e800aee13923/js/src/widevine.ts#L82-L118","documentation":"The environment variable CLOAKBROWSER_WIDEVINE_CDM points to a directory that does not contain a manifest.json, so the library cannot identify a valid Widevine CDM and skips seeding the Widevine hint into the profile. This is a best-effort warning: the launch proceeds, but DRM-protected media (e.g. Netflix, Spotify web) will not use your custom CDM.","triggerScenarios":"Setting CLOAKBROWSER_WIDEVINE_CDM=/path/to/dir where the dir lacks manifest.json (only e.g. libwidevinecdm.so, or wrong path), then calling launchPersistentContext, which calls seedWidevineHint.","commonSituations":"Pointing at the wrong directory level (the folder above the versioned CDM folder), incomplete CDM extraction, or a path to a file rather than the CDM directory. Also happens when the built-in resolution found nothing and the env var was the user's attempted override.","solutions":["Verify the directory actually contains manifest.json alongside the CDM library: ls $CLOAKBROWSER_WIDEVINE_CDM.","Point CLOAKBROWSER_WIDEVINE_CDM at the exact versioned CDM folder that contains manifest.json.","Re-download/re-extract the Widevine CDM if the extraction was partial.","If you don't need DRM, unset the variable to silence the warning."],"exampleFix":"# before\nexport CLOAKBROWSER_WIDEVINE_CDM=/opt/widevine   # contains only libwidevinecdm.so\n\n# after\nexport CLOAKBROWSER_WIDEVINE_CDM=/opt/widevine/4.10.2559.0  # contains manifest.json + libwidevinecdm.so","handlingStrategy":"validation","validationCode":"import fs from 'node:fs';\nimport path from 'node:path';\nconst cdm = process.env.CLOAKBROWSER_WIDEVINE_CDM;\nif (cdm && !fs.existsSync(path.join(cdm, 'manifest.json'))) {\n  throw new Error(`CLOAKBROWSER_WIDEVINE_CDM has no manifest.json: ${cdm}`);\n}","typeGuard":"const isCdmDirWithManifest = (dir: string): boolean =>\n  fs.existsSync(path.join(dir, 'manifest.json'));","tryCatchPattern":null,"preventionTips":["Validate the CDM directory layout in deployment scripts (manifest.json + CDM shared library).","Pin and re-extract the CDM atomically; don't hand-copy single files.","Unset the variable if DRM is not needed."],"tags":["widevine","drm","env-var","configuration"],"backgroundTag":"missing-env-var-target","analyzedSha":"d6bad5de261bedf025280ace1d14e800aee13923","analyzedAt":"2026-08-28T14:13:12.918Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}