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

Error in reference to object.. #2668

Open
3 tasks done
noci2012 opened this issue May 19, 2024 · 4 comments
Open
3 tasks done

Error in reference to object.. #2668

noci2012 opened this issue May 19, 2024 · 4 comments
Labels

Comments

@noci2012
Copy link

noci2012 commented May 19, 2024

IMPORTANT

Read and tick the following checkbox after you have created the issue or place an x inside the brackets ;)

  • I have read the CONTRIBUTING.md and followed the provided tips
  • I accept that the issue will be closed without comment if I do not check here
  • I accept that the issue will be closed without comment if I do not fill out all items in the issue template.

Explain the Problem

Call to a member function replaceChild() on null
Error while running background job OCA\News\Cron\UpdaterJob (id: 611, arguments: null)

Steps to Reproduce

Explain what you did to encounter the issue

  1. Install
  2. Check Log after cron has been running
  3. Profit!

System Information

  • News app version: 25.0.0.alpha6
  • Nextcloud version: 29.0.1RC1
  • Cron type: (system cron/python updater/...) Cron
  • PHP version: 8.3
  • Database and version: MariaDB
  • Browser and version: Firefox/Chromium, latest
  • OS and version: Linux Gentoo latest
Contents of nextcloud/data/nextcloud.log Error
{"reqId":"dw0u5P4ppJcVWuB276vs","level":3,"time":"2024-05-19T15:55:22+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job OCA\\News\\Cron\\UpdaterJob (id: 611, arguments: null)","userAgent":"--","version":"29.0.1.0","exception":{"Exception":"Error","Message":"Call to a member function replaceChild() on null","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/news/lib/Scraper/Scraper.php","line":78,"function":"parse","class":"fivefilters\\Readability\\Readability","type":"->"},{"file":"/var/www/nextcloud/apps/news/lib/Fetcher/FeedFetcher.php","line":167,"function":"scrape","class":"OCA\\News\\Scraper\\Scraper","type":"->"},{"file":"/var/www/nextcloud/apps/news/lib/Service/FeedServiceV2.php","line":279,"function":"fetch","class":"OCA\\News\\Fetcher\\FeedFetcher","type":"->"},{"file":"/var/www/nextcloud/apps/news/lib/Service/FeedServiceV2.php","line":364,"function":"fetch","class":"OCA\\News\\Service\\FeedServiceV2","type":"->"},{"file":"/var/www/nextcloud/apps/news/lib/Service/UpdaterService.php","line":63,"function":"fetchAll","class":"OCA\\News\\Service\\FeedServiceV2","type":"->"},{"file":"/var/www/nextcloud/apps/news/lib/Cron/UpdaterJob.php","line":74,"function":"update","class":"OCA\\News\\Service\\UpdaterService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":80,"function":"run","class":"OCA\\News\\Cron\\UpdaterJob","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":176,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/apps/news/vendor/fivefilters/readability.php/src/Readability.php","Line":227,"message":"Error while running background job OCA\\News\\Cron\\UpdaterJob (id: 611, arguments: null)","exception":[],"CustomMessage":"Error while running background job OCA\\News\\Cron\\UpdaterJob (id: 611, arguments: null)"},"id":"664a20f3df2cc"}
Contents of Browser Error Console Read http://ggnome.com/wiki/Using_The_Browser_Error_Console if you are unsure what to put here
Not relevant in cron job.
@noci2012 noci2012 added the bug label May 19, 2024
@Grotax
Copy link
Member

Grotax commented May 20, 2024

Hi my first assumption would be that your php version is to modern for the scraping library that is behind the full text feature.

There is an upgrade available but to use it we had to drop support for PHP 8.0 I think.

@noci2012
Copy link
Author

noci2012 commented May 20, 2024

Nextcloud 28/29 = PHP 8.3 too modern? ....
php 8.2 will be EOL startinf December 2024..., ie. 7 months of support left.

@Grotax
Copy link
Member

Grotax commented May 20, 2024

Seems like you didn't understand me, which is fine. You can open a PR if you have a suggestion.

My tip would be to use a different distro for something like nextcloud + community apps.
Rolling distros will be to fast with upgrades and not everything in PHP is backwards compatible.

@noci2012
Copy link
Author

noci2012 commented May 20, 2024

First of all i am a sysadmin... (OpenVMS + Linux on the side), not a PHP programmer, i can read code and do simple patches so I guess a PR is a big ask.

grepping....repalceChild shows this file show hits.
news/vendor/fivefilters/readability.php/src/Readability.php Here the objects are ....

The lib/Scanner/Scanner.php in the error is

    public function getRTL(bool $default = false): bool
    {
        if ($this->readability === null) {                        #<-- Line 78
            return $default;
        }

Version 8.4 is mentioned in recent changes (last month).
(The supplied Readability library is from 2021 AFAICT).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants