keepass2android icon indicating copy to clipboard operation
keepass2android copied to clipboard

WebDav (IIS) and Windows Authentication not working

Open ummerland opened this issue 3 years ago • 1 comments
trafficstars

Hi community

I run a WebDav server on IIS (Win Server 2019) for storing and accessing my .kdbx Files. Everything works fine with KeePass 2.0 Windows client.

However, it does not seem to work with Keepass2Android: Ein Fehler ist aufgetreten: Received unexpected response: Response{protocol=h2, code=401, message=, url=https://.....kdbx}

The authentication method is Windows Authentication with either NTLM or Negotiate. I tried Username with and without domain name.

Full Log:

02.03.2022 18:38:35:733 -- AppSettingsActivity.OnPause 4
02.03.2022 18:38:36:208 -- AppSettingsActivity.OnStop 4
02.03.2022 18:38:37:372 -- AppSettingsActivity.OnStart 4
02.03.2022 18:38:37:373 -- AppSettingsActivity.OnResume 4
02.03.2022 18:38:37:373 --  DB null 4
02.03.2022 18:38:37:978 -- AppSettingsActivity.OnPause 4
02.03.2022 18:38:37:994 -- PasswordActivity.OnStart 3
02.03.2022 18:38:37:997 -- PasswordActivity.OnResume 3
02.03.2022 18:38:37:997 --  DB null 3
02.03.2022 18:38:37:998 -- starting: True, Finishing: False, _performingLoad: False
02.03.2022 18:38:38:0 -- https://.....kdbx isCached = False
02.03.2022 18:38:38:2 -- Pre-loading database file starting
02.03.2022 18:38:38:3 -- https://.....kdbx isCached = False
02.03.2022 18:38:38:3 -- CFS: OpenWhenNoLocalChanges
02.03.2022 18:38:38:87 -- Received unexpected response: Response{protocol=h2, code=401, message=, url=https://.....kdbx}
02.03.2022 18:38:38:87 -- https://.....kdbx isCached = False
02.03.2022 18:38:38:361 -- AppSettingsActivity.OnStop 4
02.03.2022 18:38:38:364 -- AppSettingsActivity.OnDestroyTrue 4
02.03.2022 18:38:39:811 -- https://.....kdbx isCached = False
02.03.2022 18:38:39:812 -- LockingActivity: OnActivityResult 
02.03.2022 18:38:39:813 -- PasswordActivity.OnActivityResult 874348/1000
02.03.2022 18:38:39:820 -- status message: Initializing...
02.03.2022 18:38:39:820 -- status submessage: 
02.03.2022 18:38:39:853 -- status message: Lade Datenbank…
02.03.2022 18:38:39:854 -- System.Exception: Received unexpected response: Response{protocol=h2, code=401, message=, url=https://.....kdbx} ---> Java.Lang.Exception: Received unexpected response: Response{protocol=h2, code=401, message=, url=https://.....kdbx}
  at Java.Interop.JniEnvironment+InstanceMethods.CallObjectMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0006e] in <72def2bfa5d341bfbf05115bb5c7ca17>:0 
  at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in <72def2bfa5d341bfbf05115bb5c7ca17>:0 
  at Keepass2android.Javafilestorage.WebDavStorage.OpenFileForRead (System.String path) [0x00029] in <944fe23608a24cc8aab99955fd19639c>:0 
  at keepass2android.Io.JavaFileStorage.OpenFileForRead (KeePassLib.Serialization.IOConnectionInfo ioc) [0x0000d] in <0218d9a0a246400eb61cf9b0c47299ea>:0 
   --- End of inner exception stack trace ---
  at keepass2android.Io.JavaFileStorage.OpenFileForRead (KeePassLib.Serialization.IOConnectionInfo ioc) [0x0002b] in <0218d9a0a246400eb61cf9b0c47299ea>:0 
  at keepass2android.Io.OfflineSwitchableFileStorage.OpenFileForRead (KeePassLib.Serialization.IOConnectionInfo ioc) [0x00006] in <0218d9a0a246400eb61cf9b0c47299ea>:0 
  at keepass2android.Io.CachingFileStorage.UpdateCacheFromRemote (KeePassLib.Serialization.IOConnectionInfo ioc, System.String cachedFilePath) [0x00000] in <0218d9a0a246400eb61cf9b0c47299ea>:0 
  at keepass2android.Io.CachingFileStorage.OpenFileForReadWhenNoLocalChanges (KeePassLib.Serialization.IOConnectionInfo ioc, System.String cachedFilePath) [0x00023] in <0218d9a0a246400eb61cf9b0c47299ea>:0 
  at keepass2android.Io.CachingFileStorage.OpenFileForRead (KeePassLib.Serialization.IOConnectionInfo ioc) [0x0005a] in <0218d9a0a246400eb61cf9b0c47299ea>:0 
  at keepass2android.PasswordActivity.PreloadDbFile () [0x0004c] in <7165a5adb3574afbabf24b0ad4c46188>:0 
  at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in <ed1ddd3e89904eae9b5bf8c1a4c4ac6d>:0 
  at System.Threading.Tasks.Task.Execute () [0x00000] in <ed1ddd3e89904eae9b5bf8c1a4c4ac6d>:0 
02.03.2022 18:38:39:869 -- OnFinish message: Ein Fehler ist aufgetreten: Received unexpected response: Response{protocol=h2, code=401, message=, url=https://.....kdbx}

The last method it calls seems to be WebDavStorage.OpenFileForRead. The following stacktrace is java error handling i guess?

Thanks for your help

ummerland avatar Mar 02 '22 17:03 ummerland

Looks like Issue #1938 is related.

NumbGnat avatar Apr 22 '22 17:04 NumbGnat