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

No feeds returned for folder #1172

Closed
3 tasks done
anoymouserver opened this issue Feb 14, 2021 · 4 comments · Fixed by #1180
Closed
3 tasks done

No feeds returned for folder #1172

anoymouserver opened this issue Feb 14, 2021 · 4 comments · Fixed by #1180
Labels
API Impact API/Backend code bug regression

Comments

@anoymouserver
Copy link
Contributor

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

What problem did you encounter?

Internal server error!
InvalidArgumentException: Only strings, Literals and Parameters are allowed

Steps to Reproduce

Explain what you did to encounter the issue

  1. open web app
  2. select folder (with feeds)
  3. see Internal server error!

System Information

  • News app version: master (8ca7ef7)
  • Nextcloud version: 20.0.7
  • Cron type: (system cron/python updater/...)
  • PHP version: 7.3.25
  • Database and version:
  • Browser and version:
  • OS and version:
Contents of nextcloud/data/nextcloud.log
{
    "reqId": "mIdGWiwzntSZ9oalN4VR",
    "level": 3,
    "time": "2021-02-14T20:34:45+00:00",
    "remoteAddr": "127.0.0.1",
    "user": "anoymouserver",
    "app": "index",
    "method": "GET",
    "url": "/apps/news/items?id=3&limit=40&oldestFirst=false&search=&showAll=true&type=1",
    "message": {
        "Exception": "InvalidArgumentException",
        "Message": "Only strings, Literals and Parameters are allowed",
        "Code": 0,
        "Trace": [{
                "file": "/var/www/cloud/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php",
                "line": 140,
                "function": "quoteColumnName",
                "class": "OC\\DB\\QueryBuilder\\QuoteHelper",
                "type": "->",
                "args": [3]
            }, {
                "file": "/var/www/cloud/apps/news/lib/Db/ItemMapperV2.php",
                "line": 476,
                "function": "eq",
                "class": "OC\\DB\\QueryBuilder\\ExpressionBuilder\\ExpressionBuilder",
                "type": "->",
                "args": ["`feeds`.`folder_id`", 3]
            }, {
                "file": "/var/www/cloud/apps/news/lib/Service/ItemServiceV2.php",
                "line": 368,
                "function": "findAllFolder",
                "class": "OCA\\News\\Db\\ItemMapperV2",
                "type": "->",
                "args": ["anoymouserver", 3, 40, 0, false, false, []]
            }, {
                "file": "/var/www/cloud/apps/news/lib/Controller/ItemController.php",
                "line": 152,
                "function": "findAllInFolderWithFilters",
                "class": "OCA\\News\\Service\\ItemServiceV2",
                "type": "->",
                "args": ["anoymouserver", 3, 40, 0, false, false, []]
            }, {
                "file": "/var/www/cloud/lib/private/AppFramework/Http/Dispatcher.php",
                "line": 169,
                "function": "index",
                "class": "OCA\\News\\Controller\\ItemController",
                "type": "->",
                "args": [1, 3, 40, 0, true, false, ""]
            }, {
                "file": "/var/www/cloud/lib/private/AppFramework/Http/Dispatcher.php",
                "line": 100,
                "function": "executeController",
                "class": "OC\\AppFramework\\Http\\Dispatcher",
                "type": "->",
                "args": [{
                        "__class__": "OCA\\News\\Controller\\ItemController"
                    }, "index"]
            }, {
                "file": "/var/www/cloud/lib/private/AppFramework/App.php",
                "line": 152,
                "function": "dispatch",
                "class": "OC\\AppFramework\\Http\\Dispatcher",
                "type": "->",
                "args": [{
                        "__class__": "OCA\\News\\Controller\\ItemController"
                    }, "index"]
            }, {
                "file": "/var/www/cloud/lib/private/Route/Router.php",
                "line": 309,
                "function": "main",
                "class": "OC\\AppFramework\\App",
                "type": "::",
                "args": ["OCA\\News\\Controller\\ItemController", "index", {
                        "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
                    }, {
                        "_route": "news.item.index"
                    }
                ]
            }, {
                "file": "/var/www/cloud/lib/base.php",
                "line": 1008,
                "function": "match",
                "class": "OC\\Route\\Router",
                "type": "->",
                "args": ["/apps/news/items"]
            }, {
                "file": "/var/www/cloud/index.php",
                "line": 37,
                "function": "handleRequest",
                "class": "OC",
                "type": "::",
                "args": []
            }
        ],
        "File": "/var/www/cloud/lib/private/DB/QueryBuilder/QuoteHelper.php",
        "Line": 62,
        "CustomMessage": "--"
    },
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0",
    "version": "20.0.7.1",
    "id": "6029898465050"
}

</details>
@anoymouserver
Copy link
Contributor Author

Just noticed that the loading of further items when scrolling down doesn't work either.
The following requests are copied for the 'Unread articles' section, but the issue also occures for a single feed.

  1. https://cloud.example.com/apps/news/items?limit=40&oldestFirst=false&search=&showAll=true&type=6
    first request always returns correct data:
    {"newestItemId":129155,"feeds":[/* list of feeds */],"starred":543,"items":[/* list of items */]}
  2. https://cloud.example.com/apps/news/items?limit=40&offset=129116&oldestFirst=false&showAll=true&type=6
    following requests (after scrolling down) return empty data:
    {"items":[]}

Furthermore the 'All articles' section doesn't return any items at all.

  1. https://cloud.example.com/apps/news/items?limit=40&oldestFirst=false&search=&showAll=true&type=3
    {"newestItemId":129155,"feeds":[/* list of feeds */],"starred":543}

@anoymouserver anoymouserver added API Impact API/Backend code regression labels Feb 14, 2021
@SMillerDev
Copy link
Contributor

https://cloud.example.com/apps/news/items?limit=40&offset=129116&oldestFirst=false&showAll=true&type=6
following requests (after scrolling down) return empty data:

Do you even have that many items in your DB?

Furthermore the 'All articles' section doesn't return any items at all.
https://cloud.example.com/apps/news/items?limit=40&oldestFirst=false&search=&showAll=true&type=3

I didn't realize this was a possible type. Fixed soon.

@anoymouserver
Copy link
Contributor Author

anoymouserver commented Feb 16, 2021

My test database currently contains 10352 items for 105 feeds (not all unread).
More than 40 unread per folder aren't unusual. The 'offset' however seems to be the lowest id of the currently displayed items (if most recent on top) and not a real offset (number of items which should be skipped)

Highest id is 129155, since there are 40 displayed, the last of them is 129116 (offset from my request url).

@SMillerDev
Copy link
Contributor

The 'offset' however seems to be the lowest id of the currently displayed items (if most recent on top) and not a real offset (number of items which should be skipped)

This app really seems to be written around a desire for the most complex implementations. I'll see if that is fixable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Impact API/Backend code bug regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants