supertokens / supertokens-golang

GoLang SDK for SuperTokens
https://supertokens.com
Other
115 stars 34 forks source link

Dashboard breaks if user is deleted that is currently viewed #416

Open trivialkettle opened 2 months ago

trivialkettle commented 2 months ago

Hi, after an update to 0.21.0 I could not login into the dashboard. I tried core version 8 and 9 via registry.supertokens.io/supertokens/supertokens-postgresql:<version>

The logs say:

st-backend-1         | com.supertokens {t: "2024-06-20T07:37:11Z", message: "errorHandler: Checking recipe for match: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:337" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T07:37:11Z", message: "errorHandler: Matched with recipeId: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:339" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T07:37:11Z", message: "errorHandler: Checking recipe for match: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:337" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T07:37:11Z", message: "errorHandler: Matched with recipeId: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:339" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T07:37:11Z", message: "errorHandler: Checking recipe for match: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:337" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T07:37:11Z", message: "errorHandler: Matched with recipeId: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:339" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T07:37:11Z", message: "errorHandler: Checking recipe for match: emailverification", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:337" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T07:37:11Z", message: "errorHandler: Matched with recipeId: emailverification", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:339" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T07:37:11Z", message: "errorHandler: Checking recipe for match: usermetadata", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:337" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T07:37:11Z", message: "errorHandler: Matched with recipeId: usermetadata", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:339" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T07:37:11Z", message: "errorHandler: Checking recipe for match: multitenancy", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:337" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T07:37:11Z", message: "errorHandler: Matched with recipeId: multitenancy", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:339" sdkVer: "0.21.0"}

My docker-compose.yaml:

services:
  st-core:
    image: registry.supertokens.io/supertokens/supertokens-postgresql:9.0
    restart: unless-stopped
    depends_on:
      - st-db
    ports:
      - "${ST_CORE_EXTERNAL_PORT:-3567}:3567"
    environment:
      POSTGRESQL_CONNECTION_URI: "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@st-db:5432/${POSTGRES_DB}"
    healthcheck:
      test: >
        bash -c 'exec 3<>/dev/tcp/127.0.0.1/3567 && echo -e "GET /hello HTTP/1.1\r\nhost: 127.0.0.1:3567\r\nConnection: close\r\n\r\n" >&3 && cat <&3 | grep "Hello"'
      interval: 60s
      timeout: 5s
      retries: 5
    logging:
      options:
        max-file: "1"
        max-size: "100m"

  st-backend:
    image: eu.gcr.io/iot4u-smartmetering/supertokens-backend:latest
    ports:
      - "${ST_BACKEND_EXTERNAL_PORT:-3001}:3001"
    restart: unless-stopped
    depends_on:
      - st-core
    environment:
      API_BASE_PATH: /api/v1/auth/
      CORE: http://st-core:3567
      SUPERTOKENS_DEBUG: 1
      ORIGIN: ${BACKEND_ORIGIN}
      API_DOMAIN: ${BACKEND_API_DOMAIN}
      PORT: 3001
    logging:
      options:
        max-file: "1"
        max-size: "100m"

  st-db:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}
    ports:
      - "${ST_POSTGRES_EXTERNAL_PORT:-5432}:5432"
    restart: unless-stopped
    volumes:
      - ./data/psql:/var/lib/postgresql/data
    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB" ]
      interval: 1s
      timeout: 1s
      retries: 5
    logging:
      options:
        max-file: "1"
        max-size: "100m"

A downgrade to v0.20.0 fixes this vor core 8 and core 9.

Edit: I copied the wrong log. Though I saw that also sdk 0.20.0 throws this error but does not break.

rishabhpoddar commented 2 months ago

What is the network tab output when you try and login?

trivialkettle commented 2 months ago

Hi @rishabhpoddar hm strange, while I tried to upgrade again and check the logs I somehow fixed it. (my git diff is empty, so maybe a docker hickhack).

Before i got an internal server error for the email verify route. Now it does not even call this route. I close it for now, seems to be fixed. Thanks

trivialkettle commented 2 months ago

Ok, I could reproduce this.

  1. create a dashboard user and a normal user
  2. log into the dashboard and click on the user name to see user details (keep browser tab)
  3. stop docker
  4. delete database
  5. try to relogin into the dashboard (in the same browser tab)

edit: You can also just remove the user from another dashboard tab.

After login, the dashboard makes a call to

GET http://localhost:3001/api/v1/auth/dashboard/api/user/email/verify?userId=5275f96a-1cf1-49ae-b858-bf9d6691ac7b

and throws error 500.

The output in network tab: st-dashboard

trivialkettle commented 2 months ago

I reopen this, because I guess this could be handled and forward the dashboard user to the main view.

rishabhpoddar commented 2 months ago

What is the error stack on the backend? Or what is the response body of the 500 error API call?

trivialkettle commented 2 months ago

The response body is unknown user id provided without email

trivialkettle commented 2 months ago

core and backend log:

st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: requestRID is: ", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:178" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Request being handled by recipe. ID is: /dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:289" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "Sending HTML response to client with status code: 200", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/utils.go:195" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Ended", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:297" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: requestRID is: ", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:178" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Request being handled by recipe. ID is: /api/search/tags", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:289" sdkVer: "0.21.0"}
st-backend-1         | 
st-core-1            | 20 Jun 2024 08:50:41:783 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-8] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/dashboard/session/verify. Method: POST. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:786 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-8] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/dashboard/session/verify. Method: POST
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:787 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-9] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /user/search/tags. Method: GET. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:787 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-9] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /user/search/tags. Method: GET
st-core-1            | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "Sending response to client with status code: 200", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/utils.go:179" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Ended", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:297" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: requestRID is: ", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:178" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Request being handled by recipe. ID is: /api/tenants/list", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:289" sdkVer: "0.21.0"}
st-backend-1         | 
st-core-1            | 20 Jun 2024 08:50:41:813 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-10] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/dashboard/session/verify. Method: POST. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:816 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-10] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/dashboard/session/verify. Method: POST
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:817 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-1] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/multitenancy/tenant/list. Method: GET. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:824 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-1] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/multitenancy/tenant/list. Method: GET
st-core-1            | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "Sending response to client with status code: 200", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/utils.go:179" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Ended", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:297" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: requestRID is: ", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:178" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Request being handled by recipe. ID is: /api/user", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:289" sdkVer: "0.21.0"}
st-backend-1         | 
st-core-1            | 20 Jun 2024 08:50:41:831 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-2] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/dashboard/session/verify. Method: POST. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:833 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-2] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/dashboard/session/verify. Method: POST
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:834 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-3] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/user. Method: GET. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:840 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-3] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/user. Method: GET
st-core-1            | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "Sending response to client with status code: 200", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/utils.go:179" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Ended", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:297" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: requestRID is: ", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:178" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Request being handled by recipe. ID is: /api/user/metadata", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:289" sdkVer: "0.21.0"}
st-backend-1         | 
st-core-1            | 20 Jun 2024 08:50:41:850 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-4] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/dashboard/session/verify. Method: POST. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:853 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-4] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/dashboard/session/verify. Method: POST
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:854 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-5] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/user/metadata. Method: GET. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:860 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-5] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/user/metadata. Method: GET
st-core-1            | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "Sending response to client with status code: 200", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/utils.go:179" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Ended", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:297" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: requestRID is: ", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:178" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Request being handled by recipe. ID is: /api/user/sessions", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:289" sdkVer: "0.21.0"}
st-backend-1         | 
st-core-1            | 20 Jun 2024 08:50:41:867 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-6] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/dashboard/session/verify. Method: POST. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:869 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-6] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/dashboard/session/verify. Method: POST
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:871 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-7] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /public/recipe/session/user. Method: GET. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:880 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-7] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /public/recipe/session/user. Method: GET
st-core-1            | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "Sending response to client with status code: 200", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/utils.go:179" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Ended", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:297" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: requestRID is: ", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:178" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Request being handled by recipe. ID is: /api/user/email/verify", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:289" sdkVer: "0.21.0"}
st-backend-1         | 
st-core-1            | 20 Jun 2024 08:50:41:889 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-8] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/dashboard/session/verify. Method: POST. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:891 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-8] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/dashboard/session/verify. Method: POST
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:893 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-9] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/user. Method: GET. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:897 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-9] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/user. Method: GET
st-core-1            | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Started", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:323" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Checking recipe for match: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:337" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Matched with recipeId: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:339" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Checking recipe for match: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:337" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Matched with recipeId: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:339" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Checking recipe for match: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:337" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Matched with recipeId: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:339" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Checking recipe for match: emailverification", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:337" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Matched with recipeId: emailverification", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:339" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Checking recipe for match: usermetadata", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:337" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Matched with recipeId: usermetadata", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:339" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Checking recipe for match: multitenancy", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:337" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "errorHandler: Matched with recipeId: multitenancy", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:339" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: requestRID is: ", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:178" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Request being handled by recipe. ID is: /api/users/count", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:289" sdkVer: "0.21.0"}
st-backend-1         | 
st-core-1            | 20 Jun 2024 08:50:41:923 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-10] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/dashboard/session/verify. Method: POST. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:926 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-10] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/dashboard/session/verify. Method: POST
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:928 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-1] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /public/users/count. Method: GET. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:929 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-1] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /public/users/count. Method: GET
st-core-1            | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "Sending response to client with status code: 200", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/utils.go:179" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Ended", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:297" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: requestRID is: ", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:178" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Request being handled by recipe. ID is: /api/users", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:289" sdkVer: "0.21.0"}
st-backend-1         | 
st-core-1            | 20 Jun 2024 08:50:41:941 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-2] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/dashboard/session/verify. Method: POST. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:944 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-2] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/dashboard/session/verify. Method: POST
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:946 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-3] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /public/users. Method: GET. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:947 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-3] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /public/users. Method: GET
st-core-1            | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "Sending response to client with status code: 200", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/utils.go:179" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Ended", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:297" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: requestRID is: ", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:178" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: emailpassword", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: session", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Checking recipe ID for match: dashboard", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:279" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:41Z", message: "middleware: Request being handled by recipe. ID is: /api/analytics", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:289" sdkVer: "0.21.0"}
st-backend-1         | 
st-core-1            | 20 Jun 2024 08:50:41:957 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-4] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /recipe/dashboard/session/verify. Method: POST. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:959 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-4] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /recipe/dashboard/session/verify. Method: POST
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:961 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-5] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /telemetry. Method: GET. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:962 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-5] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /telemetry. Method: GET
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:964 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-6] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:449) | Tenant(, public, public) | API called: /public/users/count. Method: GET. Version: 3.0
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:41:965 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [http-nio-0.0.0.0-3567-exec-6] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:495) | Tenant(, public, public) | API ended: /public/users/count. Method: GET
st-core-1            | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:42Z", message: "Sending response to client with status code: 200", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/utils.go:179" sdkVer: "0.21.0"}
st-backend-1         | 
st-backend-1         | com.supertokens {t: "2024-06-20T08:50:42Z", message: "middleware: Ended", file: "/build/vendor/github.com/supertokens/supertokens-golang/supertokens/supertokens.go:297" sdkVer: "0.21.0"}
st-backend-1         | 
st-core-1            | 20 Jun 2024 08:50:47:192 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [pool-1-thread-2] thread | io.supertokens.cronjobs.CronTask.run(CronTask.java:78) | Tenant(, public, public) | Cronjob started: SyncCoreConfigWithDb
st-core-1            | 
st-core-1            | 20 Jun 2024 08:50:47:197 +0000 | INFO | pid: bfe62ae6-7ab7-47ee-a6c3-dd3e6784b4ae | v9.0.1 | [pool-1-thread-2] thread | io.supertokens.cronjobs.CronTask.run(CronTask.java:168) | Tenant(, public, public) | Cronjob finished: SyncCoreConfigWithDb
st-core-1            | 
rishabhpoddar commented 2 months ago

Right. Whats the response body of the API call?

trivialkettle commented 2 months ago

See https://github.com/supertokens/supertokens-golang/issues/416#issuecomment-2180150436:

The response body is unknown user id provided without email

rishabhpoddar commented 2 months ago

right. So this is expected. It's cause you deleted the user in the database and then are trying to take an action on it. I guess the SDK should return a 400 error instead of a 500 error. But what happens if you reload the page after deleting the user?

trivialkettle commented 2 months ago

I still get error 500, until I remove the userid from the url

rishabhpoddar commented 2 months ago

Can you share the HAR file please?