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
like-gold•3mo ago
do you have server logs?
rare-sapphireOP•3mo ago
For now no.
like-gold•3mo 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 SSRrare-sapphireOP•3mo ago
We have similar app v1.121.0 on Amplify and routing works for SSR.
like-gold•3mo ago
would be helpful if you can narrow down the exact version that broke it
rare-sapphireOP•3mo 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"
like-gold•3mo ago
yeah but did 1.121.29 work?
rare-sapphireOP•3mo ago
no
like-gold•3mo ago
so which was the latest version that worked?
rare-sapphireOP•3mo 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 workslike-gold•3mo ago
can you identify the exact patch version that was the last working for you?
rare-sapphireOP•3mo 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!