planka icon indicating copy to clipboard operation
planka copied to clipboard

After installation I can't login with the default demo credentials

Open heathxp2 opened this issue 3 months ago • 12 comments

I installed the application on a Windows environment. Created the database, uncommented the4 lines for the default admin and password. Started and restarted the app multiple times. I still get a Invalid e-mail or username at the login screen.

warn: Invalid email or username: "demo"! (IP: ::1) warn: Invalid email or username: "[email protected]"! (IP: ::1)

What can be the issue?

[email protected] DEFAULT_ADMIN_PASSWORD=demo DEFAULT_ADMIN_NAME=Demo Demo DEFAULT_ADMIN_USERNAME=demo

heathxp2 avatar Mar 07 '24 19:03 heathxp2

Hi! As far as I understand, you are running Planka without Docker? If so, do I understand correctly that you are changing the environment variables in the server/.env file? It could also be that you didn't copy/rename the server/.env.sample to server/.env. But it's just a guess, we need more information about the installation method and where you're changing the environment variables 🙂

meltyshev avatar Mar 08 '24 11:03 meltyshev

Running planka without Docker, correct. Followed the "Manual Installation" on Windows 11.

Correct, I copied the .env.sample to .env and made the changes in the .env file. Double and triple checked that the changes applied.

Would it give me this error if maybe it doesn't have a correct connection to the database? This seams very similar to issue #536 which doesn't have a root cause identified.

heathxp2 avatar Mar 08 '24 18:03 heathxp2

Hm, that's sound strange. We'll try to test a Windows installation to check if there's some bug when reading environment variables. Hopefully we'll be able to find Windows for testing quickly.

meltyshev avatar Mar 09 '24 21:03 meltyshev

Hi, i have tested the manuel installation on Windows, everything is working just fine

Login with the demo credentials is also working Please recheck all your steps

Here's what i did

cd C:\planka
>> curl https://github.com/plankanban/planka/releases/download/v1.15.6/planka-prebuild-v1.15.6.zip -o planka-prebuild.zip
>> Expand-Archive  -Force planka-prebuild.zip -DestinationPath C:\
>> rm planka-prebuild.zip
PS C:\planka> npm install

added 69 packages, removed 30 packages, and changed 73 packages in 6s

117 packages are looking for funding
  run `npm fund` for details
PS C:\planka> npm run db:init

> db:init
> node db/init.js

PS C:\planka> npm start --prod

> start
> nodemon

[nodemon] 3.0.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node app.js`

debug: It looks like your `sails.config.sockets.onlyAllowOrigins` array only includes
debug: references to the `localhost` origin.  This is completely valid, but be sure
debug: to add any other origins to this list that you'd like to accept socket
debug: connections from!
debug:

Nodejs: v18.19.1 Postgres: 15.6.1

daniel-hiller avatar Mar 11 '24 04:03 daniel-hiller

I am having the exact same issue after the manual installation.

If I explicetly add an user in the .env file, I can see it being created in the database, but when I try to login, I always get the message Invalid e-mail or username. I have already tried all lowercase characters, etc. All while first dropping the planka table and then re-initiating it via npm run db:init.

Also when I leave it blank, I see that no user is created in the database, but I am still not able to login with demo, demo.

Maybe this is related to the postgres version or something like this?

It works just fine when installed using Docker, though.

Nodejs: v20.11.0 Postgres: 16.2.1

FrankenApps avatar Mar 12 '24 11:03 FrankenApps

I am having the exact same issue after the manual installation.

If I explicetly add an user in the .env file, I can see it being created in the database, but when I try to login, I always get the message Invalid e-mail or username. I have already tried all lowercase characters, etc. All while first dropping the planka table and then re-initiating it via npm run db:init.

Also when I leave it blank, I see that no user is created in the database, but I am still not able to login with demo, demo.

Maybe this is related to the postgres version or something like this?

It works just fine when installed using Docker, though.

Nodejs: v20.11.0 Postgres: 16.2.1

Thanks for confirming this! We're trying to figure out what the problem might be... I have one small question, the documentation references version 1.14.2 (and this is bad and should be corrected to the latest one). Did you use the latest version when installing or the one listed there?

meltyshev avatar Mar 12 '24 13:03 meltyshev

I am having the exact same issue after the manual installation.

If I explicetly add an user in the .env file, I can see it being created in the database, but when I try to login, I always get the message Invalid e-mail or username. I have already tried all lowercase characters, etc. All while first dropping the planka table and then re-initiating it via npm run db:init.

Also when I leave it blank, I see that no user is created in the database, but I am still not able to login with demo, demo.

Maybe this is related to the postgres version or something like this?

It works just fine when installed using Docker, though.

Nodejs: v20.11.0 Postgres: 16.2.1

Thanks for confirming this! We're trying to figure out what the problem might be...

I have one small question, the documentation references version 1.14.2 (and this is bad and should be corrected to the latest one). Did you use the latest version when installing or the one listed there?

No, I did use Version 1.15.6. But after it did not work I also tried it with the exact version currently mentioned in the docs without any luck.

FrankenApps avatar Mar 12 '24 15:03 FrankenApps

Would it be possible for you to connect to the database (via pgAdmin) and see what the table with users (user_account) looks like? Is there email and username in lower case letters? We still can't reproduce it, but there is probably something wrong since it happened to two users at once.

meltyshev avatar Mar 12 '24 15:03 meltyshev

I just tried it with Postgres: 15.6.1 and it works just fine now (in order to quickly test I simply uncommented the default demo account in the .env and tried it with that). I see no difference in the user_account table compared to earlier though.

I also tried it with the same credentials as before now and while I can confirm, that the username and email must be lowercase (if they aren't this also leads to this exact error), I am pretty sure I also tried this earlier when it did not work with Postgres 16.2.1.

FrankenApps avatar Mar 12 '24 16:03 FrankenApps

I just tried it with Postgres: 15.6.1 and it works just fine now (in order to quickly test I simply uncommented the default demo account in the .env and tried it with that). I see no difference in the user_account table compared to earlier though.

Big thanks for testing! Then we should indicate in the documentation that not to use Postgres 16.

I also tried it with the same credentials as before now and while I can confirm, that the username and email must be lowercase (if they aren't this also leads to this exact error), I am pretty sure I also tried this earlier when it did not work with Postgres 16.2.1.

I'll try to change that now, so that the account is always created with lowercase email and username even if they are written with capital letters.

meltyshev avatar Mar 12 '24 17:03 meltyshev

Hi, @meltyshev and I have testet the installation again. Now we used nodejs 20 and Postgres 16

Same result everything is working

daniel-hiller avatar Mar 12 '24 18:03 daniel-hiller

I confirm downgrading to 15.6.1 fixed the issue. Hopefully the team here has a plan to test and make sure planka works on latest postgreSQL version. Thank you!

heathxp2 avatar Mar 12 '24 21:03 heathxp2