Closed sgaechter closed 2 years ago
Probably an expired cache that is used with the new sources?
Can you run bin/console kimai:reload
after the update?
Hello Kevin. I updated and ran the suggested command:
LOG
Reloading configurations ...
[OK] All 39 YAML files contain valid syntax.
[OK] All 512 XLIFF files contain valid syntax.
Rebuilding your cache, please be patient ...
// Clearing the cache for the prod environment with debug
// false
[OK] Cache for the "prod" environment (debug=false) was successfully cleared.
// Warming up the cache for the prod environment with debug
// false
[ERROR] DoctrineMetadataCacheWarmer must load metadata first, check priority of
your warmers.
[WARNING] Cache could not be rebuilt.
Please run these commands to rebuild the cache manually:
rm -r var/cache/*
bin/console cache:clear --env=prod
bin/console cache:warmup --env=prod
END LOG
I ran the tree suggested commands, the first didn't work, but the other two did. After this, I could access the page, but my Login with the previous credentials failed...
The rolback solved the problem, but still state 1.14.1...
Hm, something is messed up. Sorry, but I don't know Docker, so I can't really help if the default commands don't work. Probably upgrading from 1.14 to 1.19 is not supported?
@sgaechter Thanks for the bug and fix. We'll keep an eye on this but I think Kevin may be right about the big upgrade jump. When building the container it's always a trade off between run every possible command that may be needed vs keep the process quick and the image small.
Are you actually shelled into the container before you run those commands?
docker-compose exec kimai bash
Dear all. Thanks for your suggestions. I've updated my Container now from "apache-1.14.1-prod" to "apache-1.14.3-prod" with no issues. I only had had to clear the cache by using
bin/console cache:clear --env=prod
bin/console cache:warmup --env=prod
After updating to "apache-1.15.1-prod" I could update every major version step by step, finally, I arrived at "apache-1.19.6-prod" In the future I keep my Container updated :-)
This is for documentation purposes - this Issue is closed. Thanks for your work @tobybatch.
Describe the bug After Updating the Kimai2 Docker Container to apache-latest the following Error occure when I try to enter the kimai2 Webpage:
coaching_kimai2 | [Mon May 02 21:08:44.486742 2022] [php:notice] [pid 65] [client 127.0.0.1:39316] [2022-05-02 19:08:44] php.CRITICAL: Uncaught Error: Nelmio\CorsBundle\EventListener\CorsListener::__construct(): Argument #1 ($configurationResolver) must be of type Nelmio\CorsBundle\Options\ResolverInterface, Symfony\Component\EventDispatcher\EventDispatcher given, called in /opt/kimai/var/cache/prod/ContainerEpiL5CR/srcApp_KernelProdContainer.php on line 1636 {"exception":"[object] (TypeError(code: 0): Nelmio\\CorsBundle\\EventListener\\CorsListener::__construct(): Argument #1 ($configurationResolver) must be of type Nelmio\\CorsBundle\\Options\\ResolverInterface, Symfony\\Component\\EventDispatcher\\EventDispatcher given, called in /opt/kimai/var/cache/prod/ContainerEpiL5CR/srcApp_KernelProdContainer.php on line 1636 at /opt/kimai/vendor/nelmio/cors-bundle/EventListener/CorsListener.php:44)"} [] coaching_kimai2 | localhost:8001 127.0.0.1 - - [02/May/2022:21:08:44 +0200] "GET / HTTP/1.1" 500 1018 "-" "curl/7.64.0"
To Reproduce Steps to reproduce the behaviour:
Desktop (please complete the following information):
Command used to run the container
Docker compose file (with passwords redacted)
Additional context
After Error I rolled back to kimai2:apache with no issue.