standardnotes / self-hosted

[Legacy] Self-host your own Standard Notes server for end-to-end encrypted notes and files
https://github.com/standardnotes/server
GNU Affero General Public License v3.0
343 stars 39 forks source link

Cannot POST error when signing in #71

Closed stevensiebe closed 2 years ago

stevensiebe commented 2 years ago

After registering an account and specifying my custom sync server, I'm signed into an active session. I can create and edit notes normally. However when trying to sign out and back in, I see the error:

<!DOCTYPE html> <html lang="en" <head> 
<meta charset="utf-8"> <title>Error</title> 
</head> <body> <pre>Cannot POST /v2/login-
params</pre> </body> </html>

healthcheck reports OK, and granting a subscription to my user in the database works for that session.

reanim8ed commented 2 years ago

I have experienced the same problem. Was setting up fresh setup on new server, all containers started, healthcheck reports OK, last record in logs shows: api-gateway_1 | {"message":"Server started on port 3000","level":"info"} If I access URL directly, I get: Welcome to the Standard Notes server infrastructure. Everything looks like it should be good.

But if I try to use it as custom sync server, the POST request to /v2/login-params gets 404 error.

sleepy-soul commented 2 years ago

Hey, I am also having same issue in my clean install. Healthcheck looks OK. I am using Traefik reverse proxy and checked it as well. Couldn't find any errors there as well

I was able to register user, but PAYMENTS_SERVER_URL was missing in my api-gateway.env Later I added it to point to my api-gateway:3000 and errors shows was gone, but now if I try to register user, it says an existing registration is already in process and when logging to existing user, gives me above error. Cannot POST /v2/login- params

handcraftedbits commented 2 years ago

I had this issue too. This commit introduced /v2/login-params and it requires newer versions of some of the containers in order to pick up the change. As you can see here, docker-compose.yml was changed in the snjs project but not in the standalone project, which is what most of us use.

So, simple fix:

Worked for me.

akhiljalagam commented 2 years ago

even though I got Cannot POST /v2/login- params on web app, I am able to login on iOS app without any issues which is strange.

@handcraftedbits thanks. your fix worked.