scottie1984 / swagger-ui-express

Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.4k stars 225 forks source link

Chrome: Could not render he, see the console #330

Closed karpy47 closed 1 year ago

karpy47 commented 1 year ago

Using: Win11, Chrome 109.0.5414.12

Description: Some (to me) unknown JS-error. It used to work 2-3 months ago, and it works in Opera now. Json validated in swagger editor.

I get this error in Chrome: Could not render he, see the console

Console shows: TypeError: Need a string, to fetch a component. Was given a undefined react_devtools_backend.js:4012 at root-injects.jsx:91:11 at r (memoize.js:62:23) at he.getLayout (app.jsx:9:23) at he.render (app.jsx:14:25) at Hi (react-dom.production.min.js:187:188) at Wi (react-dom.production.min.js:186:173) at Ks (react-dom.production.min.js:269:427) at Il (react-dom.production.min.js:250:347) at Ol (react-dom.production.min.js:250:278) at Cl (react-dom.production.min.js:250:138)

TypeError: Need a string, to fetch a component. Was given a undefined error-boundary.jsx:18 at root-injects.jsx:91:11 at r (memoize.js:62:23) at he.getLayout (app.jsx:9:23) at he.render (app.jsx:14:25) at Hi (react-dom.production.min.js:187:188) at Wi (react-dom.production.min.js:186:173) at Ks (react-dom.production.min.js:269:427) at Il (react-dom.production.min.js:250:347) at Ol (react-dom.production.min.js:250:278) at Cl (react-dom.production.min.js:250:138)

Chrome has a suggestion: Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced. To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData. Note that for performance reasons, only the first access to one of the properties is shown. 1 Source: prepareInjection.js:1

karpy47 commented 1 year ago

Seems like it was a json parsing error after all.