-
Notifications
You must be signed in to change notification settings - Fork 54
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
SQlite error: tables are not created #67
Comments
Ah yes, sorry about that. The main script Meanwhile, try to delete any leftover, and possibly broken anyway, db file with require('./database/db.js')(require('knex')({ client: 'sqlite3', connection: { filename: './database/db' }, useNullAsDefault: true })) That should properly initiate the sqlite databse with all the required tables and whatnot. I'll commit a permanent fix in a few hours. Thanks for the report! 👍 |
Thank you for your fast response. After following the instructions you gave me, it works flawlessly. Thank you for mantaining this fork, I've been using it for quite a while now and it is just awesome. |
I have to reopen this as I can't log in to the root account. I've checked that the default admin details should be as follow: I am unable to log in with these details. Do I have to initialize the root account somehow? |
Ah, if your DB was created BEFORE the bug fix commit (that is, through the instructions I sent previously), the default login was username |
If necessary, you can execute the commands below in db = require('knex')({ client: 'sqlite3', connection: { filename: './database/db' }, useNullAsDefault: true })
require('bcrypt').hash('changeme', 10).then(pass => db.table('users').where('username', 'root').first().update('password', pass)) Make sure to execute the command line by line. |
Thanks for the help, I just logged in changing the minlength value from the password box to 4. This works for logging in although it doesn't for registering, which is the expected scenario. Feel free to close this issue if everything seems ok to you. |
Aha, I had the impression that I also forced the min length on the login API, which was why I didn't bother to suggest temporarily editing the input's minlength attribute. |
Hello,
I am trying to install lolisafe in production mode and for some reason lolisafe doesn't generate the database tables at all.
I've followed the six steps specified in the readme.md but as soon as I try to start it the following error is shown:
I've tried both with an unprivileged user and with root, both fail, so this is not a permissions issue. "ls" to the database directory shows the db file as 0 bytes.
This is on a Debian Buster installation within a LXC container with a recent kernel. I am using the nodejs version available in Buster repositories (v10.15.2)
The text was updated successfully, but these errors were encountered: