Skip to content

400 on integration and session requests when self-hosting #689

@soundstep

Description

@soundstep

Description:

Client-side requests 400 when self-hosting.

Steps to reproduce:

  1. visit https://fe-dora.onrender.com/welcome (this instance can have cold start or be interrupted)
  2. check devtool request against https://fe-dora.onrender.com/api/auth/session

This is a reproduction of an issue I'm experiencing in GCP as well. I do not see this issue locally with the docker-compose local postgres and redis.

Any idea?

Expected behavior:

A 200 request.

Actual behavior:

A 400 response (https://fe-dora.onrender.com/api/auth/session):

{"message":"select * from \"Organization\" - relation \"Organization\" does not exist","stack":"error: select * from \"Organization\" - relation \"Organization\" does not exist\n    <internal/redacted>\n    <internal/redacted>\n    <internal/redacted>\n    <internal/redacted>\n    at Socket.emit (node:events:518:28)\n    at addChunk (node:internal/streams/readable:561:12)\n    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n    at Readable.push (node:internal/streams/readable:392:5)\n    at TCP.onStreamRead (node:internal/stream_base_commons:189:23)\n    at TCP.callbackTrampoline (node:internal/async_hooks:130:17)"}

It seems it can't store a generated org, as I can also see this request when I try to set a github token, see the undefined (https://fe-dora.onrender.com/api/resources/orgs/undefined/integration):

{"message":"org_id must be a valid UUID","stack":"ValidationError: org_id must be a valid UUID\n    <internal/redacted>\n    <internal/redacted>\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)"}

Server Setup Information:

On render.com

postgres 14
redis
and our Docker image:

FROM middlewareeng/middleware@sha256:8464f08370d0d47fad9c77aaa4d1feb5fd4492bfe25a48fb4d32cde745b58932

WORKDIR /app

COPY entrypoint.sh /app

ENTRYPOINT ["/app/entrypoint.sh"]

CMD ["/bin/bash", "-c", "/app/setup_utils/start.sh"]

Entrypoint:

#!/usr/bin/env bash

set -e

echo "Starting up application..."

exec "$@"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions