Test deploy of v1.121.30 to AWS Amplify gives error "Only HTML requests are supported here"
In before load. Fetching session data gives the above error from the serverFn
ServerFn
No error during development/local machine

12 Replies
generous-apricot•6mo ago
do you have server logs?
like-goldOP•6mo ago
For now no.
generous-apricot•6mo ago
maybe
request.url is not correctly populated on that deployment target
since that is required to dispatch in start
does normal routing work?
for SSRlike-goldOP•6mo ago
We have similar app v1.121.0 on Amplify and routing works for SSR.
generous-apricot•6mo ago
would be helpful if you can narrow down the exact version that broke it
like-goldOP•6mo ago
Here
"@tanstack/react-router": "^1.121.27"
"@tanstack/react-router-with-query": "^1.121.27"
"@tanstack/react-router-devtools": "^1.121.27"
"@tanstack/react-start": "^1.121.30"
generous-apricot•6mo ago
yeah but did 1.121.29 work?
like-goldOP•6mo ago
no
generous-apricot•6mo ago
so which was the latest version that worked?
like-goldOP•6mo ago
The version we have deployed on AWS Amplify,
@tanstack/react-start@^1.121.0, works well and server functions operate as expected. However, after adding more test routes, including a pathless layout inside a group, we noticed that type inference for child routes was broken. To address this, we upgraded to @tanstack/react-start@^1.121.29 and then to 1.121.30. After deploying these updates, we got the error "Only HTML requests are supported here"
@tanstack/react-start@^1.121.0 on AWS amplify on our staging server works with no issue. SSR worksgenerous-apricot•6mo ago
can you identify the exact patch version that was the last working for you?
like-goldOP•5mo ago
I was able to resolve the issue with the 500 error on our deployed TanStack Start SSR app. The problem was caused by our AWS Amplify "Rewrites and redirects" settings—specifically, we had an extra regex rule that was routing non-HTML requests to the SSR handler, which caused the error.
After updating the rewrites (just a single rule rewriting all unmatched routes to /index.html), everything works as expected.
Thanks for the help!