Cannot read properties of undefined (reading 'csp')
See original GitHub issueSteps to reproduce
When I start the next app then 1st it will work perfectly when I reload the browser it will respond to the ‘TypeError: Cannot read properties of undefined (reading ‘csp’)’ and the application is down. I run next app as SSR.
TypeError: Cannot read properties of undefined (reading 'csp')
at Object.Wave._this.renderWave [as children] (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\antd\lib\_util\wave.js:177:22)
at a.b.render (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:44:213)
at a.b.read (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:41:83)
at Object.exports.renderToString (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:52:138)
at Object.renderPage (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\next\dist\server\render.js:804:45)
at Object.defaultGetInitialProps (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\next\dist\server\render.js:391:51)
at Function.getInitialProps (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\.next\server\pages\_document.js:203:20)
at Object.loadGetInitialProps (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\next\dist\shared\lib\utils.js:65:29)
at documentInitialProps (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\next\dist\server\render.js:817:48)
at renderDocument (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\next\dist\server\render.js:841:55)
What is expected?
The SSR runs the application without any error.
What is actually happening?
When I reload the browser the next app render again then it came back to Server 500 Error. And the terminal I see the TypeError: Cannot read properties of undefined (reading ‘csp’) at Object.Wave._this.renderWave [as children] (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\antd\lib_util\wave.js:177:22) at a.b.render (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:44:213) at a.b.read (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:41:83) at Object.exports.renderToString (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:52:138) at Object.renderPage (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\next\dist\server\render.js:804:45) at Object.defaultGetInitialProps (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\next\dist\server\render.js:391:51) at Function.getInitialProps (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend.next\server\pages_document.js:203:20) at Object.loadGetInitialProps (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\next\dist\shared\lib\utils.js:65:29) at documentInitialProps (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\next\dist\server\render.js:817:48) at renderDocument (C:\Users\Arnob\stupid_arnob\Paketler\Moversbd\moversbd-frontend\node_modules\next\dist\server\render.js:841:55)
Environment | Info |
---|---|
antd | 4.21.3 |
React | Next v12.1.6 |
System | Window 11 |
Browser | Chrome |
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:6 (2 by maintainers)
Top GitHub Comments
Hi everybody! I’ve also run into this issue, unfortunately it’s difficult to reproduce, but update react&react-dom to 18.2.0 helped for me.
My primary dependencies versions currently are:
I get this error too