{"record":{"id":"7605f56db978a5fe","repo":"halo-dev/halo","slug":"cannot-resolve-shared-dependency-root-from-re","errorCode":null,"errorMessage":"Cannot resolve shared dependency ${root} from ${resolutionBase}.","messagePattern":"Cannot resolve shared dependency (.+?) from (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"info","filePath":"ui/packages/ui-plugin-bundler-kit/src/runtime-snapshot.ts","lineNumber":126,"sourceCode":"      snapshot.haloVersion !==\n      `${target.major}.${target.minor}.${target.patch}`,\n  };\n}\n\nexport async function resolveSharedPackage(\n  root: SharedPackageRoot,\n  providerRoot: string,\n  sourceId?: string\n) {\n  const resolutionBase = getPackageResolutionBase(providerRoot, sourceId);\n  let packageJsonPath: string;\n  try {\n    packageJsonPath = await resolvePackageJSON(root, {\n      from: resolutionBase,\n      conditions: [\"browser\", \"import\", \"default\"],\n    });\n  } catch (error) {\n    throw new Error(\n      `Cannot resolve shared dependency ${root} from ${resolutionBase}.`,\n      { cause: error }\n    );\n  }\n  const packageRoot = fs.realpathSync(path.dirname(packageJsonPath));\n  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\")) as {\n    name?: string;\n    version?: string;\n  };\n\n  if (packageJson.name !== root || !packageJson.version) {\n    throw new Error(\n      `Shared dependency ${root} resolved to ${packageJson.name || \"an unnamed package\"} at ${packageRoot}.`\n    );\n  }\n\n  return {\n    name: packageJson.name,","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/halo-dev/halo/blob/d2f5165f9c8f055ffcb3fa9c3f4032821a7b68c8/ui/packages/ui-plugin-bundler-kit/src/runtime-snapshot.ts#L108-L144","documentation":"TokenBasedRememberMeServices.processAutoLoginCookie throws Spring Security's InvalidCookieException when the remember-me cookie does not split into exactly 3 or 4 tokens. handleError catches it, logs at debug, cancels the cookie, and returns Mono.empty() — the user is simply not auto-logged-in and must re-authenticate.","triggerScenarios":"A browser sends a remember-me cookie whose value, split on the delimiter, yields a count other than 3 or 4 (corrupted, truncated, manually edited, or from an incompatible auth scheme version).","commonSituations":"Cookie truncated by proxy/CDN; manually edited cookie; switching remember-me key/algorithm between versions so old cookies no longer parse; cookie from a different application sharing the domain.","solutions":["Have the user log in again — the invalid cookie is expired automatically and a fresh one is issued.","Keep the halo.security.remember-me.key stable across restarts/versions so existing cookies keep their token shape.","Avoid proxies/load balancers truncating long cookie values.","Do not hand-edit the remember-me cookie."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// You normally do not call this directly; framework handles it. To pre-check a cookie:\nString[] tokens = cookie.getValue().split(\":\");\nif (tokens.length != 3 && tokens.length != 4) {\n    // expire the cookie and force a fresh login instead of submitting it\n}","typeGuard":null,"tryCatchPattern":"// Framework already wraps processAutoLoginCookie in handleError -> cancelCookie.\n// In custom code, treat InvalidCookieException as 'silent re-login', not a hard error:\n.autoLogin(exchange)\n    .onErrorResume(InvalidCookieException.class, e -> {\n        rememberMeCookieResolver.expireCookie(exchange);\n        return Mono.empty();\n    })","preventionTips":["Keep halo.security.remember-me.key stable across restarts.","Don't edit remember-me cookies manually.","Ensure proxies do not truncate cookie values."],"tags":["security","remember-me","cookie","authentication"],"backgroundTag":null,"analyzedSha":"d2f5165f9c8f055ffcb3fa9c3f4032821a7b68c8","analyzedAt":"2026-08-14T00:18:38.915Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}