passwords icon indicating copy to clipboard operation
passwords copied to clipboard

[BUG]: Cannot log in with master password on browser plugin.

Open spyro1248 opened this issue 7 months ago • 10 comments

⚠️ This issue respects the following points: ⚠️

  • [x] This is a single bug, not a question or a configuration/webserver/proxy issue.
  • [x] This is not a bug in the browser extension or another client.
  • [x] This issue is not already reported on Github (I've searched it).
  • [x] Nextcloud Server and the Passwords App is up to date. See Nextcloud Apps.
  • [x] There are no warnings and errors reported in the Passwords App settings in the admin area
  • [x] The following apps are not installed: Rainloop

Server Information

Nextcloud 31.0.2

Client Information

Browser and Version: FirefoxESR and Librewolf 137.0-3 Client OS and Version: Debian trixie

Bug description

I don't know if this is a bug in the plugin. It might be, but I have no way to know at present. If it is a bug in the plugin, I see no way to report it as such, hence reporting it here.

The browser extension will install on both the above browsers (stock Trixie and Librewolf from their debian repos), and it can be configured, however I cannot use it. It asks for the master password, appears to briefly show the controls, but then asks for the password again, in an infinite loop.

My Debian Bookworm system (Firefox from mozilla repo) seems to have a similar issue too. It requires me to log in twice, but it still works after the 2nd attempt.

I've searched but can't find anyting useful. Debug advice requested.

Steps to reproduce

1 click on icon 2 enter master password 3 goto 1

Expected behavior

1 Click on icon 2 enter master password 3 profit

Nextcloud Logs

{
  "reqId": "QbYhy09Avs7j5rva0WhX",
  "level": 4,
  "time": "2025-04-06T17:53:03+00:00",
  "remoteAddr": "193.237.138.224",
  "user": "ian",
  "app": "passwords",
  "method": "POST",
  "url": "/index.php/apps/passwords/api/1.0/password/list",
  "message": "Authorized session required",
  "userAgent": "Official Passwords Client for Firefox on Linux",
  "version": "31.0.2.1",
  "exception": {
    "Exception": "OCA\\Passwords\\Exception\\ApiException",
    "Message": "Authorized session required",
    "Code": 256,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php",
        "line": 73,
        "function": "beforeController",
        "class": "OCA\\Passwords\\Middleware\\ApiSessionMiddleware",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 106,
        "function": "beforeController",
        "class": "OC\\AppFramework\\Middleware\\MiddlewareDispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 307,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1025,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 24,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/apps/passwords/lib/Middleware/ApiSessionMiddleware.php",
    "Line": 57,
    "message": "Authorized session required",
    "exception": [],
    "CustomMessage": "Authorized session required"
  },
  "id": "67f2c50eebfff"
}

Browser Logs


spyro1248 avatar Apr 06 '25 18:04 spyro1248

Same here : oddly I can use the plugin, but another user on the same Nextcloud instance cannot. As soon as the master password is entered, it looks like it's logged in, but immediately we're sent back to the login prompt. In the log, we get an "HTTP 412 Precondition failed" error. When using the web interface, it's possible to login normally. Same nextcloud version (31.0.2), passwords version (2025.4.20 - previous version had the same behaviour), firefox and plugin up to date.

adrienjacob avatar Apr 09 '25 06:04 adrienjacob

Update: I was going to come here to close this, as I clicked on the update today, following which, the plugin is now able to log into log in (On LibreWolf, on my Trixie machine). My older bookworm machine (Firefox) continues to "work", but I still have to log in twice on that one.

HOWEVER - I am unsure if the update has actually applied, or whether it simply reset "something" when I clicked update, as it is still offering me an update (which when I click it, says it can't be applied)

The offered version is 2025/04/20, and the error message is "An error occurred during the request. Unable to proceed. Could not update app."

If anyone knows how to find out what the previous version before this update might have been, please post - I can't see anything useful in the log or activity log.

spyro1248 avatar Apr 09 '25 11:04 spyro1248

There are no code changes in the update regarding this issue. I can't reproduce this at all.

The update contains some cleanup for deprecation warnings on PHP 8.4 and a fix for an issue where the E2EE encryption passphrase wouldn't work at all on the dashboard widget.

marius-wieschollek avatar Apr 09 '25 21:04 marius-wieschollek

As stated above, I already had the problem with the previous version... Here's the raw debug output : {"details":{"data":{"_response":{},"_status":412},"message":"HTTP 412 - Precondition failed","file":"moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js","line":2,"stack":"r@moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js:2:601018\ns@moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js:2:601694\ngetClass@moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js:2:558597\ngetClass@moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js:2:622136\n_getHttpError@moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js:2:575753\nsend@moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js:2:573462\n","time":1744282941002},"error":{"name":"PreconditionFailedError","stack":["r@moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js:2:601018","s@moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js:2:601694","getClass@moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js:2:558597","getClass@moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js:2:622136","_getHttpError@moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js:2:575753","send@moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js:2:573462",""],"string":"PreconditionFailedError: HTTP 412 - Precondition failed","fileName":"moz-extension://12063f79-0441-4b21-ae29-c2b5ae31a6ae/js/background.js","lineNumber":2,"columnNumber":601018,"message":"HTTP 412 - Precondition failed","_response":{},"_status":412}}

adrienjacob avatar Apr 10 '25 10:04 adrienjacob

With the latest nextcloud update, it's working again for me... So it's probably (again) related to some regressions from core nextcloud code, which apparently got fixed.

adrienjacob avatar Apr 13 '25 11:04 adrienjacob

This is happening to me now.

  • NC 31.0.04

it's exactly as everyone described. Might be an issue with the latest plugin / NC combo?

aisknab avatar May 12 '25 06:05 aisknab

Hi all,

Whilst the complete inability to login (to passwords) has stopped being a problem, which I think may have been related to the clock not being set correctly on one of the machines, I still have to log in to the browser plugin twice, which is a bit irritating.

I see two log entries relating to passwords, although one seems to be related to the "music" app for some reason? The logs are in the following messages.

spyro1248 avatar Jul 16 '25 10:07 spyro1248

I don't understand what this has to do with the "music" app, given the UA string...

{"reqId":"fXH6wwBW2xvzV56i4SGG","level":2,"time":"2025-07-15T15:45:57+00:00","remoteAddr":"foo.bar.baz.bin","user":"myuser","app":"music","method":"POST","url":"/index.php/apps/passwords/api/1.0/session/open","message":"FileHooks::updated triggered for a non-existing file","userAgent":"Official Passwords Client for LibreWolf on Linux","version":"31.0.7.1","data":{"app":"music"},"id":"687777d4b3be2"}

spyro1248 avatar Jul 16 '25 10:07 spyro1248

I see a lot of these come up in the log.

{"reqId":"","level":4,"time":"2025-07-15T22:27:26+04:12","remoteAddr":"foo.bar.baz.bin","user":"myuser","app":"passwords","method":"POST","url":"/index.php/apps/passwords/api/1.0/tag/list","message":"Authorized session required","userAgent":"Official Passwords Client for LibreWolf on Linux","version":"31.0.7.1","exception":{"Exception":"OCA\Passwords\Exception\ApiException","Message":"Authorized session required","Code":256,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":73,"function":"beforeController","class":"OCA\Passwords\Middleware\ApiSessionMiddleware","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":106,"function":"beforeController","class":"OC\AppFramework\Middleware\MiddlewareDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1040,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/passwords/lib/Middleware/ApiSessionMiddleware.php","Line":57,"message":"Authorized session required","exception":[],"CustomMessage":"Authorized session required"},"id":""}

spyro1248 avatar Jul 16 '25 10:07 spyro1248

There are no errors in the plugin log in Librewolf.

I'm now on NC 31.0.7.1.

spyro1248 avatar Jul 16 '25 10:07 spyro1248

Seeing quite a few of these, too - probably not related, but thought I'd share:

Used memory grew by more than 50 MB when executing job OCA\Passwords\Cron\CheckPasswordsJob (id: 27927, arguments: null): 102.2 MB (before: 37.8 MB)

spyro1248 avatar Jul 16 '25 13:07 spyro1248