nextcloud / news

:newspaper: RSS/Atom feed reader
https://apps.nextcloud.com/apps/news
GNU Affero General Public License v3.0
866 stars 186 forks source link

Some feeds stopped being updated by cron #2351

Closed ilpianista closed 1 year ago

ilpianista commented 1 year ago

IMPORTANT

Explain the Problem

I've noticed that some feed wasn't updating anymore since few days. Then I've run:

$ php occ news:updater:update-user myuser
An unhandled exception has been thrown:
ValueError: Path cannot be empty in /var/www/html/custom_apps/news/vendor/arthurhoaro/favicon/src/Favicon/DataAccess.php:21
Stack trace:
#0 /var/www/html/custom_apps/news/vendor/arthurhoaro/favicon/src/Favicon/DataAccess.php(21): get_headers('', 1)
#1 /var/www/html/custom_apps/news/vendor/arthurhoaro/favicon/src/Favicon/Favicon.php(99): Favicon\DataAccess->retrieveHeader('')
#2 /var/www/html/custom_apps/news/vendor/arthurhoaro/favicon/src/Favicon/Favicon.php(190): Favicon\Favicon->info('')
#3 /var/www/html/custom_apps/news/vendor/arthurhoaro/favicon/src/Favicon/Favicon.php(161): Favicon\Favicon->getFavicon('https://www.ilt...')
#4 /var/www/html/custom_apps/news/lib/Fetcher/FeedFetcher.php(395): Favicon\Favicon->get('https://www.ilt...')
#5 /var/www/html/custom_apps/news/lib/Fetcher/FeedFetcher.php(493): OCA\News\Fetcher\FeedFetcher->getFavicon(Object(FeedIo\Feed), 'https://www.ilt...')
#6 /var/www/html/custom_apps/news/lib/Fetcher/FeedFetcher.php(143): OCA\News\Fetcher\FeedFetcher->buildFeed(Object(FeedIo\Feed), 'https://www.ilt...', 'https://www.ilt...')
#7 /var/www/html/custom_apps/news/lib/Service/FeedServiceV2.php(279): OCA\News\Fetcher\FeedFetcher->fetch('https://www.ilt...', false, NULL, NULL, 'Sun, 10 Sep 202...')
#8 /var/www/html/custom_apps/news/lib/Command/Updater/UpdateUser.php(52): OCA\News\Service\FeedServiceV2->fetch(Object(OCA\News\Db\Feed))
#9 /var/www/html/3rdparty/symfony/console/Command/Command.php(298): OCA\News\Command\Updater\UpdateUser->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/3rdparty/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OCA\News\Command\Updater\UpdateUser), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/html/console.php(100): OC\Console\Application->run()
#15 /var/www/html/occ(11): require_once('/var/www/html/c...')
#16 {main}

Running php occ news:updater:update-feed myuser x does effectively update the feed x.

Steps to Reproduce

Probably one of my feeds is causing the problem. However, I've 130 feeds and I cannot tell which one is crashing News at the moment (but I could if this is needed).

System Information

SMillerDev commented 1 year ago

Probably one of my feeds is causing the problem. However, I've 130 feeds and I cannot tell which one is crashing News at the moment (but I could if this is needed).

Does this part from the error log ring a bell? ('https://www.ilt...')

ilpianista commented 1 year ago

Ok. I opened the feed home page and the website sets a favicon, but the server returns a 404 for that path.

MoriGM commented 1 year ago

What is the URL? Looks like it's an error in the favicon library.

ilpianista commented 1 year ago

In the end the bug is similar to #1815, but a bit different because this time is the library that tries to fetch an empty url (see my PR for the details).

ilpianista commented 1 year ago

favicon 1.3.4 fixes this :tada:

Grotax commented 1 year ago

Cool, dependabot will automatically create a PR for that and then it will be in the next release, might take some time due to the UI rewrite

ilpianista commented 1 year ago

Fixed by #2386