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

Install broken after upgrade from 2.6.7 to 2.6.9 #7413

Open
brotherduck opened this issue Apr 8, 2024 · 9 comments
Open

Install broken after upgrade from 2.6.7 to 2.6.9 #7413

brotherduck opened this issue Apr 8, 2024 · 9 comments

Comments

@brotherduck
Copy link

I've tried to upgrade my existing install (which was in 2.6.7) using the usual process and the following command :

sudo -u www-data make update

From my wallbag directory. Nothing special was reported (except various messages about obsolete librarires), but now when I try to access my instance I run into a 500 Internal Server Error. When I look at var/logs/prod.log there's only this error, which I don't rellay understand :

[2024-04-08T12:34:35.935470+00:00] request.CRITICAL: Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\ClassNotFoundError: "Attempted to load class "DefaultTypedFieldMapper" from namespace "Doctrine\ORM\Mapping". Did you forget a "use" statement for another namespace?" at /var/www/html/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php line 823 {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\ClassNotFoundError(code: 0): Attempted to load class \"DefaultTypedFieldMapper\" from namespace \"Doctrine\\ORM\\Mapping\".\nDid you forget a \"use\" statement for another namespace? at /var/www/html/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php:823)"} []

Maybe there's a simple operation to fix it, but I'm clueless for now.

@j0k3r
Copy link
Member

j0k3r commented Apr 8, 2024

Could you please share more information about your installation? We defined an issue template for that purpose.
PHP version, server, how it's installed, database, etc..

@brotherduck
Copy link
Author

Sorry, I had zapped this part. Here are more details :

Environment

  • Version: 2.6.9
  • Installation: initial via git clone + make install, update via make update
  • PHP version: 8.3.4
  • OS: Ubuntu 22.04 (with kernel upgraded to 6.8.4)
  • Database: MySQL 8.0.36
  • Parameters: not sure what's expected here ?

Install was working fine in 2.6.7.

@j0k3r
Copy link
Member

j0k3r commented Apr 8, 2024

Have you tried to empty your cache? rm -rf var/cache/*

@brotherduck
Copy link
Author

brotherduck commented Apr 8, 2024

Done, now I've got a blank page and this in log :

[2024-04-08T14:33:46.310423+00:00] request.CRITICAL: Uncaught PHP Exception Error: "Failed opening required '/var/www/html/wallabag/var/cache/prod/ContainerLqeQcp2/getFosRest_Decoder_JsonService.php' (include_path='.:/usr/share/php')" at /var/www/html/wallabag/var/cache/prod/ContainerLqeQcp2/appAppKernelProdContainer.php line 393 {"exception":"[object] (Error(code: 0): Failed opening required '/var/www/html/wallabag/var/cache/prod/ContainerLqeQcp2/getFosRest_Decoder_JsonService.php' (include_path='.:/usr/share/php') at /var/www/html/wallabag/var/cache/prod/ContainerLqeQcp2/appAppKernelProdContainer.php:393)"} []
[2024-04-08T14:33:46.305703+00:00] request.INFO: Matched route "api_get_version". {"route":"api_get_version","route_parameters":{"_route":"api_get_version","_format":"json","_controller":"Wallabag\ApiBundle\Controller\WallabagRestController::getVersionAction"},"request_uri":"https://anonymized/wallabag/web/api/version","method":"GET"} []
[2024-04-08T14:33:46.310643+00:00] request.CRITICAL: Uncaught PHP Exception Error: "Failed opening required '/var/www/html/wallabag/var/cache/prod/ContainerLqeQcp2/getSecurity_Firewall_Map_Context_ApiService.php' (include_path='.:/usr/share/php')" at /var/www/html/wallabag/var/cache/prod/ContainerLqeQcp2/appAppKernelProdContainer.php line 393 {"exception":"[object] (Error(code: 0): Failed opening required '/var/www/html/wallabag/var/cache/prod/ContainerLqeQcp2/getSecurity_Firewall_Map_Context_ApiService.php' (include_path='.:/usr/share/php') at /var/www/html/wallabag/var/cache/prod/ContainerLqeQcp2/appAppKernelProdContainer.php:393)"} []

But the files do exist :

ls -al var/cache/prod/ContainerLqeQcp2/getFosRest_Decoder_JsonService.php
-rw-r--r-- 1 www-data www-data 408 avril  8 16:47 var/cache/prod/ContainerLqeQcp2/getFosRest_Decoder_JsonService.php`
ls -al var/cache/prod/ContainerLqeQcp2/getSecurity_Firewall_Map_Context_ApiService.php
-rw-r--r-- 1 www-data www-data 2043 avril  8 16:47 var/cache/prod/ContainerLqeQcp2/getSecurity_Firewall_Map_Context_ApiService.php

@j0k3r
Copy link
Member

j0k3r commented Apr 8, 2024

@brotherduck
Copy link
Author

At first look permissions seems ok (everything is owned by www-data), but if I do a chown -R www-data:www-data on the var/cache/prod directory then I fall back on the 500 Internal Server Error, and once again in the logs :

[2024-04-08T18:27:42.782384+00:00] request.CRITICAL: Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\ClassNotFoundError: "Attempted to load class "DefaultTypedFieldMapper" from namespace "Doctrine\ORM\Mapping". Did you forget a "use" statement for another namespace?" at /var/www/html/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php line 823 {"exception":"[object] (Symfony\Component\ErrorHandler\Error\ClassNotFoundError(code: 0): Attempted to load class "DefaultTypedFieldMapper" from namespace "Doctrine\ORM\Mapping".\nDid you forget a "use" statement for another namespace? at /var/www/html/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php:823)"} []

@j0k3r
Copy link
Member

j0k3r commented Apr 8, 2024

Any idea @yguedidi?
It seems the class got reined in recent ORM release but I don't know why it still required..

@yguedidi
Copy link
Contributor

yguedidi commented Apr 8, 2024

Maybe a corrupted vendor dir content? What if you try removing it and run composer install?

@brotherduck
Copy link
Author

Tried it, rm -rf vendor directory, ran make install, still have the same 500 error :

[2024-04-09T04:19:11.196329+00:00] request.CRITICAL: Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\ClassNotFoundError: "Attempted to load class "DefaultTypedFieldMapper" from namespace "Doctrine\ORM\Mapping". Did you forget a "use" statement for another namespace?" at /var/www/html/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php line 823 {"exception":"[object] (Symfony\Component\ErrorHandler\Error\ClassNotFoundError(code: 0): Attempted to load class "DefaultTypedFieldMapper" from namespace "Doctrine\ORM\Mapping".\nDid you forget a "use" statement for another namespace? at /var/www/html/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php:823)"} []

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

3 participants