{"record":{"id":"2be9a5801d68f323","repo":"bettercap/bettercap","slug":"a-platform-with-a-different-configuration-has-been","errorCode":null,"errorMessage":"A platform with a different configuration has been created. Please destroy it first.","messagePattern":"A platform with a different configuration has been created\\. Please destroy it first\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/ui/ui/vendor.js","lineNumber":57791,"sourceCode":"                var injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true });\n                createPlatform(Injector.create({ providers: injectedProviders, name: desc }));\n            }\n        }\n        return assertPlatform(marker);\n    };\n}\n/**\n * Checks that there currently is a platform which contains the given token as a provider.\n *\n * @publicApi\n */\nfunction assertPlatform(requiredToken) {\n    var platform = getPlatform();\n    if (!platform) {\n        throw new Error('No platform exists!');\n    }\n    if (!platform.injector.get(requiredToken, null)) {\n        throw new Error('A platform with a different configuration has been created. Please destroy it first.');\n    }\n    return platform;\n}\n/**\n * Destroy the existing platform.\n *\n * @publicApi\n */\nfunction destroyPlatform() {\n    if (_platform && !_platform.destroyed) {\n        _platform.destroy();\n    }\n}\n/**\n * Returns the current platform.\n *\n * @publicApi\n */","sourceCodeStart":57773,"sourceCodeEnd":57809,"githubUrl":"https://github.com/bettercap/bettercap/blob/8eca2820f3c41d2004434ed5a291d87462caeeb7/modules/ui/ui/vendor.js#L57773-L57809","documentation":"assertPlatform verifies the existing platform provides the required marker token for the requested platform type (e.g. browser vs server). This throw fires when a platform exists but was created from a different factory/configuration, so it cannot satisfy the token the caller expects.","triggerScenarios":"Thrown at modules/ui/ui/vendor.js:57791 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a single, consistent platform factory (e.g. platformBrowser) across the app","Destroy the mismatched platform before initializing the required one","Check for double bootstrap from different Angular platform packages (browser/server/hybrid)"],"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"}