marius-wieschollek / passwords

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

[BUG]: Can't get password from nextcloud, android app and firefox add-on #606

Closed MGREMY closed 8 months ago

MGREMY commented 9 months ago

⚠️ This issue respects the following points: ⚠️

Server Information

{
    "version": {
        "server": "27.1.1.0",
        "app": "2023.9.30",
        "lsr": false,
        "php": "8.2.10",
        "cronPhp": "8.2.10"
    },
    "environment": {
        "os": "Linux",
        "architecture": "x86_64",
        "bits": 64,
        "database": "mysql",
        "cron": "cron",
        "proxy": false,
        "sslProxy": true,
        "subdirectory": false
    },
    "services": {
        "images": "imagick",
        "favicons": "bi",
        "previews": "pageres",
        "security": "hibp",
        "words": "random",
        "previewApi": false,
        "faviconApi": false
    },
    "status": {
        "autoBackupRestored": false
    },
    "settings": {
        "channel": "stable",
        "nightlies": false,
        "handbook": true,
        "performance": 5
    },
    "encryption": {
        "sse": {
            "SSEv1r1": false,
            "SSEv1r2": true,
            "SSEv2r1": false,
            "SSEv3r1": false,
            "none": false,
            "default": "SSEv1r2"
        },
        "cse": {
            "CSEv1r1": false,
            "none": true,
            "default": "none"
        }
    }
}

Client Information

Browser and Version: Firefox 118.0.1 (64 bits) Client OS and Version: Windows 10 22H2

Browser and Version: Samsung Galaxy Z-Fold 4 Client OS and Version: Android 13

Bug description

On Windows Firefox, we open the password application and this text appears : image As well as the logs in the logging page from the admin panel

It worked for a long time, but suddenly it stopped working. The installation is with docker, no update on the configuration, the hash length save settings is on 100%

On the Android app, the error is "No connection" if that can help :)

Steps to reproduce

  1. Open nextcloud password app
  2. Get the error

Expected behavior

  1. Open nextcloud password app
  2. Get all password stored

Nextcloud Logs

[passwords] Fatal: OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query "SELECT * FROM `*PREFIX*passwords_folder_rv` WHERE (`deleted` = :dcValue1) AND (`user_id` = :dcValue2) AND (`uuid` = :dcValue3)";  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/passwords/lib/Db/AbstractMapper.php line 194
    OCP\AppFramework\Db\QBMapper->findEntity(["OC\\DB\\QueryBuilder\\QueryBuilder"])
 2. /var/www/html/custom_apps/passwords/lib/Db/AbstractMapper.php line 167
    OCA\Passwords\Db\AbstractMapper->findOneByFields(["uuid","d561da9 ... "])
 3. /var/www/html/custom_apps/passwords/lib/Db/AbstractMapper.php line 107
    OCA\Passwords\Db\AbstractMapper->findOneByField("uuid", "d561da91-ea40-4d54-a6b6-c1f1fc7e856e")
 4. /var/www/html/custom_apps/passwords/lib/Services/Object/AbstractRevisionService.php line 137
    OCA\Passwords\Db\AbstractMapper->findByUuid("d561da91-ea40-4d54-a6b6-c1f1fc7e856e")
 5. /var/www/html/custom_apps/passwords/lib/Services/Object/FolderRevisionService.php line 81
    OCA\Passwords\Services\Object\AbstractRevisionService->findByUuid("d561da91-ea40-4d54-a6b6-c1f1fc7e856e", false)
 6. /var/www/html/custom_apps/passwords/lib/Helper/ApiObjects/AbstractObjectHelper.php line 137
    OCA\Passwords\Services\Object\FolderRevisionService->findByUuid("d561da91-ea40-4d54-a6b6-c1f1fc7e856e")
 7. /var/www/html/custom_apps/passwords/lib/Helper/ApiObjects/FolderObjectHelper.php line 93
    OCA\Passwords\Helper\ApiObjects\AbstractObjectHelper->getRevision(["OCA\\Passwords\\Db\\Folder",63], [false,false], true)
 8. /var/www/html/custom_apps/passwords/lib/Helper/ApiObjects/FolderObjectHelper.php line 229
    OCA\Passwords\Helper\ApiObjects\FolderObjectHelper->getApiObject(["OCA\\Passwords\\Db\\Folder",63], "model", [false,false])
 9. /var/www/html/custom_apps/passwords/lib/Helper/ApiObjects/FolderObjectHelper.php line 108
    OCA\Passwords\Helper\ApiObjects\FolderObjectHelper->getFolders(["OCA\\Passwords ... l], ["00000000-0000- ... ]])
10. /var/www/html/custom_apps/passwords/lib/Controller/Api/AbstractObjectApiController.php line 145
    OCA\Passwords\Helper\ApiObjects\FolderObjectHelper->getApiObject(["OCA\\Passwords\\Db\\Folder",null], "model+folders+passwords")
11. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Passwords\Controller\Api\AbstractObjectApiController->show("00000000-0000-0000-0000-000000000000", "model+folders+passwords")
12. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController(["OCA\\Passwords ... "], "show")
13. /var/www/html/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\Passwords ... "], "show")
14. /var/www/html/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main("FolderApiController", "show", ["OC\\AppFramewo ... "], ["passwords.folder_api.show"])
15. /var/www/html/lib/base.php line 1068
    OC\Route\Router->match("/apps/passwords/api/1.0/folder/show")
16. /var/www/html/index.php line 36
    OC::handleRequest()

POST /index.php/apps/passwords/api/1.0/folder/show
from 10.0.0.2 by mgremy at 2023-09-29T17:48:47+00:00

Browser Logs

No response

marius-wieschollek commented 9 months ago

Try running ./occ maintenance:repair

MGREMY commented 9 months ago

Try running ./occ maintenance:repair

It worked but i lost barely every passwords wtf... I have now like 6 password even if I had like 150 passwords saved

MGREMY commented 9 months ago

@marius-wieschollek After some research on the subject, i try to restore an old backup When I try so, I have an error like this : image I tried to run ./occ passwords:user:delete, re-run some ./occ maintenance:repair, I looked at the database too, but nothing. I can't import data because of this error...

marius-wieschollek commented 9 months ago

That is strange. The backup command deletes all data before trying to restore the backup.

Either it's not possible to delete entries or there have been duplicates in the database that were stored in the database.

marius-wieschollek commented 8 months ago

Does not seem to be a bug in the app itself to me currently, but more a server/maintenance issue.

I have nothing that could point me to an issue in the app or reproduce this in any way.