Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqliteError: no such table: user #768

Open
meng8131 opened this issue Dec 26, 2024 · 4 comments
Open

SqliteError: no such table: user #768

meng8131 opened this issue Dec 26, 2024 · 4 comments
Labels
question Further information is requested

Comments

@meng8131
Copy link

Describe the Bug

I'm trying to deploy hoarder on Zeabur, after installed below services, hit error when trying to signup the first account.

I'm fresh with coding, and did this with help of Claude, thanks for any advices.

services installed

image

error shown at signup page

image

error log shown in Zeabur server log

SqliteError: no such table: user

at Database.prepare (/app/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)

... 6 lines matching cause stack trace ...

at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {

code: 'INTERNAL_SERVER_ERROR',

name: 'TRPCError',

[cause]: SqliteError: no such table: user

  at Database.prepare (/app/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)

  at v.prepareQuery (/app/apps/web/.next/server/chunks/3632.js:67:47379)

  at v.prepareOneTimeQuery (/app/apps/web/.next/server/chunks/3632.js:67:46284)

  at m._prepare (/app/apps/web/.next/server/chunks/3632.js:67:79635)

  at m.all (/app/apps/web/.next/server/chunks/3632.js:67:79820)

  at m.execute (/app/apps/web/.next/server/chunks/3632.js:67:79932)

  at m.then (/app/apps/web/.next/server/chunks/3632.js:67:57668)

  at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {

code: 'SQLITE_ERROR'

}

}

Steps to Reproduce

  1. signup

Expected Behaviour

how to fix the error

Screenshots or Additional Context

No response

Device Details

No response

Exact Hoarder Version

ghcr.io/hoarder-app/hoarder

@MohamedBassem
Copy link
Collaborator

Not sure what Zeabur is, but this usually means that the database got wiped. Did you change the storage of the container after starting it? Try restarting it, this should re run the database migrations.

@MohamedBassem MohamedBassem added the question Further information is requested label Dec 26, 2024
@dionorgua
Copy link

I would say it's not 'wiped'. It's actually "not created". Most likely app has no permissions to create that database

@meng8131
Copy link
Author

meng8131 commented Dec 27, 2024

Not sure what Zeabur is, but this usually means that the database got wiped. Did you change the storage of the container after starting it? Try restarting it, this should re run the database migrations.

@MohamedBassem

hi, thanks for your reply.
zeabur is a PaaS service for full stack application deployment.
I re-deplyed Hoarder with below TOML config, looks good? still hit the same "code: 'INTERNAL_SERVER_ERROR'" error

name = "hoarder"

[source]
image = "ghcr.io/hoarder-app/hoarder:latest"

[[volumes]]
id = "data"
dir = "/data"

[[volumes]]
id = "meilidata"
dir = "/meili_data"

[[ports]]
id = "web"
port = 3000
type = "HTTP"

[env]
HOARDER_VERSION = { default = "release" }
NEXTAUTH_SECRET = { default = "HN9WXDZ8qdL0KH****" }
MEILI_MASTER_KEY = { default = "uahsEgSLRDebW****" }
NEXTAUTH_URL = { default = "https://***.zeabur.com" }

OPENAI_API_KEY = { default = "" }

@MohamedBassem
Copy link
Collaborator

@meng8131 Given that you're not using the docker compose file, you seem to be missing the DATA_DIR env variable that should point to /data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants