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

Fatal error after News app update using core updater #18391

Closed
anonimal opened this issue Aug 18, 2015 · 46 comments
Closed

Fatal error after News app update using core updater #18391

anonimal opened this issue Aug 18, 2015 · 46 comments

Comments

@anonimal
Copy link

Steps to reproduce

  1. Update News app from 5.3.9 to 6.0.1 via the WebUI

Expected behaviour

Successfully updated app.

Actual behaviour

Breaks owncloud (blank page of death) because of unfulfilled require_once() (files are simply not there).

Server configuration

Operating system:
Arch
Web server:
Apache 2.4.16
Database:
MariaDB 10.0.21
PHP version:
5.6.12
ownCloud version: (see ownCloud admin page)
8.1.1
Updated from an older ownCloud or fresh install:
Fresh install

Logs

Web server error log

PHP Fatal error:  require_once(): Failed opening required '/usr/share/webapps/owncloud/apps/news/appinfo/../vendor/autoload.php' (include_path='/usr/sha in /usr/share/webapps/owncloud/apps/news/appinfo/app.php on line
 18

ownCloud log (data/owncloud.log)

{"reqId":"E6Y4qFk73598wkF3iggA","remoteAddr":"127.0.0.1","app":"PHP","message":"require_once(\/usr\/share\/webapps\/owncloud\/apps\/news\/appinfo\/..\/vendor\/autoload.php): failed to open stream: No such file or directory at \/usr\/share\/webapps\/owncloud\/apps\/news\/appinfo\/app.php#18","level":3,"time":"2015-08-18T11:53:38+00:00"}
{"reqId":"E6Y4qFk73598wkF3iggA","remoteAddr":"127.0.0.1","app":"PHP","message":"require_once(): Failed opening required '\/usr\/share\/webapps\/owncloud\/apps\/news\/appinfo\/..\/vendor\/autoload.php' (include_path=':\/usr\/sha at \/usr\/share\/webapps\/owncloud\/apps\/news\/appinfo\/app.php#18","level":3,"time":"2015-08-18T11:53:38+00:00"}

Temporary working solution (via git)

  1. Remove news app from /apps
  2. Clean the app from the database with:
DELETE FROM oc_appconfig WHERE appid = 'news';
DROP TABLE oc_news_items;
DROP TABLE oc_news_feeds;
DROP TABLE oc_news_folders;
  1. Clone app directly from the repository and apply appropriate permissions
  2. Click ''Enable' in WebUI

News app files provided by updater

See this paste:
https://zerobin.net/?c73056692ca37283#VY3LeHqDOvk9kOXsIPyMkwlLnA3WUsmQl9ucu7eIxYU=

Notes

I've uninstalled the app and have done a fresh install of the app (instead of updating) and am given the same errors. Cloning directly from the repo works as expected.

@ghost
Copy link

ghost commented Aug 18, 2015

Hi,

had noticed the same and using nearly the same setup as the OP except Debian Jessie instead of Arch and nginx instead of Apache. Manually installing the app from apps.owncloud.com did the trick so it seems the archive is ok but not extracted correctly by the app installer.

@karlitschek
Copy link
Contributor

@Raydiation what do you think?

@BernhardPosselt
Copy link
Contributor

Dup, bug in core ;) #18315

@ghost
Copy link

ghost commented Aug 18, 2015

@Raydiation Don't think so. #18315 is about old PHP versions where we both have PHP 5.6 installed.

Manually installing the app is also working so its not an dependency issue. The app archive is just not extraced completely.

@BernhardPosselt
Copy link
Contributor

OK different error it seems

@BernhardPosselt
Copy link
Contributor

No idea then, someone needs to audit the installer code and check what goes wrong.

@DeepDiver1975
Copy link
Member

PHP Fatal error: require_once(): Failed opening required '/usr/share/webapps/owncloud/apps/news/appinfo/../vendor/autoload.php' (include_path='/usr/sha in /usr/share/webapps/owncloud/apps/news/appinfo/app.php on line 18

Well - to be honest - if a file is not there which is expected to be there, it is expected to fall part.

Won't fix from my pov - no ide why the file is missing

@BernhardPosselt
Copy link
Contributor

Package from apps.owncloud.com and git works just fine, same goes for installing over the web interface. Everything works fine from my POV, haven't tried updating though.

@DeepDiver1975
Copy link
Member

See this paste:
https://zerobin.net/?c73056692ca37283#VY3LeHqDOvk9kOXsIPyMkwlLnA3WUsmQl9ucu7eIxYU=

the file is missing in this list as well

@BernhardPosselt
Copy link
Contributor

@anonimal btw you can run ./occ news:verify-install to check which files are missing/outdate, see https://github.com/owncloud/news#commands

@ghost
Copy link

ghost commented Aug 18, 2015

File was missing here during the update from 5.3.9 to 6.0.0 and also from 6.0.0 to 6.0.1 so this wasn't just a network outtage or similar. This also happened only with the news app. Is there anything different in the news app archive compared to apps like calendar and music?

@BernhardPosselt
Copy link
Contributor

I don't think there's anything out of the ordinary.

@ghost
Copy link

ghost commented Aug 18, 2015

Ok. Is there anything what i could do to debug this? I have some time in two days to have a closer look at this.

@BernhardPosselt
Copy link
Contributor

Try to reproduce it reliably :)

@BernhardPosselt
Copy link
Contributor

And post the steps

@anonimal
Copy link
Author

@Raydiation running occ on the command line will still throw the same fatal error.

$ sudo -u http php occ news:verify-install
PHP Fatal error: require_once(): Failed opening required '/usr/share/webapps/owncloud/apps/news/appinfo/../vendor/autoload.php' (include_path='/usr/sha in /usr/share/webapps/owncloud/apps/news/appinfo/app.php on line 18

Now, the git version:

$ sudo -u http php occ news:verify-install
 558/558 [============================] 100%

Installation verified, everything OK!

@BernhardPosselt
Copy link
Contributor

@anonimal right, I also need a vendor lib for that, that's why the error is thrown. If you've installed composer you could run

composer dump

inside the news app directory to generate the autoload.php (if the composer.json is there)

In any case the install does not validate :)

@anonimal
Copy link
Author

Confirmed: composer dump does not resolve the issue.

@BernhardPosselt
Copy link
Contributor

The verify command should run further after this

@anonimal
Copy link
Author

Command returns:

PHP Fatal error:  Class 'OCA\News\Config\AppConfig' not found in /usr/share/webapps/owncloud/apps/news/appinfo/application.php on line 62

@BernhardPosselt
Copy link
Contributor

Ok, forget it, too much is missing apparently.

@ghost
Copy link

ghost commented Aug 21, 2015

@Raydiation

Try to reproduce it reliably :)
And post the steps

I'm able to reproduce this reliable by following those steps:

  1. Download https://github.com/owncloud/news/archive/6.0.0.tar.gz or https://github.com/owncloud/news/archive/5.3.9.tar.gz
  2. Extract archives to $path/apps/news
  3. Browse http://example.com/index.php/settings/apps
  4. Enable news app 5.3.9/6.0.0
  5. Reload page and have a working news app
  6. Browse http://example.com/index.php/settings/apps
  7. Hit the "update to 6.0.1" button
  8. Reload page
  9. Get WSOD with the log entries of the OP above

There is nothing in the logfiles (even with loglevel 0) expect the ones above.

@DeepDiver1975
Copy link
Member

I was just trying to reproduce this - autoload.php does exist for me after upgrade - but news is broken due to this:

