Juice-shop: [馃悰] SequelizeDatabaseError: SQLITE_ERROR: no such table: Wallet

Created on 5 May 2020  路  4Comments  路  Source: bkimminich/juice-shop

:bug: Bug report

Description


Not able to run Juice Shop locally or via Docker

Is this a regression?



well, I definitely was running Juice Shop successfully before, do not remember the version exactly

:microscope: Minimal Reproduction

locally:

  1. Install node.js
  2. Run git clone https://github.com/bkimminich/juice-shop.git (or clone your own fork of the repository)
  3. Go into the cloned folder with cd juice-shop
  4. Run npm install (only has to be done before first start or when you change the source code)
  5. Run npm start

via Docker:

  1. Install Docker
  2. Run docker pull bkimminich/juice-shop
  3. Run docker run --rm -p 3000:3000 bkimminich/juice-shop

:fire: Exception or Error

output is the same for both Docker and local setup:




> [email protected] start /juice-shop
> node app

info: All dependencies in ./package.json are satisfied (OK)
info: Detected Node.js version v13.14.0 (OK)
info: Detected OS linux (OK)
info: Detected CPU x64 (OK)
info: Required file index.html is present (OK)
info: Required file styles.css is present (OK)
info: Required file main-es2015.js is present (OK)
info: Required file tutorial-es2015.js is present (OK)
info: Required file polyfills-es2015.js is present (OK)
info: Required file runtime-es2015.js is present (OK)
info: Required file vendor-es2015.js is present (OK)
info: Required file main-es5.js is present (OK)
info: Required file tutorial-es5.js is present (OK)
info: Required file polyfills-es5.js is present (OK)
info: Required file runtime-es5.js is present (OK)
info: Required file vendor-es5.js is present (OK)
info: Configuration default validated (OK)
info: Port 3000 is available (OK)
Unhandled rejection SequelizeDatabaseError: SQLITE_ERROR: no such table: Wallets
    at Query.formatError (/juice-shop/node_modules/sequelize/lib/dialects/sqlite/query.js:422:16)
    at Query._handleQueryResponse (/juice-shop/node_modules/sequelize/lib/dialects/sqlite/query.js:73:18)
    at afterExecute (/juice-shop/node_modules/sequelize/lib/dialects/sqlite/query.js:250:31)
    at replacement (/juice-shop/node_modules/sqlite3/lib/trace.js:19:31)
    at Statement.errBack (/juice-shop/node_modules/sqlite3/lib/sqlite3.js:14:21)
Unhandled rejection SequelizeDatabaseError: SQLITE_ERROR: no such table: Feedbacks
    at Query.formatError (/juice-shop/node_modules/sequelize/lib/dialects/sqlite/query.js:422:16)
    at Query._handleQueryResponse (/juice-shop/node_modules/sequelize/lib/dialects/sqlite/query.js:73:18)
    at afterExecute (/juice-shop/node_modules/sequelize/lib/dialects/sqlite/query.js:250:31)
    at replacement (/juice-shop/node_modules/sqlite3/lib/trace.js:19:31)
    at Statement.errBack (/juice-shop/node_modules/sqlite3/lib/sqlite3.js:14:21)
Unhandled rejection SequelizeDatabaseError: SQLITE_ERROR: no such table: Complaints
    at Query.formatError (/juice-shop/node_modules/sequelize/lib/dialects/sqlite/query.js:422:16)
    at Query._handleQueryResponse (/juice-shop/node_modules/sequelize/lib/dialects/sqlite/query.js:73:18)
    at afterExecute (/juice-shop/node_modules/sequelize/lib/dialects/sqlite/query.js:250:31)
    at replacement (/juice-shop/node_modules/sqlite3/lib/trace.js:19:31)
    at Statement.errBack (/juice-shop/node_modules/sqlite3/lib/sqlite3.js:14:21)

:deciduous_tree: Your Environment




Node: v12.7.0
NPM: 6.10.0
OS: Linux Mint 18.3 (Sylvia)

Additional Information


bug

Most helpful comment

I've ran into this issue on an alternate machine before.
I don't know how to fix it as of now and have been unable to reproduce the error, but it's actually little more than a mild annoyance.
If you let it run for a minute, the same errors pop up a few times, after the which the application starts and runs normally without any issues

All 4 comments

I checked the last Docker image builds, and they all passed their smoke tests which include and API access check that'd definitely fail if the DB was not properly created: https://hub.docker.com/repository/registry-1.docker.io/bkimminich/juice-shop/builds/f735884a-67f8-47e1-b9ec-7b4118c6aee9

The latest image from master branch is also passing: https://hub.docker.com/repository/registry-1.docker.io/bkimminich/juice-shop/builds/c7dfb1a1-4258-46c2-be54-5e1a98d81e58

On Travis CI the same smoke tests are run on the default config which is Node 13.x on Linux. They also pass there.

I also can't reproduce this on my Windows machine neither locally nor with Docker.

I assume it is a file permission thing on your system that prevents the SQLite DB file from getting created properly. Can you check if data/juiceshop.sqlite exists and what happens to it when the server starts?

I've ran into this issue on an alternate machine before.
I don't know how to fix it as of now and have been unable to reproduce the error, but it's actually little more than a mild annoyance.
If you let it run for a minute, the same errors pop up a few times, after the which the application starts and runs normally without any issues

@Scar26 wow, you absolutely right, after a few minutes it finally started! thanks! so it is probably something wrong with my setup.

@bkimminich thanks for the quick response and for this amazing project, keep up with good work!

I'll add that to the Troubleshooting guide as a recommendation... The classic "please try again later"... 馃槀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bkimminich picture bkimminich  路  6Comments

RezaRahmati picture RezaRahmati  路  4Comments

bkimminich picture bkimminich  路  7Comments

junathanadi picture junathanadi  路  3Comments

bkimminich picture bkimminich  路  5Comments