kronusaturn / lw2-viewer

An alternative frontend for LessWrong 2.0
https://www.greaterwrong.com/
MIT License
61 stars 6 forks source link

502s to https://www.lesswrong.com/graphql #30

Closed jkopczyn closed 4 years ago

jkopczyn commented 4 years ago

Whenever I attempt to post/reply via greaterwrong, I get this error message:

An HTTP request to "https://www.lesswrong.com/graphql" returned 502 bad gateway.

<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.12.1</center>
</body>
</html>

Probably relevant: My displayed username is not the same as the username I originally signed up with; I had it changed by the admins because it was previously my (very rare) legal name. greaterwrong still shows the old username in the user box in the top right. I hypothesize there is a mismatch in primary key, or something, where gw.com is trying to post a message for and lw.com doesn't have that entry anymore.

Casting votes doesn't do this, and I can comment via lw.com itself just fine. I think I remember it working at least once after the username change but with low confidence, it may have started immediately thereafter.

userbox

kronusaturn commented 4 years ago

It looks like this isn't just affecting your account, it has to do with a change in the LW API.

kronusaturn commented 4 years ago

Should be fixed by 9447c995

kronusaturn commented 4 years ago

Regarding the wrong username being displayed, logging out and back in should fix it.

jimrandomh commented 4 years ago

What was the schema change? This is a bug on our (LW2)'s end insofar as we don't want to make API changes that bring things like this, without emailing lw20-api-updates@googlegroups.com first.

kronusaturn commented 4 years ago

It seems that inline literals no longer work in mutations, only variables work. For example, this used to work but doesn't anymore:

 mutation {createMessage(data:{contents:{updateType:"minor",originalContents:{type:"markdown",data:"test"}},conversationId:"3Gk7vXs3EnRFs6S3D"}){data{_id}}}

Now only using variables works:

mutation createMessage($data: CreateMessageDataInput!){createMessage(data: $data){data{_id}}}

(with the data variable filled in separately in the HTTP request)

Filling in the variables within the query also doesn't work:

mutation createMessage($data: CreateMessageDataInput! = {contents:{updateType:"minor",originalContents:{type:"markdown",data:"test"}},conversationId:"3Gk7vXs3EnRFs6S3D"}){createMessage(data: $data){data{_id}}}

Also, usually when there's a schema error, the response from the server is a JSON object containing details about the error, but with this particular error it's just a default 502 bad gateway response from nginx.

jkopczyn commented 4 years ago

Regarding the wrong username being displayed, logging out and back in should fix it.

It hasn't, the username is still the old version. But the original problem is fixed, that I can confirm.