{"reqId":"tLtQkh9nMXKiyT+GVInS","remoteAddr":"::1","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\News\\\\Fetcher\\\\FeedFetcher! Class PicoFeed\\\\Reader\\\\Reader does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(106): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\News\\\\\\\\Fetche...')\\n#1 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(66): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\News\\\\\\\\Fetche...')\\n#2 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(85): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->buildClass(Object(ReflectionClass))\\n#3 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(106): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\News\\\\\\\\Fetche...')\\n#4 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/apps2\\\/news\\\/appinfo\\\/application.php(179): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\News\\\\\\\\Fetche...')\\n#5 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(112): OCA\\\\News\\\\AppInfo\\\\Application->OCA\\\\News\\\\AppInfo\\\\{closure}(Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer))\\n#6 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(104): Pimple\\\\Container->offsetGet('OCA\\\\\\\\News\\\\\\\\Fetche...')\\n#7 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(66): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\News\\\\\\\\Fetche...')\\n#8 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(85): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->buildClass(Object(ReflectionClass))\\n#9 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(106): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\News\\\\\\\\Servic...')\\n#10 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(66): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\News\\\\\\\\Servic...')\\n#11 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(85): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->buildClass(Object(ReflectionClass))\\n#12 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(106): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\News\\\\\\\\Contro...')\\n#13 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/app.php(96): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\News\\\\\\\\Contro...')\\n#14 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/routing\\\/routeactionhandler.php(45): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\News\\\\\\\\Contro...', 'index', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#15 [internal function]: OC\\\\AppFramework\\\\routing\\\\RouteActionHandler->__invoke(Array)\\n#16 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/route\\\/router.php(280): call_user_func(Object(OC\\\\AppFramework\\\\routing\\\\RouteActionHandler), Array)\\n#17 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/base.php(894): OC\\\\Route\\\\Router->match('\\\/apps\\\/news\\\/fold...')\\n#18 \\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/index.php(40): OC::handleRequest()\\n#19 {main}\",\"File\":\"\\\/home\\\/deepdiver\\\/Development\\\/ownCloud\\\/master\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php\",\"Line\":91}","level":4,"time":"2015-08-21T18:09:30+00:00","method":"GET","url":"\/index.php\/apps\/news\/folders"}

@BernhardPosselt
Copy link
Contributor

So updating randomly deletes files? Maybe race conditions? We are first extracting the archive, then deleting the old one and move the new folder over, right?

@DeepDiver1975
Copy link
Member

After reloading the page it worked without issue.

@ghost
Copy link

ghost commented Sep 10, 2015

Just tested with the new release of the Tasks app from 0.7.1 to 0.8.0 which worked without any problem. Few days ago tested the update of the news app from 6.0.1 to 6.0.3 and the same happens.

Is there just anything in the archive of the news app which can't be handled by core? Any known bugs of PHP with extracting archives etc?

@BernhardPosselt
Copy link
Contributor

ZIP vs tar.gz?

@ghost
Copy link

ghost commented Sep 12, 2015

Could be. I can't remember if the versions 5.3.9 or below where all also tar.gz or what format have those releases used?

@BernhardPosselt
Copy link
Contributor

We've used tar.gz version 2.x IIRC

@MorrisJobke
Copy link
Contributor

Could be. I can't remember if the versions 5.3.9 or below where all also tar.gz or what format have those releases used?

@RealRancor What distro do you use? Maybe it's a problem with the used libraries.

@ghost
Copy link

ghost commented Oct 9, 2015

@MorrisJobke
Debian Jessie which has PHP 5.6.13 https://packages.debian.org/jessie/php5

@MorrisJobke
Copy link
Contributor

This will hopefully be gone once #20295 is implemented.

I will close this issue as an duplicate of #20295.

@ghost
Copy link

ghost commented Nov 23, 2015

@MorrisJobke I don't think that a failing extraction of an archive will be solved by code signing.

This issue here is caused by the tar.bz2 format used by the new app. Other apps using the .zip format are not showing thid problem.

@MorrisJobke
Copy link
Contributor

@MorrisJobke I don't think that a failing extraction of an archive will be solved by code signing.

Oh ... I thought it was because of a broken (partly) extraction.

@MorrisJobke MorrisJobke reopened this Nov 23, 2015
@MorrisJobke
Copy link
Contributor

Could be fixed by #20196 which is part of 8.1.5, 8.2.1 and 9.0.0

@MorrisJobke
Copy link
Contributor

Could be fixed by #20196 which is part of 8.1.5, 8.2.1 and 9.0.0

@RealRancor Can I ask you to test this again with one of the above versions?

