Leantime / leantime

Leantime is a goals focused project management system for non-project managers. Building with ADHD, Autism, and dyslexia in mind.
https://leantime.io
GNU Affero General Public License v3.0
4.41k stars 578 forks source link

[BUG] - Can't login after upgrade from 3.1.1 to 3.2.0-beta-2" #2582

Closed tech62 closed 2 weeks ago

tech62 commented 1 month ago

If you have problems with the installation please use our community forum

What set up are you using

Describe the bug After upgrade to 3.2.0-beta-2 from 3.1.1, login not working

To Reproduce Steps to reproduce the behavior:

  1. Upgrade with the leantime upgrade script
  2. try to login

Expected behavior Login successfully

Leantime Version 3.2.0-beta-2"

Server Apache

PHP / MySQL Version php-fpm 8.2 and mysql last version

tech62 commented 1 month ago

Create a "sessions" directory in leantime/cache with good permissions solve the problem (blank page or can't login)

marcelfolaron commented 1 month ago

Ah, thanks for pointing that out. I will have to make sure this gets added to the docs and repo.

On Mon, Jul 15, 2024 at 12:40 PM tech62 @.***> wrote:

Create a "sessions" in cache directory with good permissions solve the problem (blank page or can't login)

— Reply to this email directly, view it on GitHub https://github.com/Leantime/leantime/issues/2582#issuecomment-2228940398, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALG4EFQAT36TBN4TGICGC2LZMP3Q3AVCNFSM6AAAAABK44YVGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRYHE2DAMZZHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

sinejespersen commented 1 month ago

I have this problem as well, and the sessions folder does not fix it.

tech62 commented 1 month ago

I have this problem as well, and the sessions folder does not fix it.

Hello, without logs (from app, webserver ...) dev' can't help you. Do you have created the sessions folder and apply permissions on it with a chown -R www-data:www-data session/ ?

sinejespersen commented 1 month ago

I don't think it's the sessions folder, I just don't get logged in. I have the sessions folder, and the permissions are good.

I set it up, i run the install script from/install, and then i go to the home url. When I try to login it just doesn't really redirect me anywhere. The logs are as follows:

2024-08-05 15:07:26 [05-Aug-2024 15:07:26] WARNING: [pool www] child 27 said into stderr: "[05-Aug-2024 15:07:26 Europe/Copenhagen] Command Output: "
2024-08-05 15:07:26 [05-Aug-2024 15:07:26] WARNING: [pool www] child 27 said into stderr: "In Container.php line 1126:"
2024-08-05 15:07:26 [05-Aug-2024 15:07:26] WARNING: [pool www] child 27 said into stderr: "                                                                               "
2024-08-05 15:07:26 [05-Aug-2024 15:07:26] WARNING: [pool www] child 27 said into stderr: "  Target [Illuminate\Contracts\Cache\Repository] is not instantiable while bu  "
2024-08-05 15:07:26 [05-Aug-2024 15:07:26] WARNING: [pool www] child 27 said into stderr: "  ilding [Illuminate\Console\Scheduling\ScheduleRunCommand].                   "
2024-08-05 15:07:26 [05-Aug-2024 15:07:26] WARNING: [pool www] child 27 said into stderr: "                                                                               "
2024-08-05 15:07:26 [05-Aug-2024 15:07:26] WARNING: [pool www] child 27 said into stderr: "schedule:run"
2024-08-05 15:07:26 [05-Aug-2024 15:07:26] WARNING: [pool www] child 27 said into stderr: "[05-Aug-2024 15:07:26 Europe/Copenhagen] Cron run finished"
2024-08-05 15:07:30 [05-Aug-2024 15:07:30] WARNING: [pool www] child 11 said into stderr: "[05-Aug-2024 15:07:30 Europe/Copenhagen] Command Output: "
2024-08-05 15:07:30 [05-Aug-2024 15:07:30] WARNING: [pool www] child 11 said into stderr: "In Container.php line 1126:"
2024-08-05 15:07:30 [05-Aug-2024 15:07:30] WARNING: [pool www] child 11 said into stderr: "                                                                               "
2024-08-05 15:07:30 [05-Aug-2024 15:07:30] WARNING: [pool www] child 11 said into stderr: "  Target [Illuminate\Contracts\Cache\Repository] is not instantiable while bu  "
2024-08-05 15:07:30 [05-Aug-2024 15:07:30] WARNING: [pool www] child 11 said into stderr: "  ilding [Illuminate\Console\Scheduling\ScheduleRunCommand].                   "
2024-08-05 15:07:30 [05-Aug-2024 15:07:30] WARNING: [pool www] child 11 said into stderr: "                                                                               "
2024-08-05 15:07:30 [05-Aug-2024 15:07:30] WARNING: [pool www] child 11 said into stderr: "schedule:run"
2024-08-05 15:07:30 [05-Aug-2024 15:07:30] WARNING: [pool www] child 11 said into stderr: "[05-Aug-2024 15:07:30 Europe/Copenhagen] Cron run finished"
gloriafolaron commented 1 month ago

Thank you. Very odd. Which version are you using? Can you try to pull the latest from master? Is that on docker or a regular install? Lastly, after the install, can you check the user entry in the database and ensure it's set to active?

Just to confirm. The session folder is inside of the cache folder, correct? Do you see any other files i the cache folder?

The error logs above are just related to the cron execution which is fine for now.

Sincerely, Marcel

sinejespersen commented 1 month ago

I am up to date on master, Docker install, and the user is in the db and set to active. Just to confirm. The session folder is inside of the cache folder, correct? -> Yes Do you see any other files i the cache folder? -> lots of files, also in the sessions folder

gloriafolaron commented 1 month ago

Oh that’s bizarre. Can you look at your cookies for the site and check if the session id stays consistent or if it gets changed on every request.

Sorry for the remote debug steps but this is the first time we are seeing this issue.

Marcel Folaron - Co-Founder

phone. 206-371-1325

email. marcel@leantime.io

web. https://leantime.io

sinejespersen commented 1 month ago

There is no session id in my cookies. But no error notification either, and php says nothing. I am running firefox but I tried it in chrome as well.

gloriafolaron commented 1 month ago

The session id should be called ltid: Can you confirm that this cookie exists? If not there could be a different issue altogether.

[image: image.png]

sinejespersen commented 1 month ago

I reinstalled leantime entirely again and it now works. :) thanks for the help.

khalid-tian commented 3 weeks ago

I'm experiencing the same issue as reported here after upgrading to 3.2.0-beta-2. Despite verifying that the session ID (ltid) exists, I'm unable to log in. Instead, I'm redirected to the home page or the two-factor authentication page (?redirect=%2Fauth%2FtwoFA), where the login form is displayed, but I'm unable to authenticate. I've also checked the server logs, but there are no error messages indicating the cause of the issue. ps: i cant perform a clean reinstall. ps2: using docker

Update: The issue is related to the cache/sessions folder not being created properly. Specifically, the problem lies in the Dockerfile, which is creating the sessions directory at /sessions instead of app_path/cache/sessions. This is preventing the sessions from being created correctly, resulting in the issue.

marcelfolaron commented 3 weeks ago

@khalid-tian thanks for the additional info. I will go ahead and update the docker image to ensure the session folder exists.

marcelfolaron commented 2 weeks ago

Fixed as of 3.2.0

saksham27gaur commented 2 weeks ago

@marcelfolaron i am still facing this issue in the latest release , i can see a session id with ltid= but i am again redirecting to the login page , my user has already been created i check in the mysql db under zp_user, session is active also a session id has also been created.

ltid=; expires=Sat, 14 Sep 2024 06:44:31 GMT; Max-Age=1728000; path=/; domain=10.241.11.53; secure; httponly; samesite=lax

it is also getting created under /cache/sessions