Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task
tech62 opened this issue Jul 15, 2024 · 19 comments
Closed
1 task

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

tech62 opened this issue Jul 15, 2024 · 19 comments

Comments

@tech62
Copy link
Contributor

tech62 commented Jul 15, 2024

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

What set up are you using

  • Cloud Hosted Version
  • [ X] Self Hosted

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
Copy link
Contributor Author

tech62 commented Jul 15, 2024

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

@marcelfolaron
Copy link
Contributor

marcelfolaron commented Jul 15, 2024 via email

@sinejespersen
Copy link
Contributor

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

@tech62
Copy link
Contributor Author

tech62 commented Aug 3, 2024

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

@khalid-tian
Copy link

khalid-tian commented Aug 12, 2024

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
Copy link
Contributor

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

@marcelfolaron
Copy link
Contributor

Fixed as of 3.2.0

@saksham27gaur
Copy link

saksham27gaur commented Aug 25, 2024

@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=<session_id>; 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

@PGostek
Copy link

PGostek commented Sep 16, 2024

Same issue here. Login does not work after updating from 3.1.4 to 3.20. Using the latest Docker image on Synology DSM. Two systems, both behave the same.

@yvatyan
Copy link

yvatyan commented Oct 20, 2024

The same, after pressing login with user credentials I'm getting back to login page with redirect url <host>:<port>/auth/login?redirect=%2F%2Fdashboard%2Fhome.

  • I checked cookies: Each timeltid is changing
  • I checked /cache/sessions folder: 5 new session-id folders are being created where ltid is being one of them

Using leantime/leantime:latest docker image, created 2024-09-22T00:09:52.012616598Z (Leantime v3.2.1)

@marcelfolaron
Copy link
Contributor

marcelfolaron commented Oct 21, 2024 via email

@yvatyan
Copy link

yvatyan commented Oct 21, 2024

Thanks for your reply. I found laravelConfig.php to be in 4.0.0 branch, but I managed to turn off secure cookies via setting secure to false inside app/Core/Providers/Session.php for 3.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants