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] Updating from 3.1.4 to the latest version makes Leantime unusable as login does not work anymore #2649

Open
1 of 2 tasks
RKLBusinessDevelopment opened this issue Sep 4, 2024 · 12 comments

Comments

@RKLBusinessDevelopment
Copy link

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

What set up are you using

  • Cloud Hosted Version
  • Self Hosted

Describe the bug
After updating to the latest version, Leantime updates the database upon first login. After that, I can't login to Leantime any more. No error message, the credentials just won't work. I had to manually revert back to 3.1.4 and restore my database backup to use Leantime again.

To Reproduce
Use a 3.1.4 self-hosted installation and update to the latest version.

Expected behavior
Being able to login after Leantime has updated the database.

Leantime Version
reverted back to 3.1.4, wanted to use the latest version

PHP / MySQL Version
PHP 8.1.9 / MySQL 9.0.1

@mattjbayly
Copy link

mattjbayly commented Sep 8, 2024

I am also getting the same error. Message in leantime.log:

[2024-09-08 19:21:05] production.CRITICAL: PDOException: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'zp_calendar' already exists in /var/www/html/leantime/app/Domain/Install/Repositories/Install.php:239 Stack trace: #0 /var/www/html/leantime/app/Domain/Install/Repositories/Install.php(239): PDOStatement->execute() #1 /var/www/html/leantime/app/Domain/Install/Controllers/Index.php(95): Leantime\Domain\Install\Repositories\Install->setupDB() ... #41 /var/www/html/leantime/app/Core/Bootstrap/Bootloader.php(129): Leantime\Core\Bootstrap\Bootloader->handleRequest() #42 /var/www/html/leantime/public/index.php(13): Leantime\Core\Bootstrap\Bootloader->boot()

@danmb315
Copy link

i have the same problem, do you found a solution?

@marcelfolaron
Copy link
Contributor

Do you have any other error messages from the logs?

@schories
Copy link

Also 3.2.1 is affected again. I am using the official docker image.

Screenshot 2024-09-23 100640

@schories
Copy link

Here is a fix which worked for me, means in case you have (e.g. the commercial) plugins installed:

  1. stop leantime (docker)
  2. move all the subdirs from /plugins to safe backup place; /plugins dir must be empty
  3. start leantime (docker), login should work fine again; however, additional steps 4-6 are still required
  4. redownload ALL apps from "app marketplace / explore apps" (re-)using your license key for each app
  5. disable ALL apps under "app marketplace / my apps"
  6. enable ALL apps under "app marketplace / my apps" again

A bit alarming (receiving a generic "error 500" message even on the login screen) and a bit tedious (fiddling with individual license keys and plugins/apps again) - but overall fixed in under 10 minutes.

I hope you find this information helpful and it saves you time.

@marcelfolaron
Copy link
Contributor

Thank you for the write up.
The update from 3.1.4 to 3.2 requires all plugins to be disabled before the update. https://github.com/Leantime/leantime/releases/tag/v3.2.0

I'll see if we can check plugin versions early in the stack to not cause a 500 but some plugins tie in pretty early in the call stack.

@schories
Copy link

@marcelfolaron Thank you, Marcel. Personally I can live with that information & behavior, there are probably other more important topics.

@RKLBusinessDevelopment
Copy link
Author

This doesn't fix the initial problem I have reported. I have not used any plugins at all and made sure there are none active when performing the upgrade to the latest Leantime version.

@schories
Copy link

schories commented Sep 23, 2024

@RKLBusinessDevelopment Sorry to hear that. Can you please enable debug and please let us know of the detailed error information in your case? I assume you run your very own classic installation not based the official docker image, correct?

As for @mattjbayly - sounds like the installer already ran but has not finished the first time. Depending on your server configuration (esp. php running as apache module or via fcgi) it could be something like max_execution_time being set to low, so that the scripts which invoke the MySQL statements are limited in some way. Can you please provide the output of phpinfo? I assume you run your very own classic installation not based the official docker image, correct?

Thank you!

@schories
Copy link

However, it is strange that setupDB is being run, as I would expect to run updateDB as all of you seem to update - not to freshly install.

So somewhat makes 3.2.x believe, that there is no (accessible) leantime database - and it starts an installation into an already existing database, which then fails as of course tables/views already exist.

@schories
Copy link

These 2 commits introduced with 3.2.0 could be relevant:

d58e164

85a9648

@RKLBusinessDevelopment @mattjbayly Possibly there is an issue with the database/schema versioning - or detecting the version correctly. Thus it would be helpful if you please provide the version information as it is currently stored in your leantime MySQL database. Then we can hopefully see what might be the actual issue / root cause.

@PGostek
Copy link

PGostek commented Sep 26, 2024

Exactly same story here, but run on docker on Synolog DSM. I tried a full fresh installation of 3.20 or 3.2.1, but still behave as described above.

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

6 participants