{"record":{"id":"29595b6ac96b6db8","repo":"deepseek-ai/deepseek-harness","slug":"client-hmr-rebuilt-frame-for-unknown-entry-id","errorCode":null,"errorMessage":"client-hmr: rebuilt frame for unknown entry \"${id}\" (not in the loader tree)","messagePattern":"client-hmr: rebuilt frame for unknown entry \"(.+?)\" \\(not in the loader tree\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/client/hmr/src/client/index.ts","lineNumber":107,"sourceCode":"    if (el.getAttribute('data-plugin') === id) el.remove()\n  }\n}\n\n/**\n * Mount the HMR driver: subscribe to the system SSE channel and hot-swap\n * rebuilt entries.\n * @param ctx - plugin context with `loader` and `modules` available.\n */\nexport function apply(ctx: Context): void {\n  // Both are declared injections (typed Context merges: `modules` from the\n  // client module loader package, `loader` from the vendored Loader).\n  const modLoader = ctx.modules\n  const loader: Loader = ctx.loader\n\n  async function reload(id: string): Promise<void> {\n    const entry = findEntry(loader, id)\n    if (entry === undefined) {\n      ctx.logger.warn(`client-hmr: rebuilt frame for unknown entry \"${id}\" (not in the loader tree)`)\n      return\n    }\n    // Invalidate first (drop stale factory + record — a live factory makes\n    // prefetch a no-op and re-registration a loud duplicate), then run the\n    // async half while the old fiber still serves: script loading registers\n    // the fresh factory with zero side effects (lazy CJS — module bodies run\n    // at materialization, not execution).\n    modLoader.invalidate(id)\n    await modLoader.prefetch(id)\n\n    const oldFiber = entry.fiber\n    if (oldFiber !== undefined) {\n      // Registry-first teardown (see module comment): the runtime record must\n      // be gone before the fiber's disposer emits internal/plugin, or the\n      // Loader flags the entry disabled.\n      const runtime = oldFiber.runtime\n      if (runtime !== null) entry.ctx.registry.delete(runtime.callback)\n      // Drain the unload: effect disposers (slots, subscriptions) must finish","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/client/hmr/src/client/index.ts#L89-L125","documentation":"Error \"client-hmr: rebuilt frame for unknown entry \"${id}\" (not in the loader tree)\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/client/hmr/src/client/index.ts:107 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reload the page to resync the loader tree; if it persists, clear HMR state and restart the dev server."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}