-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Autoupgrade not updating modules with 302 error #12012
Comments
Hi @krasnycz, So, the upgrade of your shop is done successfully, but your native modules are not updated? |
Well I presume the autoupgrade module should work same way as it was before? After updating the database there is a phase to update modules X from Y. Or it was changed? I reversed the staging to 1.7.4.2 and deleted all non-native modules. Prod.log now gives me [2019-01-03 15:40:24] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: "No route found for "GET /addons/login": Method Not Allowed (Allow: POST)" at /home/123.cloudwaysapps.com/ABC/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 143 {"exception":"[object] (Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException(code: 0): No route found for "GET /addons/login": Method Not Allowed (Allow: POST) at /home/123.cloudwaysapps.com/ABC/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:143, Symfony\Component\Routing\Exception\MethodNotAllowedException(code: 0): at /home/123.cloudwaysapps.com/ABC/public_html/var/cache/prod/appProdProjectContainerUrlMatcher.php:1386)"} [] |
After the upgrade performance is giving Error 500 as described in the #11784. The update process was obviously not completed as ajax update gave 302 error but wrote the log that all was done. The problem is poor logging. |
@krasnycz, in my case, after the upgrade from PS1.7.4.4 to PS1.7.5.0, the upgrade is done successfully but there are no upgrade for the native module. |
When I enable debug mode in the config file I can access the performance page without any problem. I think this issue is related with permissions and autoupgrade. |
@krasnycz, Could you please try to clear cache manually by deleting all the folder into var/cache (prod & dev). |
I did manually rm all files/foldes in cache. Also I can clean it when debug is enabled. I can access the performance after clearing the cache. However I still believe the update was not done correctly. |
Seems multiple person describing exactly same issues at the comments at http://build.prestashop.com/news/prestashop-1-7-5-0-available/ |
@krasnycz, I discussed with our developer & I checked that before launching the upgrade, you need to let the module recover the list of files to be modified, the modules to be upgraded etc.. Thanks to check & feedback! |
@khouloudbelguith This is not the case. I waited and checked the files before the update. Page was comletely loaded and no ajax was runing active job. |
Hi @krasnycz, I launched again a new upgrade from PS1.7.4.4 to PS1.7.5.0 using the 1-click upgrade v4.5.1 & it ok.
But, when I tried to go to the BO => Modules & Services => Updates Tab, there are still native modules not upgrated => which is wrong. |
@khouloudbelguith This is your standard answer for any issue reported. I do not contradict that the autoupgrade might work on some installations/servers however the purpose of this place is to resolve issues/bugs and obviously me and many other users facing similar issue. I just tried to show you that PS autoupgrade log shows the upgrade was done but it was not. The error reporting in the PS is very poor and there is almost no way to debug this problem. I deleted all 3rd party modules before installa and disabled overrides. Result is same. |
Hi @krasnycz, I attached a video recording to show you that there is an issue which is the list of Updates module which is not correct. |
Well I unsed autoupgrade to update this installation multiple times without any issue. Same server and no core files modified. As I stated before I manually uninstalled all 3rd party modules but result is same. I will try clone the instance to different server and give it a try. |
@krasnycz, ok. |
@khouloudbelguith Tried different server with PHP 7.0. Same results. |
@krasnycz, thanks for your feedback. |
I forget to state that its multistore installation. I also tried to:
The problem persists. |
@krasnycz, I tried again a new upgrade from PS1.7.4.2 to PS1.7.5.0 with the 1-click upgrade 4.5.1 (multistore is enabled) |
And on my setups the module upgrade part is omitted. What could be reasons for it? I resolved the 302 error and everything so now the update completes like fine however modules update part is skipped. [2019-01-04 17:12:14] Database upgraded. Now upgrading your Addons modules... |
I tried to upgrade 1.7.4.4 different instance and different server. Modules were updated however BO Catalog and Peformace tabs give Error 500. In the var/log there is same error as on the other instances. [2019-01-07 14:56:00] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: "No route found for "GET /improve/modules/addons/login": Method Not Allowed (Allow: POST)" at /home/123.cloudwaysapps.com/ABC/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 143 {"exception":"[object] (Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException(code: 0): No route found for "GET /improve/modules/addons/login": Method Not Allowed (Allow: POST) at /home/123.cloudwaysapps.com/ABC/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:143, Symfony\Component\Routing\Exception\MethodNotAllowedException(code: 0): at /home/123.cloudwaysapps.com/ABC/public_html/var/cache/prod/appProdProjectContainerUrlMatcher.php:2611)"} [] |
HI @krasnycz,
|
@khouloudbelguith Well
Well but still it's a PS issue :D. All previous updates were fine on the same setup.
I tried to clear manually. Only error 500 in products and performance. No other errors. Seems both issues are connected. Whenever modules are updated or not the results is same. I tried to move both instances to different server configuration with same results. Again the main problem is very poor PS debug&error reporting. No way to debug such issues. Always same story without resolution. |
@krasnycz, to more understand how to reproduce your second issue, can you open a new one with more information about your configuration, because it is a different issue. |
@khouloudbelguith Well with help of cloudways support team we were able to identify the issue. It happens even on clean install when try upgrade. There is lot of reports on this in past 2 years and PS dev team is simply ignoring those reports. See the reports and temporary solution at https://www.prestashop.com/forums/topic/568331-17-cant-access-product/ |
I have this issue on 7 difference installs. Even clean install faces it. Server OS: Debian 8.11 Even if you resolve related issues the core error of this issue persists and makes prestashop unsuable if dev mode if off causing the following error: request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Type error: Argument 1 passed to PrestaShop\PrestaShop\Core\Search\SearchParameters::__construct() must be an instance of PrestaShopBundle\Entity\Repository\AdminFilterRepository, instance of Doctrine\ORM\EntityRepository given, called in /home/123.cloudwaysapps.com/ABC/public_html/var/cache/prod/ContainerEipuslj/getPrestashop_Core_Admin_SearchParametersService.php on line 8" at /home/123.cloudwaysapps.com/ABC/public_html/src/Core/Search/SearchParameters.php line 50 {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Type error: Argument 1 passed to PrestaShop\PrestaShop\Core\Search\SearchParameters::__construct() must be an instance of PrestaShopBundle\Entity\Repository\AdminFilterRepository, instance of Doctrine\ORM\EntityRepository given, called in /home/123.cloudwaysapps.com/ABC/public_html/var/cache/prod/ContainerEipuslj/getPrestashop_Core_Admin_SearchParametersService.php on line 8 at /home/123.cloudwaysapps.com/ABC/public_html/src/Core/Search/SearchParameters.php:50)"} [] |
Hi @krasnycz, The performance page display the same exception with Fresh installation 1.7.5.0? |
Yes. I did 2 clean install of 1.7.4.4 on 2 different server provides via cloudways interface and reproduced the issue. It does even on clean install. Other 302 errors are permissions related as mentioned in the prestashop forum link I posted earlier. The issue is basically same I previously reported at #11784 but was closed without resolution as related to 3rd party module but it's not. Clean install reproduces same problem. |
Despite our several trials, we could not reproduce your issue with the provided information. Best regards. |
When I try upgrade PS 1.7.4.2 to 1.7.5.0 using autoupgrade all seems to go fine according to the log, but modules are not updated. I have same issue on multiple servers. I tried to disable overrides and also native modules.
Digital Ocean server with PHP 7.1.
Autoupgrade version 4.5.1
Attaching log file from autoupgrade.
In the inspector it seems to generated the following error instead for upgrading the module.
Request URL: https://dev.domain.cz/adminX/ajax.php?rand=1546524812367
Request Method: POST
Status Code: 302
I can see the following record in the apache_phpstack_access log:
1.2.3.4 - - [03/Jan/2019:14:13:32 +0000] "POST /adminX/ajax.php?rand=1546524812367 HTTP/1.0" 302 745 "https://dev.domain.cz/adminX/index.php?controller=AdminSelfUpgrade&token=29dbed71eb961bc8afbbfd6cbc381fff" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"
In the var/log the following errors are being generated:
[2019-01-03 15:12:14] console.ERROR: Error thrown while running command "doctrine:cache:clear-metadata --flush=1". Message: "Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI." {"exception":"[object] (LogicException(code: 0): Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI. at /home/123.cloudwaysapps.com/ABC/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php:89)","command":"doctrine:cache:clear-metadata --flush=1","message":"Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI."} []
[2019-01-03 15:12:14] console.DEBUG: Command "doctrine:cache:clear-metadata --flush=1" exited with code "1" {"command":"doctrine:cache:clear-metadata --flush=1","code":1} []
[2019-01-03 15:12:14] console.ERROR: Error thrown while running command "doctrine:cache:clear-query --flush=1". Message: "Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI." {"exception":"[object] (LogicException(code: 0): Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI. at /home/123.cloudwaysapps.com/ABC/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php:89)","command":"doctrine:cache:clear-query --flush=1","message":"Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI."} []
[2019-01-03 15:12:14] console.DEBUG: Command "doctrine:cache:clear-query --flush=1" exited with code "1" {"command":"doctrine:cache:clear-query --flush=1","code":1} []
Any idea how to troubleshoot this issue? This installation has been previously autoupgraded multiple times without any issues. I tried different instance 1.7.2.2 -> 1.7.5.0 with same result. The DO instance is installed thru cloudways.
log.txt
The text was updated successfully, but these errors were encountered: