Not able to run Juice Shop locally or via Docker
well, I definitely was running Juice Shop successfully before, do not remember the version exactly
locally:
via Docker:
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)
Node: v12.7.0
NPM: 6.10.0
OS: Linux Mint 18.3 (Sylvia)
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"... 馃槀
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