minimal repro: https://github.com/lifeisfakenews/astro-ssl-bug-of-annoyingess
to reproduce, clone the repo to somewhere you can access it it over https e.g. codespaces, build and run the project (no dev mode) and visit any page triggering the 404.astro page. This page will return fine if prerender = false is exported but if not it wont return a page and the following error:
TypeError: fetch failed
at node:internal/deps/undici/undici:12345:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async #renderError (file:///workspaces/astro-ssl-bug-of-annoyingess/dist/server/entry.mjs:881:27)
at async file:///workspaces/astro-ssl-bug-of-annoyingess/dist/server/entry.mjs:1127:26 {
cause: [Error: 00885EF8AF7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:
] {
library: 'SSL routines',
reason: 'wrong version number',
code: 'ERR_SSL_WRONG_VERSION_NUMBER'
}
}
The other page / works fine with or without prerender so i am lead to believe its an issue with specifically 404 pages
more details are in the repo README