marius-wieschollek / passwords

A simple, yet feature rich password manager for Nextcloud
GNU Affero General Public License v3.0
215 stars 45 forks source link

Error when trying to add new password #444

Closed ClaraCrazy closed 2 years ago

ClaraCrazy commented 3 years ago

System Information

Server:

 Nextcloud Version: 22.2.0.2
 PHP Version: 7.4.3
 Database and Version: mysql
 Server OS and Version: Ubuntu 20.04
 Passwords Version: 2021.10.20

Client:

 Browser and Version: Ungoogled Chromium using Chromium 89.0.4389.114
 Client OS and Version: Arch Linux 2021.08.01

Steps to reproduce

A quick note that I'm not 100% sure what's causing this as adding passwords through the chrome addon works fine

  1. Enable e2e
  2. Add a password through the NC app

Expected result

A password gets added

Actual result

Error pop-up saying missing resource and password creation failed

Nextcloud log

{"reqId":"t8r0efC7pKisYeFIoEED","level":3,"time":"2021-10-06T03:28:16+00:00","remoteAddr":"no","user":"Clara","app":"passwords","method":"POST","url":"/index.php/apps/passwords/api/1.0/password/create","message":"Error \"Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*passwords_password` WHERE (`deleted` = :dcValue1) AND (`user_id` = :dcValue2) AND (`uuid` = :dcValue3)\"; \" in OCA\\Passwords\\Controller\\Api\\PasswordApiController::create","userAgent":"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Mobile Safari/537.36","version":"22.2.0.2"} {"reqId":"t8r0efC7pKisYeFIoEED","level":4,"time":"2021-10-06T03:28:16+00:00","remoteAddr":"still no","user":"Clara","app":"passwords","method":"POST","url":"/index.php/apps/passwords/api/1.0/password/create","message":"Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*passwords_password` WHERE (`deleted` = :dcValue1) AND (`user_id` = :dcValue2) AND (`uuid` = :dcValue3)\"; ","userAgent":"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Mobile Safari/537.36","version":"22.2.0.2","exception":{"Exception":"OCP\\AppFramework\\Db\\DoesNotExistException","Message":"Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*passwords_password` WHERE (`deleted` = :dcValue1) AND (`user_id` = :dcValue2) AND (`uuid` = :dcValue3)\"; ","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":361,"function":"findOneQuery","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/passwords/lib/Db/AbstractMapper.php","line":201,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/passwords/lib/Db/AbstractMapper.php","line":174,"function":"findOneByFields","class":"OCA\\Passwords\\Db\\AbstractMapper","type":"->"},{"file":"/var/www/nextcloud/apps/passwords/lib/Db/AbstractMapper.php","line":99,"function":"findOneByField","class":"OCA\\Passwords\\Db\\AbstractMapper","type":"->"},{"file":"/var/www/nextcloud/apps/passwords/lib/Services/Object/AbstractModelService.php","line":58,"function":"findByUuid","class":"OCA\\Passwords\\Db\\AbstractMapper","type":"->"},{"file":"/var/www/nextcloud/apps/passwords/lib/Services/ValidationService.php","line":250,"function":"findByUuid","class":"OCA\\Passwords\\Services\\Object\\AbstractModelService","type":"->"},{"file":"/var/www/nextcloud/apps/passwords/lib/Services/ValidationService.php","line":59,"function":"checkHash","class":"OCA\\Passwords\\Services\\ValidationService","type":"->"},{"file":"/var/www/nextcloud/apps/passwords/lib/Services/Object/PasswordRevisionService.php","line":124,"function":"validatePassword","class":"OCA\\Passwords\\Services\\ValidationService","type":"->"},{"file":"/var/www/nextcloud/apps/passwords/lib/Controller/Api/PasswordApiController.php","line":148,"function":"create","class":"OCA\\Passwords\\Services\\Object\\PasswordRevisionService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"create","class":"OCA\\Passwords\\Controller\\Api\\PasswordApiController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":301,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1000,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","Line":283,"CustomMessage":"Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*passwords_password` WHERE (`deleted` = :dcValue1) AND (`user_id` = :dcValue2) AND (`uuid` = :dcValue3)\"; "}}

Log of Admin -> Logging:


[passwords] Error: Error "Did expect one result but found none when executing: query "SELECT * FROM `*PREFIX*passwords_password` WHERE (`deleted` = :dcValue1) AND (`user_id` = :dcValue2) AND (`uuid` = :dcValue3)"; " in OCA\Passwords\Controller\Api\PasswordApiController::create

POST /index.php/apps/passwords/api/1.0/password/create
from no_ip_for_you by Clara at 2021-10-06T03:11:39+00:00
9hawk8 commented 3 years ago

Can you get around the problem by deactivating libsodium or storing the whole 100% of the security hash instead of just 75% or 50%?

This actually sounds quite like the problem I am discussing with people in #417, despite coming from another far end

ClaraCrazy commented 3 years ago

Yes and yes. Both solutions work

If you need any more info to fix this issue let me know. happy to assist

9hawk8 commented 3 years ago

Well I am actually not developing on this or anything, just happen to have the same problem😉

But I am sure Marius will know how to fix this or that he will come back to us with more questions!

ClaraCrazy commented 3 years ago

oh lol... didn't even notice you aren't the dev haha.

clearly shows that I don't sleep enough lately 😄

marius-wieschollek commented 3 years ago

Go to bed.

I am confident that i was able to reproduce this now and i'm working on a fix.

ClaraCrazy commented 3 years ago

I will... after amazon finally delivered my package😩

Anyways, looking forward to that fix. Have a great day!

marius-wieschollek commented 3 years ago

A fix for the issue is now in the nightly builds and will will then be shipped with 2021.11.0