@ghost
Copy link

ghost commented Jan 6, 2016

@MorrisJobke Thanks for the ping, have missed the previous comment.

Just tested with oC 8.2.2 on PHP 5.6.14:

  1. Download https://github.com/owncloud/news/archive/6.1.0.tar.gz
  2. Extract archive into /apps
  3. Enable News 6.1.0
  4. Open "News" from Navigation and have a working news 6.1.0
  5. Open internal appstore
  6. Hit "Update to 6.1.1" button
  7. Open "News" from Navigation and get an Internal Server error

When having a look at filesystem level the /apps/news folder contains only the following folders and files:

appinfo
AUTHORS.md
CHANGELOG.md
command
config
CONTRIBUTING.md
controller
COPYING
cron
css
db
dependencyinjection
fetcher
hooks
img
js
news.iml
templates
vendor

where the full 6.1.1 from https://apps.owncloud.com/content/show.php/News?content=168040 has this list of files and folders in its main dir:

admin
appinfo
AUTHORS.md
bin
build
CHANGELOG.md
command
composer.json
composer.lock
config
CONTRIBUTING.md
controller
COPYING
cron
css
db
dependencyinjection
explore
fetcher
hooks
http
img
js
l10n
.mailmap
news.iml
plugin
README.md
service
templates
utility
vendor

With 8.2.2 there is also now another error:

{"reqId":"A7pc7mjaurORp\/YbsJQ9","remoteAddr":"xxx","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\News\\\\Controller\\\\PageController! Class OCA\\\\News\\\\Explore\\\\RecommendedSites does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(106): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\News\\\\\\\\Contro...')\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/app.php(96): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\News\\\\\\\\Contro...')\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/routing\\\/routeactionhandler.php(45): OC\\\\AppFramework\\\\App::main('PageController', 'index', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#3 [internal function]: OC\\\\AppFramework\\\\routing\\\\RouteActionHandler->__invoke(Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(291): call_user_func(Object(OC\\\\AppFramework\\\\routing\\\\RouteActionHandler), Array)\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(851): OC\\\\Route\\\\Router->match('\\\/apps\\\/news\\\/')\\n#6 \\\/var\\\/www\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#7 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php\",\"Line\":91}","level":3,"time":"2016-01-06T15:18:34+01:00"}

@ghost
Copy link

ghost commented Mar 5, 2016

Just had another look at this because i have seen #22875

https://github.com/owncloud/core/blob/v8.2.2/resources/config/mimetypemapping.dist.json#L147

has application/x-compressed for tar.gz used by the news app but thats currently not in OC_Archive: https://github.com/owncloud/core/blob/v8.2.2/lib/private/archive.php#L42-L49

I have absolutely no idea about all that stuff but might worth a look?

@ghost
Copy link

ghost commented Apr 10, 2016

Re-Tested within an updated environment:

ownCloud 9.0.1
PHP 7.0.5
News 8.2.1

After hitting the update button to 8.3.0 the archive is still not extracted fully (missing files) and causing an internal server error because of this.

Strange enough the News 7.1.2 was pulled/installed successfully to 8.2.1 during the upgrade from ownCloud 8.2.3 to 9.0.1 when running ./occ upgrade. Are there any differences between those two methods?

@PVince81
Copy link
Contributor

Is this still an issue with recent versions ?

@ghost
Copy link

ghost commented Aug 15, 2016

@PVince81 Will re-test once 9.1.1 is out and my productive env is updated to that version

@PVince81
Copy link
Contributor

User has left github and no feedback from OP, closing

@anonimal
Copy link
Author

no feedback from OP

What more was needed of me?

@ghost
Copy link

ghost commented Jan 14, 2017

What more was needed of me?

Most likely #18391 (comment) or any other feedback since your last comment 1 1/2 years ago.

They just wanted to close this issue to think they solved it.

What are you trying to achieve with such comments?

@anonimal
Copy link
Author

I haven't used owncloud since. I simply got the ball rolling, I'm not an owncloud developer.

@lock
Copy link

lock bot commented Aug 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants