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

FF extension: Could not establish connection. Receiving end does not exist. / Authorized session required #499

Closed M1CK431 closed 2 years ago

M1CK431 commented 2 years ago

System Information

Server:

{
    "version": {
        "server": "23.0.3.2",
        "app": "2022.4.20",
        "lsr": false,
        "php": "8.0.14",
        "cronPhp": "8.0.14"
    },
    "environment": {
        "os": "Linux",
        "architecture": "x86_64",
        "bits": 64,
        "database": "mysql",
        "cron": "ajax",
        "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": {
            "SSEv1r1": false,
            "SSEv1r2": true,
            "SSEv2r1": true,
            "none": true,
            "default": "SSEv2r1"
        },
        "cse": {
            "CSEv1r1": true,
            "none": true,
            "default": "none"
        }
    }
}

Client:

 Browser and Version: Firefox 98.0.2 (64 bits)
 Client OS and Version: Archlinux, updated on a daily basis

Steps to reproduce

Using latest version of everything, connect Firefox extension using passlink then type your password and... observe that login fail :boom:

Expected result

What should happen? Login should works

Actual result

What does happen? Login doesn't works

Nextcloud log

Nextcloud log ``` {"reqId":"Yktc97a9WUKLJttcey0oBAAAAA4","level":4,"time":"2022-04-04T21:02:47+00:00","remoteAddr":"78.120.171.53","user":"****","app":"passwords","method":"POST","url":"/index.php/apps/passwords/api/1.0/password/list","message":"Authorized session required","userAgent":"Client officiel des mots de passe pour Firefox sur Linux","version":"23.0.3.2","exception":{"Exception":"OCA\\Passwords\\Exception\\ApiException","Message":"Authorized session required","Code":256,"Trace":[{"file":"/srv/http/cloud.****.com/www/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":97,"function":"beforeController","class":"OCA\\Passwords\\Middleware\\ApiSessionMiddleware","type":"->"},{"file":"/srv/http/cloud.****.com/www/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->"},{"file":"/srv/http/cloud.****.com/www/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/http/cloud.****.com/www/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/http/cloud.****.com/www/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/http/cloud.****.com/www/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/lib/nextcloud/apps/passwords/lib/Middleware/ApiSessionMiddleware.php","Line":78,"CustomMessage":"Authorized session required"},"id":"624b5edc145bc"} {"reqId":"Yktc9zG9k9a2bxafKKTJjgAAANA","level":4,"time":"2022-04-04T21:02:47+00:00","remoteAddr":"78.120.171.53","user":"****","app":"passwords","method":"POST","url":"/index.php/apps/passwords/api/1.0/tag/list","message":"Authorized session required","userAgent":"Client officiel des mots de passe pour Firefox sur Linux","version":"23.0.3.2","exception":{"Exception":"OCA\\Passwords\\Exception\\ApiException","Message":"Authorized session required","Code":256,"Trace":[{"file":"/srv/http/cloud.****.com/www/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":97,"function":"beforeController","class":"OCA\\Passwords\\Middleware\\ApiSessionMiddleware","type":"->"},{"file":"/srv/http/cloud.****.com/www/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->"},{"file":"/srv/http/cloud.****.com/www/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/http/cloud.****.com/www/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/http/cloud.****.com/www/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/http/cloud.****.com/www/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/lib/nextcloud/apps/passwords/lib/Middleware/ApiSessionMiddleware.php","Line":78,"CustomMessage":"Authorized session required"},"id":"624b5edc1460e"} ```

Browser log

Browser log ``` {"details":{"data":{"id":"9d08f518-b0fe-463a-be53-d8ac8f67158f","tab":null,"type":"queue.items","reply":null,"silent":false,"sender":"background","channel":"runtime","payload":{"name":"mining","items":[{"id":"7b98ccb8-8d4c-4fcc-95fb-161aca375e70","task":{"fields":{"label":"Nextcloud","username":"****","password":"****","url":"https://cloud.****.com/","hidden":false,"notes":"","customFields":[],"created":"","edited":""},"manual":false,"new":true},"result":{"fields":{"label":"Nextcloud","username":"****","password":"****","url":"https://cloud.****.com/","hidden":false,"notes":"","customFields":[],"created":"","edited":""}},"success":null,"accepted":false,"feedback":{}}]},"receiver":null},"message":"Could not establish connection. Receiving end does not exist.","file":"moz-extension://4c9d1928-560f-4bb3-a966-b7b26ac2e57f/js/background.js","line":2,"stack":"_sendMessage@moz-extension://4c9d1928-560f-4bb3-a966-b7b26ac2e57f/js/background.js:2:789892\n","time":1649109622779},"error":{"name":"Error","stack":["_sendMessage@moz-extension://4c9d1928-560f-4bb3-a966-b7b26ac2e57f/js/background.js:2:789892",""],"string":"Error: Could not establish connection. Receiving end does not exist.","fileName":"moz-extension://4c9d1928-560f-4bb3-a966-b7b26ac2e57f/js/background.js","lineNumber":2,"columnNumber":789892,"message":"Could not establish connection. Receiving end does not exist."}} ```

In addition, here is my passwords app settings: image

M1CK431 commented 2 years ago

I just found the root cause: 1 hour ahead on my computer following the change to summer time... :roll_eyes: