desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Client requires authentication at every launch

Open mophilly opened this issue 2 years ago • 41 comments

Expected behaviour

After authenticating once with the browser based scheme it should remember the credentials and use that when starting the client the next time.

Actual behaviour

It always asks for credentials at every launch of the OS.

Steps to reproduce

  1. Start nextcloud client first time
  2. Browser opens that requests login
  3. Authenticate
  4. Close client
  5. Open client

Client configuration

Client version: 3.4.2

Operating system: MacOS Monterey (12.2.1)

OS language: English

Server configuration

Nextcloud version: 20.0.9 OS: Linux 2.6.32

Related Issues

Client always asks for authentication #1716 https://github.com/nextcloud/server/issues/17165

mophilly avatar Feb 14 '22 17:02 mophilly

Can confirm this issue exists on client version 3.4.2, server version 20.0.9. Client OS: Arch Linux (arch-5.16.10-zen) Server OS: DietPi Linux v8.1.2

TomBayne avatar Feb 23 '22 16:02 TomBayne

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

github-actions[bot] avatar Mar 23 '22 16:03 github-actions[bot]

This bug report is getting automatically closed due to no answer since the issue has been staled. Thank you!

github-actions[bot] avatar Apr 06 '22 16:04 github-actions[bot]

Why is this closed without comment or resolution? It seems a simple problem that likely requires only a simple correction.

mophilly avatar Apr 06 '22 16:04 mophilly

Really annoying.

At still MacOS 12.3.1 with latest nextcloud server/client

redhell avatar Apr 14 '22 09:04 redhell

This is happening to me too

Version 3.4.4, on openSUSE tumbleweed (KDE).

serjor avatar Apr 16 '22 19:04 serjor

Happening with 5.13.19-2-MANJARO.

What is this from the log file?

[ info nextcloud.sync.credentials.keychainchunk /build/nextcloud-client/src/nextcloud-client/src/libsync/creds/keychainchunk.cpp:346 ]: Backend unavailable (yet?) Retrying in a few seconds. "The name org.freedesktop.secrets was not provided by any .service files"

sandrock avatar Apr 21 '22 18:04 sandrock

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

github-actions[bot] avatar May 20 '22 00:05 github-actions[bot]

I'm experiencing this same issue on the following:

Client version 3.5.1 Two Servers running versions 23.0.4 & 22.2.7

Client OS: Artix Linux (5.17.8-artix1-1) Server OS: DietPi Linux v8.4.2 (on both servers)

jahway603 avatar May 26 '22 23:05 jahway603

Same for me - reauthentification is needed nearly daily.

Client version 3.5.1 / Win 10 Pro Server version 24.0.1 / Ubuntu 20.0.4 Server

Hudratronium avatar Jun 20 '22 09:06 Hudratronium

Same here, reauthentification via browser is needed DAILY at Windows 10 laptop with the latest Nextcloud desktop version 3.5.1. So this is not working for us if Nextcloud does not have a solution for this.

Reauthentification is NOT needed at my iMac (macOS 10.15) with Nextcloud 3.5.1.

roosweb avatar Jun 27 '22 08:06 roosweb

It seems this problem / bug still has not that impact - or the bug report ist to old that someone is taking a look into it. some of the older threads i found where trying to workaround with generated application passwords for the clients. Sadly this didn't worked out for me either. Makes it hard to "sell" this solution in a professional environment.

Hudratronium avatar Jul 02 '22 10:07 Hudratronium

Makes it hard to "sell" this solution in a professional environment.

I agree. My team adopted NextCloud because it was not intrusive for the end user. Now it is intrusive. This inability to logon without human interaction after first authentication causes us unnecessary support requests.

mophilly avatar Jul 02 '22 16:07 mophilly

This started happening to me with the desktop sync client version 3.5.2 on Linux. I've downgraded to 3.5.1 and the problem went away. Server version is 24.0.1. I've disabled the automatic update check on the client for now.

BrunoBernardino avatar Jul 05 '22 06:07 BrunoBernardino

Can confirm that downgrading to 3.5.1 does fix the issue. I'm on CentOS Stream 9.

alexpdp7 avatar Jul 09 '22 10:07 alexpdp7

Sadly i can't confirm this on my windows clients. Came from 3.5.1 but nothing changed. So this seems to be a bogus one...

Hudratronium avatar Jul 09 '22 15:07 Hudratronium

This started happening to me with the desktop sync client version 3.5.2 on Linux. I've downgraded to 3.5.1 and the problem went away. Server version is 24.0.1. I've disabled the automatic update check on the client for now.

This is a regression bug. This report here is for an older version. I would consider this to be a different bug from this one here, where this problem consist through many versions. And it seems to be on Linux platforms only. I'd consider opening a separate report for this (if there isn't one already).

tflidd avatar Jul 10 '22 08:07 tflidd

Still the same problem with Nextcloud desktop version 3.5.1 + 3.5.2 at WINDOWS 10 laptop : requires authentication at every (daily) launch !

roosweb avatar Jul 13 '22 12:07 roosweb

same on linux using AppImage with version 3.5.2

p0kR avatar Jul 15 '22 16:07 p0kR

Hi,

Happening with 5.13.19-2-MANJARO.

and also for me on openSUSE Leap 15.4 even with version 3.3.6. So I think it is not specific to a version.

What is this from the log file?

[ info nextcloud.sync.credentials.keychainchunk /build/nextcloud-client/src/nextcloud-client/src/libsync/creds/keychainchunk.cpp:346 ]: Backend unavailable (yet?) Retrying in a few seconds. "The name org.freedesktop.secrets was not provided by any .service files"

Have the same messages. It seems that the org.freedesktop.secrets service is not running at the time nextcloud client is started. It seems to be a race condition between this service and nextcloud. My solution is to delay the autostart of nextcloud by 10 seconds. Seems to work. I changed the desktop entry (mainly the Exec line) in ~/.config/autostart/Nextcloud.desktop to

[Desktop Entry]
Name=Nextcloud delayed
GenericName=File Synchronizer
Exec=/usr/bin/bash -c "sleep 10;/usr/bin/nextcloud"
Terminal=false
Icon=nextcloud
Categories=Network
Type=Application
StartupNotify=false
X-GNOME-Autostart-enabled=true

Since then all boots (well, not so many since I changed that, so still to be confirmed) go without any problem.

letsfindaway avatar Jul 16 '22 14:07 letsfindaway

Can confirm this problem for Linux AppImage version 3.5.3 (using an app token).

jokay avatar Jul 29 '22 19:07 jokay

Also for Linux AppImage version 3.5.3 on Xubuntu 20 using a tls client certifificate.

[ warning nextcloud.sync.credentials.keychainchunk /home/user/src/libsync/creds/keychainchunk.cpp:360 ]: Unable to read "***_clientCertificatePEM:https://***/:0" chunk "0" "Unknown error"

mkofahl avatar Jul 31 '22 10:07 mkofahl

Can confirm this problem for Linux AppImage version 3.5.4 (using an app token).

image

image

image


The password is correct otherwise you would get

image


And the according log

