PhilippC / keepass2android

Password manager app for Android
https://play.google.com/store/apps/details?id=keepass2android.keepass2android
GNU General Public License v3.0
4.85k stars 392 forks source link

Unable to connect to database on Webdav with Android 8.0 #353

Open eleifhh opened 6 years ago

eleifhh commented 6 years ago

Trying to open a database on an Office365 library results in an error. KeePass for Windows can open the database without any issues. Any help is appreciated!

Here is the log:

22.04.2018 21:57:06:986 -- PasswordActivity.OnPause 22.04.2018 21:57:07:25 -- FileSelect.OnCreate 22.04.2018 21:57:07:26 -- FileSelect:apptask=NullTask 22.04.2018 21:57:07:26 -- Loaded task keepass2android.NullTask 22.04.2018 21:57:07:43 -- FileSelect.OnStart 22.04.2018 21:57:07:51 -- FileSelect.OnResume 22.04.2018 21:57:07:472 -- PasswordActivity.OnStop 22.04.2018 21:57:07:483 -- PasswordActivity.OnDestroyTrue 22.04.2018 21:57:08:610 -- FileSelect.OnPause 22.04.2018 21:57:08:625 -- SelectStorageLocationActivity.OnCreate 22.04.2018 21:57:09:160 -- FileSelect.OnStop 22.04.2018 21:57:10:554 -- onAR 22.04.2018 21:57:10:556 -- base.onAR 22.04.2018 21:57:38:813 -- No AppTask in OnActivityResult 22.04.2018 21:57:38:867 -- PasswordActivity.OnCreate 22.04.2018 21:57:38:868 -- PasswordActivity:apptask= 22.04.2018 21:57:38:870 -- Loaded task keepass2android.NullTask 22.04.2018 21:57:38:943 -- PasswordActivity.OnStart 22.04.2018 21:57:38:951 -- PasswordActivity.OnResume 22.04.2018 21:57:38:951 -- DatabaseIsUnlocked=False 22.04.2018 21:57:38:952 -- starting: True, Finishing: False, _performingLoad: False 22.04.2018 21:57:39:25 -- PasswordActivity.OnPause 22.04.2018 21:57:39:213 -- PasswordActivity.OnResume 22.04.2018 21:57:39:213 -- DatabaseIsUnlocked=False 22.04.2018 21:57:39:213 -- starting: False, Finishing: False, _performingLoad: False 22.04.2018 21:57:39:540 -- FileSelect.OnDestroyTrue 22.04.2018 21:57:50:667 -- PasswordActivity.OnActivityResult 874348/1000 22.04.2018 21:57:50:669 -- No AppTask in OnActivityResult 22.04.2018 21:57:50:745 -- CFS: OpenWhenNoLocalChanges 22.04.2018 21:57:51:364 -- Received unexpected response: Response{protocol=h2, code=403, message=, url=https://XXXX.sharepoint.com/Documents/KeePass/FILENAME.kdbx} 22.04.2018 21:57:51:373 -- System.Exception: Received unexpected response: Response{protocol=h2, code=403, message=, url=https://XXXX.sharepoint.com/Documents/KeePass/FILENAME.kdbx} ---> Java.Lang.Exception: Received unexpected response: Response{protocol=h2, code=403, message=, url=https://XXXX.sharepoint.com/Documents/KeePass/FILENAME.kdbx} at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at Java.Interop.JniEnvironment+InstanceMethods.CallObjectMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue args) [0x00069] in <1ec7b7317dd846a8a314e55115c46f36>:0 at Android.Runtime.JNIEnv.CallObjectMethod (System.IntPtr jobject, System.IntPtr jmethod, Android.Runtime.JValue parms) [0x0000e] in <0427915eb8c34e20b227185d2654799f>:0 at Keepass2android.Javafilestorage.WebDavStorage.OpenFileForRead (System.String p0) [0x00062] in <0db3ef6c845f41df96dcf3cf2245a5fa>:0 at keepass2android.Io.JavaFileStorage.OpenFileForRead (KeePassLib.Serialization.IOConnectionInfo ioc) [0x0000d] in :0 --- End of inner exception stack trace --- at keepass2android.Io.JavaFileStorage.OpenFileForRead (KeePassLib.Serialization.IOConnectionInfo ioc) [0x0002b] in :0 at keepass2android.Io.OfflineSwitchableFileStorage.OpenFileForRead (KeePassLib.Serialization.IOConnectionInfo ioc) [0x00006] in :0 at keepass2android.Io.CachingFileStorage.UpdateCacheFromRemote (KeePassLib.Serialization.IOConnectionInfo ioc, System.String cachedFilePath) [0x00000] in :0 at keepass2android.Io.CachingFileStorage.OpenFileForReadWhenNoLocalChanges (KeePassLib.Serialization.IOConnectionInfo ioc, System.String cachedFilePath) [0x00023] in :0 at keepass2android.Io.CachingFileStorage.OpenFileForRead (KeePassLib.Serialization.IOConnectionInfo ioc) [0x0005a] in :0 at keepass2android.LoadDb.Run () [0x00092] in :0 22.04.2018 21:57:57:299 -- PasswordActivity.OnPause 22.04.2018 21:57:57:319 -- AppSettingsActivity.OnCreate 22.04.2018 21:57:57:319 -- AppSettingsActivity:apptask= 22.04.2018 21:57:57:375 -- AppSettingsActivity.OnStart 22.04.2018 21:57:57:383 -- AppSettingsActivity.OnResume 22.04.2018 21:57:57:383 -- DatabaseIsUnlocked=False 22.04.2018 21:57:57:785 -- PasswordActivity.OnStop

PhilippC commented 6 years ago

this indicates that this error comes from the authentication model used by Office 365: https://sharepoint.stackexchange.com/questions/165367/the-remote-server-returned-an-error-403-forbidden-when-accessing-office365-si

But maybe you can also try something like this: https://support.microsoft.com/en-us/help/2988732/403-sorry-access-denied-error-when-a-user-tries-to-sign-in-to-outlook

eleifhh commented 6 years ago

Philipp, thanks for your quick reply. I tried to understand your suggestions and links but am unsure what is needed to accomplish. Can you give me some hints or some reference how to connect to O365?