{"record":{"id":"80e4a14b20a26b98","repo":"ionic-team/ionic-framework","slug":"framework-delegate-is-missing-80e4a1","errorCode":null,"errorMessage":"framework delegate is missing","messagePattern":"framework delegate is missing","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/src/utils/overlays.ts","lineNumber":942,"sourceCode":"    inline = parentEl !== null && !hasController;\n    workingDelegate = inline ? delegate || coreDelegate : delegate;\n\n    return { inline, delegate: workingDelegate };\n  };\n\n  /**\n   * Attaches a component in the DOM. Teleports the component\n   * to the root of the app.\n   * @param component The component to optionally construct and append to the element.\n   */\n  const attachViewToDom = async (component?: any) => {\n    const { delegate } = getDelegate(true);\n    if (delegate) {\n      return await delegate.attachViewToDom(ref.el, component);\n    }\n    const { hasController } = ref;\n    if (hasController && component !== undefined) {\n      throw new Error('framework delegate is missing');\n    }\n    return null;\n  };\n\n  /**\n   * Moves a component back to its original location in the DOM.\n   */\n  const removeViewFromDom = () => {\n    const { delegate } = getDelegate();\n    if (delegate && ref.el !== undefined) {\n      delegate.removeViewFromDom(ref.el.parentElement, ref.el);\n    }\n  };\n\n  return {\n    attachViewToDom,\n    removeViewFromDom,\n  };","sourceCodeStart":924,"sourceCodeEnd":960,"githubUrl":"https://github.com/ionic-team/ionic-framework/blob/625f9c38ad8c5db8a6c12df5c1622a36da90f9e3/core/src/utils/overlays.ts#L924-L960","documentation":"Thrown by the overlay delegate's attachViewToDom() in overlays.ts when the overlay has a controller (hasController is true) and a component was provided, but no framework delegate is configured. This is the overlay-specific variant of error 8: Ionic needs a framework delegate to instantiate a component-reference, and none is available, so it refuses rather than silently doing nothing.","triggerScenarios":"Presenting an overlay (modal/popover/loading/etc.) created via controller (e.g. modalController.create({ component: MyComp })) where component is a class reference, in a project that has not registered its framework delegate. Hascontroller is true for controller-created overlays, so the throw fires on present().","commonSituations":"Using @ionic/angular/@ionic/react/@ionic/vue controller APIs without installing/bootstrapping the framework package; SSR or unit tests that import overlay controllers directly from @ionic/core without a delegate; partial migration where the delegate provider was removed.","solutions":["Install and bootstrap the correct framework integration so its delegate is registered (IonicModule.forRoot / IonicReactRouter/IonReactDelegate / createApp + IonicVue).","In tests, either mock the delegate or use inline overlays (component as children) instead of the controller + class reference pattern.","If you genuinely have no framework, pass component as a tag string or HTMLElement, or omit it and use slot/inline content.","Confirm the overlay is created through the framework-aware controller, not a bare @ionic/core controller, when running inside a framework."],"exampleFix":"// before (no framework delegate registered)\nconst modal = await modalController.create({ component: MyModalClass });\nawait modal.present(); // throws 'framework delegate is missing'\n\n// after (bootstrap the framework, or use inline content)\n// Angular: ensure IonicModule.forRoot() is imported in AppModule\n// or use inline:\n//   <ion-modal [isOpen]=\"true\"><my-modal></my-modal></ion-modal>","handlingStrategy":"validation","validationCode":"// Ensure a delegate is available before presenting a controller-created overlay:\nif (hasFrameworkDelegate) {\n  const modal = await modalController.create({ component: MyModal });\n  await modal.present();\n} else {\n  // use inline overlays, or pass a tag string / HTMLElement\n}","typeGuard":"function isFrameworkDelegateConfigured(): boolean {\n  // framework integrations set a delegate; check via your framework's API\n  // e.g. Angular: DelegateController available; React: IonReactDelegate present\n  return true; // replace with real check\n}","tryCatchPattern":null,"preventionTips":["Bootstrap @ionic/angular / @ionic/react / @ionic/vue before using overlay controllers.","In tests, use inline overlays or mock the delegate.","Don't pass class-reference components from a bare @ionic/core setup."],"tags":["overlays","delegate","framework-integration","runtime"],"backgroundTag":null,"analyzedSha":"625f9c38ad8c5db8a6c12df5c1622a36da90f9e3","analyzedAt":"2026-08-12T16:00:25.413Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}