2fun
2fun
CDCloudflare Developers
Created by 2fun on 3/29/2024 in #pages-help
Potential internal CF Pages issue: Error 500 on first post request but not subsequent ones
Seems to have fixed it
9 replies
CDCloudflare Developers
Created by 2fun on 3/29/2024 in #pages-help
Potential internal CF Pages issue: Error 500 on first post request but not subsequent ones
After some debugging, I found in the wrangler logs that there is no GET request initially. So instead of using svelte's goto(url) function I just did window.location.href = url instead
9 replies
CDCloudflare Developers
Created by 2fun on 3/29/2024 in #pages-help
Potential internal CF Pages issue: Error 500 on first post request but not subsequent ones
Fixed the issue with this code:
import { browser } from '$app/environment';

if (browser) {
let loaded = sessionStorage.getItem('form_page_reload');
if (!loaded) { // Fixes weird Cloudflare Pages "Error 500 on initial post" issue
sessionStorage.setItem('form_page_reload', 'true');
location.reload();
}
}
import { browser } from '$app/environment';

if (browser) {
let loaded = sessionStorage.getItem('form_page_reload');
if (!loaded) { // Fixes weird Cloudflare Pages "Error 500 on initial post" issue
sessionStorage.setItem('form_page_reload', 'true');
location.reload();
}
}
It just refreshes the page once to "skip" the initial phase I guess. Weird
9 replies
CDCloudflare Developers
Created by 2fun on 3/29/2024 in #pages-help
Potential internal CF Pages issue: Error 500 on first post request but not subsequent ones
Therefore I strongly think it is a Cloudflare Pages internal issue
9 replies
CDCloudflare Developers
Created by 2fun on 3/29/2024 in #pages-help
Potential internal CF Pages issue: Error 500 on first post request but not subsequent ones
This doesn't happen running the page locally using the node adapter for SvelteKit or using the wrangler pages dev command
9 replies
CDCloudflare Developers
Created by 2fun on 3/29/2024 in #pages-help
Potential internal CF Pages issue: Error 500 on first post request but not subsequent ones
Is there a way to get the stacktrace to know exactly where it happens?
9 replies
CDCloudflare Developers
Created by 2fun on 3/18/2024 in #pages-help
`TypeError: This WritableStream has been closed` due to use of Buffer?
Please ping me anytime if there are any news about this! Thank you 👍
3 replies
CDCloudflare Developers
Created by 2fun on 3/18/2024 in #pages-help
`TypeError: This WritableStream has been closed` due to use of Buffer?
Debugging this is quite hard, but I suspect this code:
Buffer.from(invoice).toString('base64')
Buffer.from(invoice).toString('base64')
3 replies
CDCloudflare Developers
Created by 2fun on 3/18/2024 in #general-help
Trailing colon after protocol in documentation
Ok got it. Thank you 👍 !
8 replies
CDCloudflare Developers
Created by 2fun on 3/18/2024 in #general-help
Trailing colon after protocol in documentation
as it is not being used
8 replies
CDCloudflare Developers
Created by 2fun on 3/18/2024 in #general-help
Trailing colon after protocol in documentation
No description
8 replies
CDCloudflare Developers
Created by 2fun on 3/16/2024 in #general-help
"This deployment failed" without any further information
That was it thank you very much!
3 replies