Unexpected non-JSON response
While trying to push templates coder-cli errors, reading a previous thread i checked the server and client version and they are the exact same commit
35 Replies
@MRtecno98 any reverse proxy?
Yep, nginx with ssl and a cloudflare certificate
can you show me your nginx config?
the comments are from the default installation
you're not passing websocket
do that
https://discord.com/channels/747933592273027093/1007075267119947807/1007314775493070978
ah
thank you
I'm getting the same error
oh yeah i looked a bit too fast
you'd need it anyways
but that's not it
can you show me your config again?
also, does the homepage even load properly?
The rest is the same, i just added what you told me
the webui works prefectly, i could also login using the cli
it crashes only when uploading templates
@kyle can you take a look? for some reason the server's not responding with JSON, at first I would've said it's a reverse-proxy issue but the config looks good, so it could be a bug of some sort?
When uploading templates certainly means this is a WebSocket related issue.
I also tried disabling cloudflare proxying but it gives the same error
did you add the map statement too?
oh my god i'm an idiot
sorry totally didn't see that
now it runs for a little while but then fails with another error
looks like the same error to me
hold on
can you send me your full config as text just to check
i don't think it said text/plain last time
oh yeah it did
sorry lol, i'll send the config in a minute
I added the map statement and also removed all the comments
and that doesn't work?
dumb question -- did you restart nginx?
nope
yes lol
i also tried restarting coder
can you try adding
proxy_http_version 1.1;
?it works
lol
thank you
did that fix it ?
yep
i think that happened some other time too and i remembered now
i have absolutely 0 idea why
possibly websockets not liking some http versions?
I think your global nginx settings default to 1.0
probably, it's from the debian repos
well websockets are only in the 1.1+ HTTP specs
so 1.0 will think it's text
ah yeah then that's why
you can close this thread by using
/resolve
k
Marked the thread as resolved.
thank you again :)
happy to help