FIXED: fetch error on route load function
calling
getUser
function inside load function is causing fetch error.
but this same endpoint(ApiEndpoints.user.auth.WHO_AM_I) works outside this load function, so I dont think its server error.
also it prefetch data on link hover, so server works, I dont get whats the issue inside function.9 Replies
I think you wanted to show the error (rather than the code a second time).
oh sorry I forgot that xD
here:
also it prefetch data on link hover, so server works, I dont get whats the issue inside function.If I read it correctly the client doesn't have any problem performing the fetch, its just that the Solid Start server can't seem to get through to that same server on SSR. So the question is: can the Solid start server make the connection outside of SSR or it there something in its environment preventing it from doing just that.
yes, solid server cant connect to server.
Im running both on a docker (podman) container, I tried running both ends individually on both localhost and 0.0.0.0, that worked.
solid server cant connect to server running on container i guess. also I've no clue what to do to accept connection from solid server.
do you have any idea on this? sorry this seems like not the problem with solid at all.
@peerreynders sorry for the ping, but could you say what you mean by:
can the Solid start server make the connection outside of SSRthats different from normal fetch?
If it was a problem related to SSR then other code like a server function used from the client could still make the fetch work.
But if it's related to the container configuration no fetch will work even when it's just for something like
node index.js
.yea, thing bothering me is when I run backend server not on container, it works.
also is there anything here that needs to config for solid-start server?
(
app.config.ts
)@peerreynders hi, fixed this issue.
That was actually container routing related, since solid is calling route load api on server (not browser) I needed to add frontend container host to server.
Anyways, thank you for your help :D
Glad you were able to resolve it; wish I could have been more help.