evieveevee / sparrow-for-mixer

Sparrow is a lightweight overlay, designed to give Mixer streamers alerts without annoying them with sounds, GIFs, and other nonsense. No fluff, no bullshit.
ISC License
2 stars 0 forks source link

Database check expects the users table to exist and be populated #2

Closed WizardCM closed 6 years ago

WizardCM commented 6 years ago

https://github.com/tielqt/sparrow-for-mixer/blob/9e2ce0487ac9063adf575078e2984d908c90ccc7/app/user.js#L59

Error: SQLITE_ERROR: no such table: users --> in Database#all('SELECT * from users WHERE id = 7095;', [], [Function]) at Object.findById (/home/wizardcm/alerts/sparrow-for-mixer/app/user.js:61:8) at /home/wizardcm/alerts/sparrow-for-mixer/index.js:62:7 at pass (/home/wizardcm/alerts/sparrow-for-mixer/node_modules/passport/lib/authenticator.js:357:9) at Authenticator.deserializeUser (/home/wizardcm/alerts/sparrow-for-mixer/node_modules/passport/lib/authenticator.js:362:5) at SessionStrategy.authenticate (/home/wizardcm/alerts/sparrow-for-mixer/node_modules/passport/lib/strategies/session.js:60:10) at attempt (/home/wizardcm/alerts/sparrow-for-mixer/node_modules/passport/lib/middleware/authenticate.js:361:16) at authenticate (/home/wizardcm/alerts/sparrow-for-mixer/node_modules/passport/lib/middleware/authenticate.js:362:7) at Layer.handle [as handle_request] (/home/wizardcm/alerts/sparrow-for-mixer/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/wizardcm/alerts/sparrow-for-mixer/node_modules/express/lib/router/index.js:317:13)

evieveevee commented 6 years ago

I'll be tackling this tonight; should be a pretty straightforward process to add the check. Will probably set this up in app/db-tools.js.

evieveevee commented 6 years ago

I've updated this code to perform the proper checks. Can you confirm the bug no longer exists @WizardCM?

WizardCM commented 6 years ago

Have confirmed the issue is fixed @tielqt - nice work!