Describe the bug
I have one SSR page index.tsx
which takes one query parameter c
. Example => http://localhost:8000/?c=E5kKbMXNRPw
When i start server and visit root page with query parameter http://localhost:8000/?c=E5kKbMXNRPw
I get error message - {"level":50,"time":1664189278263,"pid":37352,"hostname":"DESKTOP-aaa","msg":"Error processing /?c=E5kKbMXNRPw, No page found for /?c=E5kKbMXNRPw"}
and Internal Server Error
is shown in web browser.
[Update]
Logs with log level Trace:
{"level":30,"time":1664206926085,"pid":32988,"hostname":"DESKTOP-aaa","reqId":"req-2","req":{"method":"GET","url":"/?c=dA6RNY7VMJr","hostname":"localhost:8000","remoteAddress":"127.0.0.1","remotePort":54547},"msg":"incoming request"}
{"level":20,"time":1664206926085,"pid":32988,"hostname":"DESKTOP-aaa","msg":"DSG/SSR for \"text/html\" @ /?c=dA6RNY7VMJr"}
{"level":50,"time":1664206926086,"pid":32988,"hostname":"DESKTOP-aaa","msg":"Error processing /?c=dA6RNY7VMJr, No page found for /?c=dA6RNY7VMJr"}
{"level":30,"time":1664206926086,"pid":32988,"hostname":"DESKTOP-aaa","reqId":"req-2","res":{"statusCode":500},"responseTime":0.9972000122070312,"msg":"request completed"}
http://localhost:8000/
works fine, but as soon as i add query parameter, server does not works.
Expected behavior
Root page (index.tsx) should be loaded and Query parameter should be passed to
export async function getServerData(data: GetServerDataProps): GetServerDataReturn {
method.
System Info
System:
OS: Windows 10 10.0.19044
CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
Binaries:
Node: 14.20.0 - C:\Program Files\nodejs\node.EXE
npm: 6.14.17 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 3.9.12
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.50)
npmPackages:
gatsby: ^4.23.0 => 4.23.1
gatsby-plugin-fastify: ^0.9.0 => 0.9.2
gatsby-plugin-image: ^2.23.1 => 2.23.1
gatsby-plugin-manifest: ^4.23.0 => 4.23.1
gatsby-plugin-postcss: ^5.23.0 => 5.23.0
gatsby-plugin-sharp: ^4.23.1 => 4.23.1
gatsby-source-filesystem: ^4.23.0 => 4.23.0
gatsby-transformer-sharp: ^4.23.1 => 4.23.1
npmGlobalPackages:
gatsby-cli: 4.23.0
package.json
"dependencies": {
"axios": "^0.27.2",
"fastify": "^4.6.0",
"gatsby": "^4.23.0",
"gatsby-plugin-fastify": "^0.9.0",
"gatsby-plugin-image": "^2.23.1",
"gatsby-plugin-manifest": "^4.23.0",
"gatsby-plugin-sharp": "^4.23.1",
"gatsby-source-filesystem": "^4.23.0",
"gatsby-transformer-sharp": "^4.23.1",
"http-status-codes": "^2.2.0",
"react": "^18.1.0",
"react-dom": "^18.1.0"
},
"devDependencies": {
"@types/node": "^17.0.45",
"@types/react": "^18.0.19",
"@types/react-dom": "^18.0.6",
"autoprefixer": "^10.4.11",
"gatsby-plugin-postcss": "^5.23.0",
"postcss": "^8.4.16",
"tailwindcss": "^3.1.8",
"typescript": "^4.8.3"
}