mcndt / noteshare.space

A service for sharing encrypted Markdown notes from Obsidian. Notes are end-to-end-encrypted and are only stored temporarily.
https://noteshare.space
MIT License
202 stars 19 forks source link

[Bug] Request failed, status 502 #48

Open uPagge opened 1 year ago

uPagge commented 1 year ago

Describe the bug When I try to publish a note on my server, I get Request failed, status 502

To Reproduce Steps to reproduce the behavior:

Expected behavior I expected the note to be published. As a result, I get a Request failed, status 502

Screenshots

Environment (please complete the following information):

Additional context Here's what the backend container log shows

{"level":50,"time":1685293069276,"pid":1,"hostname":"noteshare-backend","msg":"Error: Unable to load Node-API Library from /app/node_modules/.prisma/client/libquery_engine-linux-musl.so.node, Library may be corrupt"}
/app/node_modules/@prisma/client/runtime/index.js:28837
      throw new PrismaClientInitializationError(message, this.client._clientVersion);
            ^

PrismaClientInitializationError: Unable to load Node-API Library from /app/node_modules/.prisma/client/libquery_engine-linux-musl.so.node, Library may be corrupt
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28837:13)
    at PrismaClient._getDmmf (/app/node_modules/@prisma/client/runtime/index.js:29845:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async PrismaClient._executeRequest (/app/node_modules/@prisma/client/runtime/index.js:29767:22)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29738:16) {
  clientVersion: '4.2.0',
  errorCode: undefined
}

When building the backend, I changed the Dockerfile because it wasn't going without it. Added at the very beginning

RUN apk update
RUN apk add --no-cache libssl1.1

It seems that something is missing when building a backend.

uPagge commented 1 year ago

It would be much easier if the collected images were available in DockerHub...

uPagge commented 1 year ago

Solved the problem by switching to node instead of node-alpine during server build