{"record":{"id":"c6b04c20a818707c","repo":"bettercap/bettercap","slug":"cannot-activate-an-already-activated-outlet","errorCode":null,"errorMessage":"Cannot activate an already activated outlet","messagePattern":"Cannot activate an already activated outlet","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/ui/ui/vendor.js","lineNumber":79755,"sourceCode":"     * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n     */\n    RouterOutlet.prototype.attach = function (ref, activatedRoute) {\n        this.activated = ref;\n        this._activatedRoute = activatedRoute;\n        this.location.insert(ref.hostView);\n    };\n    RouterOutlet.prototype.deactivate = function () {\n        if (this.activated) {\n            var c = this.component;\n            this.activated.destroy();\n            this.activated = null;\n            this._activatedRoute = null;\n            this.deactivateEvents.emit(c);\n        }\n    };\n    RouterOutlet.prototype.activateWith = function (activatedRoute, resolver) {\n        if (this.isActivated) {\n            throw new Error('Cannot activate an already activated outlet');\n        }\n        this._activatedRoute = activatedRoute;\n        var snapshot = activatedRoute._futureSnapshot;\n        var component = snapshot.routeConfig.component;\n        resolver = resolver || this.resolver;\n        var factory = resolver.resolveComponentFactory(component);\n        var childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n        var injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n        this.activated = this.location.createComponent(factory, this.location.length, injector);\n        // Calling `markForCheck` to make sure we will run the change detection when the\n        // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n        this.changeDetector.markForCheck();\n        this.activateEvents.emit(this.activated.instance);\n    };\n    Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__decorate\"])([\n        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__[\"Output\"])('activate'),\n        Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__metadata\"])(\"design:type\", Object)\n    ], RouterOutlet.prototype, \"activateEvents\", void 0);","sourceCodeStart":79737,"sourceCodeEnd":79773,"githubUrl":"https://github.com/bettercap/bettercap/blob/8eca2820f3c41d2004434ed5a291d87462caeeb7/modules/ui/ui/vendor.js#L79737-L79773","documentation":"Guard inside Angular's RouterOutlet.activate: thrown when the outlet is instructed to activate a component while this.activated already holds a live component instance. This happens when routing configuration re-triggers activation (e.g. duplicate route definitions or a broken RouteReuseStrategy) without the previous component being deactivated/destroyed first.","triggerScenarios":"Thrown at modules/ui/ui/vendor.js:79755 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check for duplicate router-outlet elements or route configurations that resolve two activations to the same outlet","Ensure custom RouteReuseStrategy implementations correctly pair shouldAttach/retrieve with detach, and that detached handles are cleared","Verify you are not manually calling activate() or re-inserting views created by the outlet","Report to maintainers if it occurs on a stock configuration with route params only changing; it may be a framework bug"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8eca2820f3c41d2004434ed5a291d87462caeeb7","analyzedAt":"2026-09-02T12:49:00.712Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T16:17:10.729Z"}