{
  "reqId": "dd1eMaxKIBL36bZxMVkZ",
  "level": 3,
  "time": "2022-08-03T13:49:20+00:00",
  "remoteAddr": "x.x.x.x",
  "user": "--",
  "app": "index",
  "method": "POST",
  "url": "/index.phpapptoken",
  "message": "OC\\Core\\Service\\LoginFlowV2Service::flowDoneWithAppPassword(): Argument #3 ($loginName) must be of type string, null given, called in /var/www/html/core/Controller/ClientFlowLoginV2Controller.php on line 227 in file '/var/www/html/core/Service/LoginFlowV2Service.php' line 189",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0",
  "version": "24.0.3.2",
  "exception": {
    "Exception": "Exception",
    "Message": "OC\\Core\\Service\\LoginFlowV2Service::flowDoneWithAppPassword(): Argument #3 ($loginName) must be of type string, null given, called in /var/www/html/core/Controller/ClientFlowLoginV2Controller.php on line 227 in file '/var/www/html/core/Service/LoginFlowV2Service.php' line 189",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 172,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          { "__class__": "OC\\Core\\Controller\\ClientFlowLoginV2Controller" },
          "apptokenRedirect"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 298,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OC\\Core\\Controller\\ClientFlowLoginV2Controller",
          "apptokenRedirect",
          { "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer" },
          ["core.ClientFlowLoginV2.apptokenRedirect"]
        ]
      },
      {
        "file": "/var/www/html/lib/base.php",
        "line": 1023,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": ["/login/v2/apptoken"]
      },
      {
        "file": "/var/www/html/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
    "Line": 165,
    "Previous": {
      "Exception": "TypeError",
      "Message": "OC\\Core\\Service\\LoginFlowV2Service::flowDoneWithAppPassword(): Argument #3 ($loginName) must be of type string, null given, called in /var/www/html/core/Controller/ClientFlowLoginV2Controller.php on line 227",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/html/core/Controller/ClientFlowLoginV2Controller.php",
          "line": 227,
          "function": "flowDoneWithAppPassword",
          "class": "OC\\Core\\Service\\LoginFlowV2Service",
          "type": "->",
          "args": [
            "6I7hODOXxlnaiX8JZruWCita0SR8fEOM4muz0cCyIjzrenCim20sv5j8Zhrl64LYDRVuvAxx1xuDDeH1qatK898mbBNo6pfjcDzMnj2GUgwaspp00rTtdF1xzArKnCC3",
            "https://nextcloud.myinstance.com",
            null,
            "my-app-token"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 225,
          "function": "apptokenRedirect",
          "class": "OC\\Core\\Controller\\ClientFlowLoginV2Controller",
          "type": "->",
          "args": [
            "A2gwuoRzCR9Oujbb21Od1J7QkLUOC5qP93ffJSt4GrI8pPRIWUx1vQITzS7HZlmR",
            "my-user",
            "my-app-token"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 133,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\Core\\Controller\\ClientFlowLoginV2Controller"
            },
            "apptokenRedirect"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/App.php",
          "line": 172,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\Core\\Controller\\ClientFlowLoginV2Controller"
            },
            "apptokenRedirect"
          ]
        },
        {
          "file": "/var/www/html/lib/private/Route/Router.php",
          "line": 298,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "OC\\Core\\Controller\\ClientFlowLoginV2Controller",
            "apptokenRedirect",
            {
              "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
            },
            ["core.ClientFlowLoginV2.apptokenRedirect"]
          ]
        },
        {
          "file": "/var/www/html/lib/base.php",
          "line": 1023,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": ["/login/v2/apptoken"]
        },
        {
          "file": "/var/www/html/index.php",
          "line": 36,
          "function": "handleRequest",
          "class": "OC",
          "type": "::",
          "args": []
        }
      ],
      "File": "/var/www/html/core/Service/LoginFlowV2Service.php",
      "Line": 189
    },
    "CustomMessage": "--"
  }
}

jokay avatar Aug 03 '22 13:08 jokay

Can confirm this remains a problem on Windows, using the App Token functionality.

simaoafonso-pwt avatar Aug 12 '22 15:08 simaoafonso-pwt

At least no one cares ... 🤷🏼‍♂️

Relates https://github.com/nextcloud/desktop/issues/1292.

jokay avatar Aug 18 '22 21:08 jokay

Seems we are the only ones effected by this - i can't imagine professional users / big organizations as well as all homeusers would just accept this ....

Hudratronium avatar Aug 18 '22 23:08 Hudratronium

I believe most people are just keeping this locked in 3.5.1, probably? It seems like it affects enough variety of OS to not be too difficult to reproduce, but I might just be wrong.

BrunoBernardino avatar Aug 19 '22 06:08 BrunoBernardino

Version 3.5.4 (Ubuntu 20.04) (Nextcloud-3.5.4-x86_64.AppImage) using an app token has the same issue, keeps asking for authentication on every launch. I can confirm it too using Nextcloud Server 24.0.4.

rekuenkdr avatar Aug 19 '22 10:08 rekuenkdr

On Ubuntu 20.04 I have the same issues. The last version that works as expected is 3.5.1 (Nextcloud-3.5.1-x86_64.AppImage). Versions 3.5.2 to 3.5.4 always ask to login at launch. I tested all the mentioned client versions with server version 24.0.4.

hramberger avatar Aug 25 '22 11:08 hramberger

Thanks for confirming, I stopped testing after 2 updates (3.5.2 and 3.5.3) ignored this problem, and there's no confirmation on this from anyone at Nextcloud, here, that I'm aware of.

BrunoBernardino avatar Aug 25 '22 11:08 BrunoBernardino