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

PollId = 0 in watchUpdates /apps/polls/poll/{id}/watch request #3649

Closed
3 of 12 tasks
hamza221 opened this issue Aug 15, 2024 · 1 comment · Fixed by #3650
Closed
3 of 12 tasks

PollId = 0 in watchUpdates /apps/polls/poll/{id}/watch request #3649

hamza221 opened this issue Aug 15, 2024 · 1 comment · Fixed by #3650
Labels

Comments

@hamza221
Copy link
Contributor

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • I agree to follow Nextcloud's Code of Conduct.

What went wrong, what did you observe?

[index] Error: OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query "SELECT 'polls_polls'.*, (SELECT COUNT('user_vote_sub'.'vote_answer') FROM '*PREFIX*polls_votes' 'user_vote_sub' WHERE ('user_vote_sub'.'poll_id' = 'polls_polls'.'id') AND ('user_vote_sub'.'user_id' = :dcValue1)) AS 'current_user_count_votes', (SELECT COUNT('user_vote_sub'.'vote_answer') FROM '*PREFIX*polls_votes' 'user_vote_sub' WHERE ('user_vote_sub'.'poll_id' = 'polls_polls'.'id') AND ('user_vote_sub'.'user_id' = :dcValue1) AND ('user_vote_sub'.'vote_answer' = :dcValue2)) AS 'current_user_count_votes_yes', (SELECT COUNT('user_vote_sub'.'vote_answer') FROM '*PREFIX*polls_votes' 'user_vote_sub' LEFT JOIN '*PREFIX*polls_options' 'vote_options_join' ON ('vote_options_join'.'poll_id' = 'user_vote_sub'.'poll_id') AND ('vote_options_join'.'poll_option_text' = 'user_vote_sub'.'vote_option_text') AND ('vote_options_join'.'deleted' = '0') WHERE ('user_vote_sub'.'poll_id' = 'polls_polls'.'id') AND ('user_vote_sub'.'user_id' = :dcValue1) AND ('vote_options_join'.'id' IS NULL)) AS 'current_user_count_orphaned_votes', coalesce(MAX(options.timestamp), :dcValue3) AS max_date, coalesce(MIN(options.timestamp), :dcValue4) AS min_date, COUNT('options'.'id') AS 'count_options', coalesce(user_shares.type, '') AS user_role, 'user_shares'.'locked' AS 'is_current_user_locked', coalesce(user_shares.token, '') AS share_token, string_agg(distinct group_shares.user_id, ',') AS group_shares FROM '*PREFIX*polls_polls' 'polls_polls' LEFT JOIN '*PREFIX*polls_options' 'options' ON ('polls_polls'.'id' = 'options'.'poll_id') AND ('options'.'deleted' = '0') LEFT JOIN '*PREFIX*polls_share' 'user_shares' ON ('polls_polls'.'id' = 'user_shares'.'poll_id') AND ('user_shares'.'user_id' = :dcValue5) AND ('user_shares'.'deleted' = '0') LEFT JOIN '*PREFIX*polls_share' 'group_shares' ON ('polls_polls'.'id' = 'group_shares'.'poll_id') AND ('group_shares'.'type' = 'group') AND ('group_shares'.'deleted' = '0') WHERE 'polls_polls'.'id' = :dcValue6 GROUP BY 'polls_polls'.'id', 'user_shares'.'type', 'user_shares'.'locked', 'user_shares'.'token'"; at <<closure>>

`
0. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 361
OCP\AppFramework\Db\QBMapper->findOneQuery(["OC\DB\QueryBuilder\QueryBuilder"])

  1. /var/www/html/custom_apps/polls/lib/Db/PollMapper.php line 65
    OCP\AppFramework\Db\QBMapper->findEntity(["OC\DB\QueryBuilder\QueryBuilder"])
  2. /var/www/html/custom_apps/polls/lib/Service/WatchService.php line 39
    OCA\Polls\Db\PollMapper->find(0)
  3. /var/www/html/custom_apps/polls/lib/Controller/WatchController.php line 37
    OCA\Polls\Service\WatchService->watchUpdates(0, 1719339362)
  4. /var/www/html/custom_apps/polls/lib/Controller/BaseController.php line 52
    OCA\Polls\Controller\WatchController->OCA\Polls\Controller{closure}("*** sensitive parameters replaced ***")
  5. /var/www/html/custom_apps/polls/lib/Controller/WatchController.php line 37
    OCA\Polls\Controller\BaseController->responseLong(["Closure"])
  6. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Polls\Controller\WatchController->watchPoll(0, 1719339362)
  7. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController(["OCA\Polls\Co ... "], "watchPoll")
  8. /var/www/html/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch(["OCA\Polls\Co ... "], "watchPoll")
  9. /var/www/html/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main("OCA\Polls\Controller\WatchController", "watchPoll", ["OC\AppFramewo ... "], ["0","polls.watch.watch_poll"])
  10. /var/www/html/lib/base.php line 1068
    OC\Route\Router->match("/apps/polls/poll/0/watch")
  11. /var/www/html/index.php line 38
    OC::handleRequest()

GET /apps/polls/poll/0/watch?offset=1719339362`

What did you expect, how polls should behave instead?

The poll id = 0 still exists in 7.1.2 probably related to #3330

What steps does it need to replay this bug?

It happens on creating and deleting new polls.

Installation method

Installed/updated via extracting downloaded package to the apps folder

Installation type

First time installation

Affected polls version

7.12

Which browser did you use, when experiencing the bug?

  • Firefox
  • Chrome
  • Chromium/Chromium based (i.e. Edge)
  • Safari
  • Other/Don't know

Other browser

No response

Add your browser log here

No response

Additional client environment information

No response

NC version

Nextcloud 27

Other Nextcloud version

No response

PHP engine version

PHP 8.0

Other PHP version

No response

Database engine

MySQL

Database Engine version or other Database

No response

Which user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other/Don't know

Add your nextcloud server log here

No response

Additional environment informations

No response

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Additional Information

No response

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant