molenzwiebel / Impostor

Automatic Discord muting for Among Us! No installs necessary, just enter the code, join the voice channel, and you're off!
https://impostor.molenzwiebel.xyz/
129 stars 14 forks source link

Error when running postgres database on Heroku #7

Open furfetched opened 3 years ago

furfetched commented 3 years ago

When running node dist/index.js (using the Heroku CLI), I get this error: (node:12) UnhandledPromiseRejectionWarning: DriverException: permission denied for database "postgres" at PostgreSqlExceptionConverter.convertException (/app/bot/node_modules/@mikro-orm/core/platforms/ExceptionConverter.js:8:16) at PostgreSqlExceptionConverter.convertException (/app/bot/node_modules/@mikro-orm/postgresql/PostgreSqlExceptionConverter.js:40:22) at PostgreSqlDriver.convertException (/app/bot/node_modules/@mikro-orm/core/drivers/DatabaseDriver.js:160:54) at /app/bot/node_modules/@mikro-orm/core/drivers/DatabaseDriver.js:164:24 at processTicksAndRejections (internal/process/task_queues.js:97:5) at async PostgreSqlDriver.find (/app/bot/node_modules/@mikro-orm/knex/AbstractSqlDriver.js:42:24) at async SqlEntityManager.find (/app/bot/node_modules/@mikro-orm/core/EntityManager.js:75:25) at async Object.cleanUpOldSessions (/app/bot/dist/actions.js:80:22) at async /app/bot/dist/index.js:26:5 The database url in .env is correct though.

DarrenAlex commented 3 years ago

Did you set the DATABASE_URL password to your PostgreSQL password? That should be your problem. You can change the password by running psql and typing \password then follow the instructions.