j0k3r / graby

Graby helps you extract article content from web pages
MIT License
363 stars 73 forks source link

Getting 502 Bad gateway due to PHP Errors/Warnings #278

Open girishpanchal30 opened 2 years ago

girishpanchal30 commented 2 years ago

Hello,

I'm getting 502 bad gateway errors due to graby library. I have listed PHP warnings/errors below. It is generating multiple-time PHP errors and due to this, we have a memory leaked issue in our server.

[Wed Jan 05 13:33:08.565297 2022] [php7:warn] [pid 12003] [client 70.39.235.45:43632] PHP Warning: DOMDocument::saveXML(): unknown encoding in /vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 380

Feed URL: http://feeds.feedburner.com/motherjones/feed

PHP Fatal error: Uncaught TypeError: Typed property Graby\\Extractor\\ContentExtractor::$title must be string or null, array used in vendor/j0k3r/graby/src/Extractor/ContentExtractor.php:1414\nStack trace:\n#0 vendor/j0k3r/graby/src/Extractor/ContentExtractor.php(1225): Graby\\Extractor\\ContentExtractor->extractJsonLdInformation()\n#1 vendor/j0k3r/graby/src/Extractor/ContentExtractor.php(244): Graby\\Extractor\\ContentExtractor->extractDefinedInformation()\n#2 vendor/j0k3r/graby/src/Graby.php(344): Graby\\Extractor\\ContentExtractor->process()\n#3 vendor/j0k3r/graby/src/Graby.php(174): Graby\\Graby->doFetchContent()\n#4 classes/FeedzyFullPost/Parser/Library/Graby.php(32): Graby\\Graby->fetchContent()\n#5 /var/www/html/wp-content/plugins/feedzy-ful in vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 1414

Feed URL: https://news.google.com/news/rss/search/section/q/pakistan covid/pakistan covid?

[Wed Jan 05 13:37:12.431448 2022] [php7:warn] [pid 12524] [client 92.204.43.65:49440] PHP Warning: array_combine(): Both parameters should have an equal number of elements in vendor/j0k3r/graby/src/SiteConfig/ConfigBuilder.php on line 330

Feed URL: https://www.presseportal.de/rss/polizei/laender/1.rss2, https://www.presseportal.de/rss/polizei/laender/2.rss2, https://www.presseportal.de/rss/dienststelle_110971.rss2

Thanks

j0k3r commented 2 years ago

Any chance to share which URL generate the error Typed property Graby\\Extractor\\ContentExtractor::$title must be string or null, array used? Not the RSS, the url of the content instead. Thanks!

girishpanchal30 commented 2 years ago

Sorry to say you but there is no chance to give a specific URL, could you find something from the feed URL? Thanks

j0k3r commented 2 years ago

could you find something from the feed URL? Thanks

I tried few URLs but I won't check all them.