marius-wieschollek / passwords

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

[BUG]: API Request failed in dashboard #620

Closed AzhukOffi closed 6 months ago

AzhukOffi commented 6 months ago

⚠️ This issue respects the following points: ⚠️

Server Information

{
    "version": {
        "server": "28.0.0.11",
        "app": "2023.12.30",
        "lsr": false,
        "php": "8.2.13",
        "cronPhp": "8.2.13"
    },
    "environment": {
        "os": "Linux",
        "architecture": "x86_64",
        "bits": 64,
        "database": "mysql",
        "cron": "cron",
        "proxy": false,
        "sslProxy": false,
        "subdirectory": false
    },
    "services": {
        "images": "imagick",
        "favicons": "default",
        "previews": "default",
        "security": "hibp",
        "words": "auto",
        "previewApi": false,
        "faviconApi": false
    },
    "status": {
        "autoBackupRestored": false
    },
    "settings": {
        "channel": "stable",
        "nightlies": false,
        "handbook": false,
        "performance": 5
    },
    "encryption": {
        "sse": [],
        "cse": []
    }
}

Client Information

Browser and Version: Mozilla Firefox 120.0.1 Client OS and Version: Windows 11 Education 22H2

Bug description

When i try to change any configuration, i have error message "Api request failed"

Steps to reproduce

  1. Go to Passwords settings (https://nextcloudurl.fr/index.php/settings/admin/passwords)
  2. Try to change a config
  3. You get the error message

Expected behavior

  1. Go to Passwords settings (https://nextcloudurl.fr/index.php/settings/admin/passwords)
  2. Try to change a config
  3. The config change

Nextcloud Logs

Nothing

Browser Logs

XHRPUT
https://nextcloudurl.fr/index.php/apps/passwords/admin/settings/service.favicon
[HTTP/1.1 412 Precondition failed 289ms]

Passwords Error 
Response { type: "basic", url: "https://nextcloudurl.fr/index.php/apps/passwords/admin/settings/service.favicon", redirected: false, status: 412, ok: false, statusText: "Precondition failed", headers: Headers(19), body: ReadableStream, bodyUsed: false }
admin.js:2:29653

Passwords Error Api request failed Request failed Error: Api request failed
    _processResponse https://nextcloudurl.fr/apps/passwords/js/Static/admin.js?v=236cb57a-26:2
    _createRequest https://nextcloudurl.fr/apps/passwords/js/Static/admin.js?v=236cb57a-26:2
    set https://nextcloudurl.fr/apps/passwords/js/Static/admin.js?v=236cb57a-26:2
    initialize https://nextcloudurl.fr/apps/passwords/js/Static/admin.js?v=236cb57a-26:2
admin.js:2:29653

In Network tab, response : message  "CSRF check failed"
mawarnes commented 6 months ago

same here, on a completely fresh install

{
    "version": {
        "server": "28.0.0.11",
        "app": "2023.12.31",
        "lsr": false,
        "php": "8.2.13",
        "cronPhp": "8.2.13"
    },
    "environment": {
        "os": "Linux",
        "architecture": "aarch64",
        "bits": 64,
        "database": "mysql",
        "cron": "cron",
        "proxy": false,
        "sslProxy": false,
        "subdirectory": false
    },
    "services": {
        "images": "imagick",
        "favicons": "default",
        "previews": "default",
        "security": "hibp",
        "words": "auto",
        "previewApi": false,
        "faviconApi": false
    },
    "settings": {
        "channel": "stable",
        "nightlies": false,
        "handbook": false,
        "performance": 1
    },
    "status": {
        "autoBackupRestored": false
    },
    "apps": {
        "guests": {
            "installed": false,
            "enabled": false
        },
        "occweb": {
            "installed": false,
            "enabled": false
        },
        "theming": {
            "installed": false,
            "enabled": false
        },
        "passman": {
            "installed": false,
            "enabled": false
        },
        "unsplash": {
            "installed": false,
            "enabled": false
        },
        "impersonate": {
            "installed": false,
            "enabled": false
        },
        "passwords_handbook": {
            "installed": false,
            "enabled": false
        }
    },
    "sharing": {
        "shares": 0
    },
    "encryption": {
        "sse": [],
        "cse": []
    }
}
mawarnes commented 6 months ago

Request URL: https://xxxxxxx/apps/passwords/admin/settings/backup.interval Request Method: PUT Status Code: 412 Precondition Failed Remote Address: xxxxxxx:443 Referrer Policy: no-referrer

AzhukOffi commented 6 months ago

Also, I did the last update, the bug persists

mushuthecat commented 6 months ago

Hello,

Same issue on my side.

@marius-wieschollek I am currently using the Docker image for Nextcloud. Could you please guide me through your workaround? I couldn't locate the file "AppSettingsService.js" even when attempting to manually install passwords by pushing the tar file...

Thank you.

smolinde commented 6 months ago

Same issue here! Nextcloud 28.0.1, Ubuntu 23.10 Server, Raspberry Pi 5, Passwords v2023.12.31

marius-wieschollek commented 6 months ago

This should now work again with the latest update