News: Update not possible

Created on 2 Feb 2021  路  19Comments  路  Source: nextcloud/news

Hi,

I'd like to upgrade from 15.1.1 to 15.2.0 and nc shows an error popup that upgrade is not possible.

Error in german language is:
"Es ist ein Fehler bei der Anfrage aufgetreten. Es kann nicht fortgefahren werden.
Die App konnte nicht aktualisiert werden."

Hope english translation is correct:
"An error occurred with the request. It cannot proceed.
The app could not be updated. "

Did I tried to early?

bug

Most helpful comment

Now, what IS this codesniffer?

It's a development tool that shouldn't even be packaged in the news app (but also shouldn't break the server)

All 19 comments

Did you check the logs of your server?

Same here. Did you check the logs? Mine says:

锘匡豢[core] Error: Exception: Could not extract app news at <<closure>>

0. /var/www/nextcloud/lib/private/Installer.php line 198
   OC\Installer->downloadApp("*** sensitive parameter replaced ***", false)
1. /var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php line 532
   OC\Installer->updateAppstoreApp("*** sensitive parameters replaced ***")
2. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 169
   OCA\Settings\Controller\AppSettingsController->updateApp("*** sensitive parameters replaced ***")
3. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 100
   OC\AppFramework\Http\Dispatcher->executeController(OCA\Settings\Con ... {}, "updateApp")
4. /var/www/nextcloud/lib/private/AppFramework/App.php line 152
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings\Con ... {}, "updateApp")
5. /var/www/nextcloud/lib/private/Route/Router.php line 309
   OC\AppFramework\App::main("OCA\\Settings\\ ... r", "updateApp", OC\AppFramework\ ... {}, {appId: "*** sen ... "})
6. /var/www/nextcloud/lib/base.php line 1008
   OC\Route\Router->match("/settings/apps/update/news")
7. /var/www/nextcloud/index.php line 37
   OC::handleRequest()

