Polls: SELECT * FROM `*PREFIX*polls_polls` WHERE `id` = :dcValue1

Created on 17 Feb 2021  路  4Comments  路  Source: nextcloud/polls

Hi,

lately we've been seeing this error in our logfiles:

OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query "SELECT * FROM *PREFIX*polls_polls WHERE id = :dcValue1";

NC 20.0.7
Polls 1.7.5 (Upgrade from previous versions)

We have not noticed any problems in the front-end, therefore we don't know where these errors originate from, and we have not found a way to trigger the errors manual.

grafik

bug

All 4 comments

I assume, that someone tried to open a poll that does not exist. Reproducable via calling the vote URL with a deleted or invalid poll id.

It seems to be caused by the notification API if the particular poll has been deleted in the meantime, but the notification is still there.

Full log entry

{
    "reqId": "YCUpagA06jMwzdhB-eoOkAAAAAQ",
    "level": 3,
    "time": "2021-02-11T12:56:10+00:00",
    "remoteAddr": "127.0.0.1",
    "user": "user",
    "app": "no app in context",
    "method": "GET",
    "url": "/ffcloud/ocs/v2.php/apps/notifications/api/v2/notifications",
    "message": {
        "Exception": "OCP\\AppFramework\\Db\\DoesNotExistException",
        "Message": "Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*polls_polls` WHERE `id` = :dcValue1\"; ",
        "Code": 0,
        "Trace": [{
                "file": "/var/www/cloud/lib/public/AppFramework/Db/QBMapper.php",
                "line": 346,
                "function": "findOneQuery",
                "class": "OCP\\AppFramework\\Db\\QBMapper",
                "type": "->",
                "args": [{
                        "__class__": "OC\\DB\\QueryBuilder\\QueryBuilder"
                    }
                ]
            }, {
                "file": "/var/www/cloud/apps/polls/lib/Db/PollMapper.php",
                "line": 51,
                "function": "findEntity",
                "class": "OCP\\AppFramework\\Db\\QBMapper",
                "type": "->",
                "args": [{
                        "__class__": "OC\\DB\\QueryBuilder\\QueryBuilder"
                    }
                ]
            }, {
                "file": "/var/www/cloud/apps/polls/lib/Notification/Notifier.php",
                "line": 128,
                "function": "find",
                "class": "OCA\\Polls\\Db\\PollMapper",
                "type": "->",
                "args": [15]
            }, {
                "file": "/var/www/cloud/lib/private/Notification/Manager.php",
                "line": 299,
                "function": "prepare",
                "class": "OCA\\Polls\\Notification\\Notifier",
                "type": "->",
                "args": [{
                        "__class__": "OC\\Notification\\Notification"
                    }, "de"]
            }, {
                "file": "/var/www/cloud/apps/notifications/lib/Controller/EndpointController.php",
                "line": 106,
                "function": "prepare",
                "class": "OC\\Notification\\Manager",
                "type": "->",
                "args": [{
                        "__class__": "OC\\Notification\\Notification"
                    }, "de"]
            }, {
                "file": "/var/www/cloud/lib/private/AppFramework/Http/Dispatcher.php",
                "line": 169,
                "function": "listNotifications",
                "class": "OCA\\Notifications\\Controller\\EndpointController",
                "type": "->",
                "args": ["v2"]
            }, {
                "file": "/var/www/cloud/lib/private/AppFramework/Http/Dispatcher.php",
                "line": 100,
                "function": "executeController",
                "class": "OC\\AppFramework\\Http\\Dispatcher",
                "type": "->",
                "args": [{
                        "__class__": "OCA\\Notifications\\Controller\\EndpointController"
                    }, "listNotifications"]
            }, {
                "file": "/var/www/cloud/lib/private/AppFramework/App.php",
                "line": 152,
                "function": "dispatch",
                "class": "OC\\AppFramework\\Http\\Dispatcher",
                "type": "->",
                "args": [{
                        "__class__": "OCA\\Notifications\\Controller\\EndpointController"
                    }, "listNotifications"]
            }, {
                "file": "/var/www/cloud/lib/private/Route/Router.php",
                "line": 309,
                "function": "main",
                "class": "OC\\AppFramework\\App",
                "type": "::",
                "args": ["OCA\\Notifications\\Controller\\EndpointController", "listNotifications", {
                        "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
                    }, {
                        "apiVersion": "v2",
                        "_route": "ocs.notifications.Endpoint.listNotifications"
                    }
                ]
            }, {
                "file": "/var/www/cloud/ocs/v1.php",
                "line": 88,
                "function": "match",
                "class": "OC\\Route\\Router",
                "type": "->",
                "args": ["/ocsapp/apps/notifications/api/v2/notifications"]
            }, {
                "file": "/var/www/cloud/ocs/v2.php",
                "line": 24,
                "args": ["/var/www/cloud/ocs/v1.php"],
                "function": "require_once"
            }
        ],
        "File": "/var/www/cloud/lib/public/AppFramework/Db/QBMapper.php",
        "Line": 270,
        "CustomMessage": "--"
    },
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0",
    "version": "20.0.6.1",
    "id": "60351a6b0d4fe"
}

@anoymouserver Thanks. That was the reason... fixed

Yes, that seems to fix it for us as well. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jana702 picture Jana702  路  4Comments

nextgen-networks picture nextgen-networks  路  6Comments

dartcafe picture dartcafe  路  6Comments

Dubidubiduu picture Dubidubiduu  路  5Comments

clippde picture clippde  路  6Comments