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

Bug: Lots of errors in log due to missing indices #30

Closed
lkempf opened this issue Jan 18, 2021 · 2 comments
Closed

Bug: Lots of errors in log due to missing indices #30

lkempf opened this issue Jan 18, 2021 · 2 comments
Labels
bug Something isn't working testing

Comments

@lkempf
Copy link

lkempf commented Jan 18, 2021

I'm using Cospend 1.2.7 on NC 20.0.5. The database used is Postgres. Recently (either when updating to 1.2.6 or 1.2.7) a lot of errors from Cospend have started to appear in the log when syncing with the app. There seem to be two different types of error:

[PHP] Error: Error: Undefined index: SUM(amount) at /var/www/nextcloud/apps/cospend/lib/Service/ProjectService.php#702 at <<closure>>

 0. /var/www/nextcloud/apps/cospend/lib/Service/ProjectService.php line 702
    OC\Log\ErrorHandler::onError(8, "Undefined index: SUM(amount)", "/var/www/nextcl ... p", 702, {0: "And 1 more  ... }})
 1. /var/www/nextcloud/apps/cospend/lib/Service/ProjectService.php line 637
    OCA\Cospend\Service\ProjectService->getSmallStats("wg")
 2. /var/www/nextcloud/apps/cospend/lib/Service/ProjectService.php line 352
    OCA\Cospend\Service\ProjectService->getProjectInfo("wg")
 3. /var/www/nextcloud/apps/cospend/lib/Service/ProjectService.php line 2227
    OCA\Cospend\Service\ProjectService->getUserMaxAccessLevel("lukas", "wg")
 4. /var/www/nextcloud/apps/cospend/lib/Controller/PageController.php line 843
    OCA\Cospend\Service\ProjectService->getProjects("lukas")
 5. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 169
    OCA\Cospend\Controller\PageController->webGetProjects2()
 6. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 100
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Cospend\Cont ... }}, "webGetProjects2")
 7. /var/www/nextcloud/lib/private/AppFramework/App.php line 152
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Cospend\Cont ... }}, "webGetProjects2")
 8. /var/www/nextcloud/lib/private/Route/Router.php line 309
    OC\AppFramework\App::main("OCA\\Cospend\\C ... r", "webGetProjects2", OC\AppFramework\ ... {}, {_route: "cospend.page.webGetProjects2"})
 9. /var/www/nextcloud/lib/base.php line 1008
    OC\Route\Router->match("/apps/cospend/getProjects")
10. /var/www/nextcloud/index.php line 37
    OC::handleRequest()

POST /index.php/apps/cospend/getProjects?
from ... by lukas at 2021-01-18T10:39:02+00:00
[PHP] Error: Error: Undefined index: COUNT(*) at /var/www/nextcloud/apps/cospend/lib/Service/ProjectService.php#690 at <<closure>>

 0. /var/www/nextcloud/apps/cospend/lib/Service/ProjectService.php line 690
    OC\Log\ErrorHandler::onError(8, "Undefined index: COUNT(*)", "/var/www/nextcl ... p", 690, {projectId: "wg" ... }})
 1. /var/www/nextcloud/apps/cospend/lib/Service/ProjectService.php line 637
    OCA\Cospend\Service\ProjectService->getSmallStats("wg")
 2. /var/www/nextcloud/apps/cospend/lib/Service/ProjectService.php line 352
    OCA\Cospend\Service\ProjectService->getProjectInfo("wg")
 3. /var/www/nextcloud/apps/cospend/lib/Service/ProjectService.php line 2227
    OCA\Cospend\Service\ProjectService->getUserMaxAccessLevel("lukas", "wg")
 4. /var/www/nextcloud/apps/cospend/lib/Controller/PageController.php line 843
    OCA\Cospend\Service\ProjectService->getProjects("lukas")
 5. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 169
    OCA\Cospend\Controller\PageController->webGetProjects2()
 6. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 100
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Cospend\Cont ... }}, "webGetProjects2")
 7. /var/www/nextcloud/lib/private/AppFramework/App.php line 152
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Cospend\Cont ... }}, "webGetProjects2")
 8. /var/www/nextcloud/lib/private/Route/Router.php line 309
    OC\AppFramework\App::main("OCA\\Cospend\\C ... r", "webGetProjects2", OC\AppFramework\ ... {}, {_route: "cospend.page.webGetProjects2"})
 9. /var/www/nextcloud/lib/base.php line 1008
    OC\Route\Router->match("/apps/cospend/getProjects")
10. /var/www/nextcloud/index.php line 37
    OC::handleRequest()

POST /index.php/apps/cospend/getProjects?
from ... by lukas at 2021-01-18T10:39:02+00:00

A sync seems to generate 16 of these errors.

julien-nc pushed a commit that referenced this issue Jan 18, 2021
Signed-off-by: Julien Veyssier <[email protected]>
@julien-nc julien-nc added bug Something isn't working testing labels Jan 18, 2021
@julien-nc
Copy link
Owner

Thanks a lot for the bug report. I didn't realize query functions weren't working with Postgres. It is supposed to be fixed now in v1.2.8-nightly which I just released. Could you give it a try?

@lkempf
Copy link
Author

lkempf commented Jan 18, 2021

Wow, thanks for the quick fix. I can't see any errors in the log so far and everything else seems to be working.

@lkempf lkempf closed this as completed Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing
Projects
None yet
Development

No branches or pull requests

2 participants