GET /settings/apps/update/news`

I also tried manual Installation. Also failed:

'[index] Error: OCP\AppFramework\QueryException: Could not resolve folderService! Class folderService does not exist at <<closure>>

 0. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 126
    OC\AppFramework\Utility\SimpleContainer->resolve("folderService")
 1. /var/www/nextcloud/lib/private/ServerContainer.php line 156
    OC\AppFramework\Utility\SimpleContainer->query("folderService", true)
 2. /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php line 430
    OC\ServerContainer->query("folderService", true)
 3. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 96
    OC\AppFramework\DependencyInjection\DIContainer->query("folderService")
 4. <<closure>>
    OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}("*** sensitive parameters replaced ***")
 5. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 101
    array_map(Closure {}, [ReflectionParam ... "])
 6. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 109
    OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionClass  ... "})
 7. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 126
    OC\AppFramework\Utility\SimpleContainer->resolve("OCA\\News\\Controller\\FeedController")
 8. /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php line 455
    OC\AppFramework\Utility\SimpleContainer->query("OCA\\News\\Controller\\FeedController")
 9. /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php line 427
    OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback("OCA\\News\\Controller\\FeedController")
10. /var/www/nextcloud/lib/private/AppFramework/App.php line 139
    OC\AppFramework\DependencyInjection\DIContainer->query("OCA\\News\\Controller\\FeedController")
11. /var/www/nextcloud/lib/private/Route/Router.php line 309
    OC\AppFramework\App::main("OCA\\News\\Controller\\FeedController", "index", OC\AppFramework\ ... {}, {_route: "news.feed.index"})
12. /var/www/nextcloud/lib/base.php line 1008
    OC\Route\Router->match("/apps/news/feeds")
13. /var/www/nextcloud/index.php line 37
    OC::handleRequest()

GET /apps/news/feeds'

Same here. Updating from occ command produces following error message:

[core] Error: Exception: Could not extract app news at <<closure>>

0. /var/www/html/lib/private/Installer.php line 198
   OC\Installer->downloadApp("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
1. /var/www/html/core/Command/App/Update.php line 116
   OC\Installer->updateAppstoreApp("*** sensitive parameters replaced ***")
2. /var/www/html/custom_apps/bookmarks/vendor/symfony/console/Command/Command.php line 255
   OC\Core\Command\App\Update->execute(Symfony\Componen ... {}, Symfony\Componen ... {})
3. /var/www/html/custom_apps/bookmarks/vendor/symfony/console/Application.php line 1009
   Symfony\Component\Console\Command\Command->run(Symfony\Componen ... {}, Symfony\Componen ... {})
4. /var/www/html/custom_apps/bookmarks/vendor/symfony/console/Application.php line 273
   Symfony\Component\Console\Application->doRunCommand(OC\Core\Command\App\Update {}, Symfony\Componen ... {}, Symfony\Componen ... {})
5. /var/www/html/custom_apps/bookmarks/vendor/symfony/console/Application.php line 149
   Symfony\Component\Console\Application->doRun(Symfony\Componen ... {}, Symfony\Componen ... {})
6. /var/www/html/lib/private/Console/Application.php line 215
   Symfony\Component\Console\Application->run(Symfony\Componen ... {}, Symfony\Componen ... {})
7. /var/www/html/console.php line 100
   OC\Console\Application->run()
8. /var/www/html/occ line 11
   require_once("/var/www/html/console.php")

at 2021-02-02T17:50:04+00:00

So the first error, is caused by your server not being able to download the app from the App Store, we can't do anything about that.

@p3ab0dy what steps did you take for the manual installation?

Same for me using the web updater and using occ.

Could not extract app news: Out-of-path file extraction {/tmp/oc_tmp_aLtQju-folder/news/vendor/bin/phpcs --> ../squizlabs/php_codesniffer/bin/phpcs}


full log entry

{
    "reqId": "Wr2utxoJnqVuffsXat92",
    "level": 3,
    "time": "2021-02-02T17:56:53+00:00",
    "remoteAddr": "127.0.0.1",
    "user": "anoymouserver",
    "app": "core",
    "method": "GET",
    "url": "/settings/apps/update/news",
    "message": {
        "Exception": "Exception",
        "Message": "Could not extract app news: Out-of-path file extraction {/tmp/oc_tmp_aLtQju-folder/news/vendor/bin/phpcs --> ../squizlabs/php_codesniffer/bin/phpcs}",
        "Code": 0,
        "Trace": [{
                "file": "/var/www/cloud/lib/private/Installer.php",
                "line": 204,
                "function": "downloadApp",
                "class": "OC\\Installer",
                "type": "->",
                "args": ["*** sensitive parameter replaced ***", false]
            }, {
                "file": "/var/www/cloud/apps/settings/lib/Controller/AppSettingsController.php",
                "line": 532,
                "function": "updateAppstoreApp",
                "class": "OC\\Installer",
                "type": "->",
                "args": ["*** sensitive parameters replaced ***"]
            }, {
                "file": "/var/www/cloud/lib/private/AppFramework/Http/Dispatcher.php",
                "line": 218,
                "function": "updateApp",
                "class": "OCA\\Settings\\Controller\\AppSettingsController",
                "type": "->",
                "args": ["*** sensitive parameters replaced ***"]
            }, {
                "file": "/var/www/cloud/lib/private/AppFramework/Http/Dispatcher.php",
                "line": 127,
                "function": "executeController",
                "class": "OC\\AppFramework\\Http\\Dispatcher",
                "type": "->",
                "args": [{
                        "__class__": "OCA\\Settings\\Controller\\AppSettingsController"
                    }, "updateApp"]
            }, {
                "file": "/var/www/cloud/lib/private/AppFramework/App.php",
                "line": 157,
                "function": "dispatch",
                "class": "OC\\AppFramework\\Http\\Dispatcher",
                "type": "->",
                "args": [{
                        "__class__": "OCA\\Settings\\Controller\\AppSettingsController"
                    }, "updateApp"]
            }, {
                "file": "/var/www/cloud/lib/private/Route/Router.php",
                "line": 302,
                "function": "main",
                "class": "OC\\AppFramework\\App",
                "type": "::",
                "args": ["OCA\\Settings\\Controller\\AppSettingsController", "updateApp", {
                        "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
                    }, {
                        "appId": "*** sensitive parameter replaced ***",
                        "_route": "settings.AppSettings.updateApp"
                    }
                ]
            }, {
                "file": "/var/www/cloud/lib/base.php",
                "line": 1002,
                "function": "match",
                "class": "OC\\Route\\Router",
                "type": "->",
                "args": ["/settings/apps/update/news"]
            }, {
                "file": "/var/www/cloud/index.php",
                "line": 37,
                "function": "handleRequest",
                "class": "OC",
                "type": "::",
                "args": []
            }
        ],
        "File": "/var/www/cloud/lib/private/Installer.php",
        "Line": 330,
        "CustomMessage": "--"
    },
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0",
    "version": "21.0.0.14",
    "id": "6019926d6d19c"
}

(This is the first time I've seen this message with an actual explanation 馃 )

So the first error, is caused by your server not being able to download the app from the App Store, we can't do anything about that.

@p3ab0dy what steps did you take for the manual installation?

  1. wget news.zip
  2. unzip
  3. rm -rf app/news
  4. mv new_news_folder apps/news

@p3ab0dy there is no news.zip if you downloaded the repository as an archive that is something different.
On the releases page of this repository you find a news.tar.gz that's the archive you need.
After placing it in apps and so on (make sure to have the right permissions) you need to run occ upgrade as your webserver-user.

Same for me using the web updater and using occ.

Could not extract app news: Out-of-path file extraction {/tmp/oc_tmp_aLtQju-folder/news/vendor/bin/phpcs --> ../squizlabs/php_codesniffer/bin/phpcs}

(This is the first time I've seen this message with an actual explanation thinking )

Yea me too do you maybe run on a more verbose log level or a beta of nextcloud?

NC 21.0.0 beta 7 with loglevel 2 (warning)

@p3ab0dy there is no news.zip if you downloaded the repository as an archive that is something different.
On the releases page of this repository you find a news.tar.gz that's the archive you need.
After placing it in apps and so on (make sure to have the right permissions) you need to run occ upgrade as your webserver-user.

Perfect you where right! Thanks for that! Yeah I picked the source.zip and not the release.

Yeah, seeing this as well on the latest release of NC.

I have Docker production latest version of Nextcloud and also I can't update from panel:

Error   core    Exception: Could not extract app news
/var/www/html/lib/private/Installer.php - line 198:

OC\Installer->downloadApp("*** sensiti ... *", false)

/var/www/html/apps/settings/lib/Controller/AppSettingsController.php - line 532:

OC\Installer->updateAppstoreApp("*** sensiti ... *")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 169:

OCA\Settings\Controller\AppSettingsController->updateApp("*** sensiti ... *")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 100:

OC\AppFramework\Http\Dispatcher->executeController(OCA\Settings ... {}, "updateApp")

/var/www/html/lib/private/AppFramework/App.php - line 152:

OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings ... {}, "updateApp")

/var/www/html/lib/private/Route/Router.php - line 309:

OC\AppFramework\App::main("OCA\\Settin ... r", "updateApp", OC\AppFramew ... {}, { appId: "** ... "})

/var/www/html/lib/base.php - line 1008:

OC\Route\Router->match("/settings/apps/update/news")

/var/www/html/index.php - line 37:

OC::handleRequest()

I have done some more digging. I'm running my installation in Docker. It works with the 20.0.5-apache image, but not with 20.0.6.
To reproduce:

  1. docker run nextcloud:20.0.5-apache
  2. Go to http://172.17.0.2 (or whatever IP docker assigns)
  3. Finish setup and install the news app
  4. Works
  5. Do the same thing with 20.0.6-apache and it fails with the Could not extract app news error

@woefe thanks for that so it's probably a bug that was introduced in NC 20.0.6 with an updated dependency.

As I already said we can't fix that, nextcloud/server is unpacking and installing the app

I'am running docker 20.0.6-fpm have same issue as @woefe

20.0.6 introduced a new code signing certificate. Maybe that's related?

OK, but code signing doesn't have to do with this: Could not extract app news: Out-of-path file extraction {/tmp/oc_tmp_aLtQju-folder/news/vendor/bin/phpcs --> ../squizlabs/php_codesniffer/bin/phpcs}

Now, what IS this codesniffer?

Now, what IS this codesniffer?

It's a development tool that shouldn't even be packaged in the news app (but also shouldn't break the server)

Closing this as it is a duplicate of https://github.com/nextcloud/news/issues/1086

Was this page helpful?
0 / 5 - 0 ratings

Related issues

janumix picture janumix  路  7Comments

rscmbbng picture rscmbbng  路  6Comments

simonspa picture simonspa  路  4Comments

severin-lemaignan picture severin-lemaignan  路  8Comments

flurischt picture flurischt  路  3Comments