news icon indicating copy to clipboard operation
news copied to clipboard

Fails to add a feed with Internal Server Error

Open mdev88 opened this issue 1 year ago • 6 comments
trafficstars

  • [x] I have read the CONTRIBUTING.md and followed the provided tips
  • [x] I accept that the issue will be closed without comment if I do not check here
  • [x] 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

When I add some feeds I get an Internal Server Error. This happens only with some feeds, not all.

Steps to Reproduce

Explain what you did to encounter the issue

  1. Click Subscribe
  2. Paste feed URL (example: https://alepiumetti.github.io/feed.xml) and click Subscribe (tried both with and without auto discover feeds)
  3. A popup appears with the message "Internal server error! Please check your data/nextcloud.log file for additional information!"

System Information

  • News app version: 24.0.0
  • Nextcloud version: 27.1.5 (AIO)
  • Cron type: cron
  • PHP version: 8.1.27
  • Database and version: PostgreSQL 15.5 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014, 64-bit
  • Browser and version: Firefox 122.0 (64-bit) Windows but the same happens on every browser I tried.
  • OS and version: Windows 10, Windows 11, Manjaro Linux up to date...
Contents of nextcloud/data/nextcloud.log
[index] Error: OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in column "title" of relation "oc_news_feeds" violates not-null constraint
DETAIL:  Failing row contains (15, 1, iddqd404, 1706889096222459, 69d08d2b040c530ec66dc44af6e184cc, https://worldoftheconfusion.blogspot.com/feeds/posts/default, https://worldoftheconfusion.blogspot.com/feeds/posts/default, null, null, https://worldoftheconfusion.blogspot.com/favicon.ico, null, 1706889096, 0, 0, null, null, null, 0, f, f, f, 0, 0). at <<closure>>

 0. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 328
    OC\DB\Exceptions\DbalException::wrap(["Doctrine\\DBAL ... "])
 1. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 137
    OC\DB\QueryBuilder\QueryBuilder->executeStatement()
 2. /var/www/html/custom_apps/news/lib/Db/NewsMapperV2.php line 76
    OCP\AppFramework\Db\QBMapper->insert(["OCA\\News\\Db\ ... ]])
 3. /var/www/html/custom_apps/news/lib/Service/FeedServiceV2.php line 253
    OCA\News\Db\NewsMapperV2->insert(["OCA\\News\\Db\ ... ]])
 4. /var/www/html/custom_apps/news/lib/Controller/FeedController.php line 176
    OCA\News\Service\FeedServiceV2->create("*** sensitive parameters replaced ***")
 5. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\News\Controller\FeedController->create("*** sensitive parameters replaced ***")
 6. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController(["OCA\\News\\Controller\\FeedController"], "create")
 7. /var/www/html/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\News\\Controller\\FeedController"], "create")
 8. /var/www/html/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main("OCA\\News\\Controller\\FeedController", "create", ["OC\\AppFramewo ... "], ["news.feed.create"])
 9. /var/www/html/lib/base.php line 1068
    OC\Route\Router->match("/apps/news/feeds")
10. /var/www/html/index.php line 38
    OC::handleRequest()

Caused by:

Doctrine\DBAL\Exception\NotNullConstraintViolationException: An exception occurred while executing a query: SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in column "title" of relation "oc_news_feeds" violates not-null constraint
DETAIL:  Failing row contains (15, 1, iddqd404, 1706889096222459, 69d08d2b040c530ec66dc44af6e184cc, https://worldoftheconfusion.blogspot.com/feeds/posts/default, https://worldoftheconfusion.blogspot.com/feeds/posts/default, null, null, https://worldoftheconfusion.blogspot.com/favicon.ico, null, 1706889096, 0, 0, null, null, null, 0, f, f, f, 0, 0). at <<closure>>

 0. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1814
    Doctrine\DBAL\Driver\API\PostgreSQL\ExceptionConverter->convert(["Doctrine\\DBAL ... "], ["Doctrine\\DBAL\\Query"])
 1. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1749
    Doctrine\DBAL\Connection->handleDriverException(["Doctrine\\DBAL ... "], ["Doctrine\\DBAL\\Query"])
 2. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1163
    Doctrine\DBAL\Connection->convertExceptionDuringQuery(["Doctrine\\DBAL ... "], "INSERT INTO \"o ... )", ["69d08d2b040c53 ... "], [2,2,2,"*** sens ... "])
 3. /var/www/html/lib/private/DB/Connection.php line 295
    Doctrine\DBAL\Connection->executeStatement("INSERT INTO \"o ... )", ["69d08d2b040c53 ... "], [2,2,2,"*** sens ... "])
 4. /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354
    OC\DB\Connection->executeStatement("INSERT INTO \"o ... )", ["69d08d2b040c53 ... "], [2,2,2,"*** sens ... "])
 5. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
 6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 326
    OC\DB\QueryBuilder\QueryBuilder->execute()
 7. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 137
    OC\DB\QueryBuilder\QueryBuilder->executeStatement()
 8. /var/www/html/custom_apps/news/lib/Db/NewsMapperV2.php line 76
    OCP\AppFramework\Db\QBMapper->insert(["OCA\\News\\Db\ ... ]])
 9. /var/www/html/custom_apps/news/lib/Service/FeedServiceV2.php line 253
    OCA\News\Db\NewsMapperV2->insert(["OCA\\News\\Db\ ... ]])
10. /var/www/html/custom_apps/news/lib/Controller/FeedController.php line 176
    OCA\News\Service\FeedServiceV2->create("*** sensitive parameters replaced ***")
11. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\News\Controller\FeedController->create("*** sensitive parameters replaced ***")
12. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController(["OCA\\News\\Controller\\FeedController"], "create")
13. /var/www/html/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\News\\Controller\\FeedController"], "create")
14. /var/www/html/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main("OCA\\News\\Controller\\FeedController", "create", ["OC\\AppFramewo ... "], ["news.feed.create"])
15. /var/www/html/lib/base.php line 1068
    OC\Route\Router->match("/apps/news/feeds")
16. /var/www/html/index.php line 38
    OC::handleRequest()

Caused by:

Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in column "title" of relation "oc_news_feeds" violates not-null constraint
DETAIL:  Failing row contains (15, 1, iddqd404, 1706889096222459, 69d08d2b040c530ec66dc44af6e184cc, https://worldoftheconfusion.blogspot.com/feeds/posts/default, https://worldoftheconfusion.blogspot.com/feeds/posts/default, null, null, https://worldoftheconfusion.blogspot.com/favicon.ico, null, 1706889096, 0, 0, null, null, null, 0, f, f, f, 0, 0). at <<closure>>

 0. /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php line 103
    Doctrine\DBAL\Driver\PDO\Exception::new(["PDOException", ... ]])
 1. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1153
    Doctrine\DBAL\Driver\PDO\Statement->execute()
 2. /var/www/html/lib/private/DB/Connection.php line 295
    Doctrine\DBAL\Connection->executeStatement("INSERT INTO \"o ... )", ["69d08d2b040c53 ... "], [2,2,2,"*** sens ... "])
 3. /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354
    OC\DB\Connection->executeStatement("INSERT INTO \"o ... )", ["69d08d2b040c53 ... "], [2,2,2,"*** sens ... "])
 4. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
 5. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 326
    OC\DB\QueryBuilder\QueryBuilder->execute()
 6. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 137
    OC\DB\QueryBuilder\QueryBuilder->executeStatement()
 7. /var/www/html/custom_apps/news/lib/Db/NewsMapperV2.php line 76
    OCP\AppFramework\Db\QBMapper->insert(["OCA\\News\\Db\ ... ]])
 8. /var/www/html/custom_apps/news/lib/Service/FeedServiceV2.php line 253
    OCA\News\Db\NewsMapperV2->insert(["OCA\\News\\Db\ ... ]])
 9. /var/www/html/custom_apps/news/lib/Controller/FeedController.php line 176
    OCA\News\Service\FeedServiceV2->create("*** sensitive parameters replaced ***")
10. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\News\Controller\FeedController->create("*** sensitive parameters replaced ***")
11. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController(["OCA\\News\\Controller\\FeedController"], "create")
12. /var/www/html/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\News\\Controller\\FeedController"], "create")
13. /var/www/html/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main("OCA\\News\\Controller\\FeedController", "create", ["OC\\AppFramewo ... "], ["news.feed.create"])
14. /var/www/html/lib/base.php line 1068
    OC\Route\Router->match("/apps/news/feeds")
15. /var/www/html/index.php line 38
    OC::handleRequest()

Caused by:

PDOException: SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in column "title" of relation "oc_news_feeds" violates not-null constraint
DETAIL:  Failing row contains (15, 1, iddqd404, 1706889096222459, 69d08d2b040c530ec66dc44af6e184cc, https://worldoftheconfusion.blogspot.com/feeds/posts/default, https://worldoftheconfusion.blogspot.com/feeds/posts/default, null, null, https://worldoftheconfusion.blogspot.com/favicon.ico, null, 1706889096, 0, 0, null, null, null, 0, f, f, f, 0, 0). at <<closure>>

 0. /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php line 101
    PDOStatement->execute("*** sensitive parameters replaced ***")
 1. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1153
    Doctrine\DBAL\Driver\PDO\Statement->execute()
 2. /var/www/html/lib/private/DB/Connection.php line 295
    Doctrine\DBAL\Connection->executeStatement("INSERT INTO \"o ... )", ["69d08d2b040c53 ... "], [2,2,2,"*** sens ... "])
 3. /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354
    OC\DB\Connection->executeStatement("INSERT INTO \"o ... )", ["69d08d2b040c53 ... "], [2,2,2,"*** sens ... "])
 4. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
 5. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 326
    OC\DB\QueryBuilder\QueryBuilder->execute()
 6. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 137
    OC\DB\QueryBuilder\QueryBuilder->executeStatement()
 7. /var/www/html/custom_apps/news/lib/Db/NewsMapperV2.php line 76
    OCP\AppFramework\Db\QBMapper->insert(["OCA\\News\\Db\ ... ]])
 8. /var/www/html/custom_apps/news/lib/Service/FeedServiceV2.php line 253
    OCA\News\Db\NewsMapperV2->insert(["OCA\\News\\Db\ ... ]])
 9. /var/www/html/custom_apps/news/lib/Controller/FeedController.php line 176
    OCA\News\Service\FeedServiceV2->create("*** sensitive parameters replaced ***")
10. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\News\Controller\FeedController->create("*** sensitive parameters replaced ***")
11. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController(["OCA\\News\\Controller\\FeedController"], "create")
12. /var/www/html/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\News\\Controller\\FeedController"], "create")
13. /var/www/html/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main("OCA\\News\\Controller\\FeedController", "create", ["OC\\AppFramewo ... "], ["news.feed.create"])
14. /var/www/html/lib/base.php line 1068
    OC\Route\Router->match("/apps/news/feeds")
15. /var/www/html/index.php line 38
    OC::handleRequest()

POST /apps/news/feeds
from 190.2.100.117 by iddqd404 at 2024-02-02T15:51:36+00:00
Contents of Browser Error Console Read http://ggnome.com/wiki/Using_The_Browser_Error_Console if you are unsure what to put here
Content-Security-Policy: The page's settings blocked the loading of a resource at inline ("script-src"). utils.js:42:10
JQMIGRATE: Migrate is installed, version 3.4.1 jquery-migrate.min.js:2:980
Proxying an event bus of version 3.1.0 with 1.3.0 index.es.js:2337:14
session heartbeat polling started session-heartbeat.js:103:9
Proxying an event bus of version 3.1.0 with 1.3.0 index.es.js:2337:14
Registering notifications container as a menu NotificationsApp.vue:219
Notifications permissions granted NotificationsApp.vue:453
Has notify_push enabled, slowing polling to 15 minutes NotificationsApp.vue:231
Polling interval updated to 900000 NotificationsApp.vue:416
Started background fetcher as session_keepalive is enabled NotificationsApp.vue:275
Got notification data, restoring default polling interval. NotificationsApp.vue:376
XHRPOST
https://nc.martinvukovic.com/apps/news/feeds
[HTTP/2 500  694ms]

TypeError: can't convert undefined to object
    publishAll Publisher.js:34
    createFeed NavigationController.js:216
    Angular 13
    jQuery 2
 Possibly unhandled rejection: {} angular.min.js:129
Missing argument $row in OC.Notification.hide() call, caller needs to be adjusted to only dismiss its own notification notification.js:70:11

mdev88 avatar Feb 02 '24 16:02 mdev88

I've also been getting errors lately, namely these two:

https://www.criticalmass.at/category/wien/feed/ read error : cURL error 60:
SSL certificate problem: unable to get local issuer certificate

and for https://blog.joaograssi.com/rss:

An exception occurred while executing a query: SQLSTATE[HY000]: General error:
1364 Field 'title' doesn't have a default value

The first site seems to somehow have configured their SSL wrong, I don't know what's wrong with the second one though. It seems to be a standard feed generated by Hugo, and there's a title for the whole feed AND for every single post as far as I can tell.

News App: 24.0.0 Nextcloud: 27.1.5

pspeter avatar Feb 14 '24 17:02 pspeter

Similar issue: I'm trying to subscribe to Nextcloud's activity app's RSS feed and end up with an Internal error. Logs yield:

RequestException cURL error 60: SSL certificate problem: unable to get local issuer certificate

I'm pretty sure my SSL conf is solid, I have a Let's Encrypt certificate and browsers have no problem connecting to my Nextcloud instance. The only problem I can foresee is my cert being pretty recent, so solving this issue might just boil down to updating cURL's root CAs ?

Holbormon avatar Apr 23 '24 03:04 Holbormon

That means your server doesn't know how to verify the certificate that your server is presenting. You'll probably get the same if you curl the url from your server.

SMillerDev avatar Apr 23 '24 05:04 SMillerDev

That means your server doesn't know how to verify the certificate that your server is presenting. You'll probably get the same if you curl the url from your server.

Thanks for the hint ! Turns out I was actually supplying my apache conf with the standalone cert instead of the full chain.

It's interesting how some softwares (such as firefox) are fine with this, while others (like cURL) are not.

Holbormon avatar Apr 23 '24 05:04 Holbormon

As a rule browsers will forgive almost anything since web developers all seem to follow a different standard. cURL will hold you to the standards though.

SMillerDev avatar Apr 23 '24 05:04 SMillerDev

Mozilla also provides it's own trust store for Firefox so it's not necessarily in sync with the OS.

Grotax avatar Apr 23 '24 12:04 Grotax