shiqi-seven-7 opened a new issue, #729: URL: https://github.com/apache/shenyu-dashboard/issues/729
### Environment - ShenYu version: 2.7.x (admin bundled dashboard, `index.16dee401.js`) - Browser: Chrome (any) - Happens on: first visit of http://localhost:9095, before login ### What happened The dashboard crashes with a white screen and nothing is rendered. Browser console shows: ``` Error: Reducer "mcpServer" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state... at getRouterData (index.16dee401.js:1:120627) ``` ### Root cause `src/models/mcpServer.js` defines only `effects` and no `state`. Every other model in the project defines an initial state (e.g. `state: {}`). When dva initializes the store, this model's reducer returns `undefined` and redux throws the error above, so the whole app never renders. ```js // src/models/mcpServer.js (current) export default { namespace: "mcpServer", effects: { *swaggerImport(...) { ... } }, // no state, no reducers }; ``` ### Expected The dashboard login page renders normally. ### Suggested fix Add an initial state to the model: ```js export default { namespace: "mcpServer", state: {}, effects: { ... }, }; ``` I'd be happy to submit a PR for this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
