Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to sync database: Object reference not set to an instance of an object #73

Closed
arcmps opened this issue Dec 4, 2018 · 15 comments
Closed

Comments

@arcmps
Copy link

arcmps commented Dec 4, 2018

I am sharing a database in One Drive for Business and I am able to add and sync without issue. When any of my colleagues attempt to sync any changes they make to the database, they all receive the following error:

Failed to sync database: Object reference not set to an instance of an object

I have given all of the users 'write' permission. Why does it fail for everyone except me?

KeePass v2.4.0
OneDriveSync 2.0.2.1

Thanks,
Steve

@KoenZomers KoenZomers self-assigned this Dec 7, 2018
@arcmps
Copy link
Author

arcmps commented Dec 28, 2018

any updates on this ?

@KoenZomers
Copy link
Owner

Just tried to reproduce this, but I couldn't get it to fail the way you describe. One thing that I noticed was that when I first shared the KeePass database on my OneDrive for Business with my test account, it did share it but for some weird reason it stopped sharing it again automatically shortly after. Can you double check that the rights are still in place like here:

image

Can you also confirm that the person you're sharing with has an account in the same Azure Active Directory / Office 365 tenant? Is it a cloud only account or AAD Connec Synced account?

Could you give this a try with the latest plugin version? Just fixed a few issues and released new versions for them. Perhaps as a side effect this issue was also fixed in those versions and that's why I can't reproduce this.

Let me know your findings please.

@sla-te
Copy link

sla-te commented Feb 17, 2019

+1 KeePass 2.35 on debian 9 and I am just trying to setup a new synced database, no sharing.

@KoenZomers
Copy link
Owner

@chwba, can you provide more information on what your scenario is? If it doesn't match the one here, please open a new issue ticket to keep things organised. I'm not aware that my plugin would work on *nix environments. How did you get it to work there?

@schtritoff
Copy link

schtritoff commented Feb 25, 2019

+1
I think that this problem showed up when I switched to "graph API". I had old config but after upgrade to latest KeePassOneDriveSync version I got prompts to login to OneDrive again (this login did not persist between restarts) and then decided to remove config I recreate sync profile. After that I got this error.

KeePass: 2.4.1
Plugin version: 2.0.2.5

EDIT:
I've tracked down the problem. When I'm using corporate connection (going through proxy with auth defined in KeePass configuration) then this error shows up on sync. If my connection is going straight to the WAN without proxy then sync works without issues.

@KoenZomers
Copy link
Owner

Proxy issues are extremely hard to troubleshoot for me as I don't have a proxy and each proxy behaves differently so if I can't reproduce it, I can't fix it. Have you tried all possible options in the KeePass tool to configure the proxy? Perhaps using one method over another can make a difference?

@rdolezel
Copy link

rdolezel commented May 5, 2019

Let me provide my details of the issue. Another OneDrive user has granted me permissions to her .kdbx file saved on OneDrive (for Consumer).

KeePass 2.42.1, KeePassOneDriveSync 2.0.3.0, W10 Pro 1809 (but I think OS is not so important)
No proxy used.
Tested with both MicrosoftGraph and OneDriveConsumer APIs.
The first "Open from OneDrive..." is always successful. Unfortunately any additional attempt to sync ends up with:
"Failed to sync database. Object reference not set to an instance of an object."

I can see the following in OneDriveSync configuration:
Refresh Token Storage: Disk
Last synced with Sun 5 May 2019 12:57:01
Last verified with Sun 5 May 2019 14:16:35

So it seems it successfully downloads a temporary copy to my local disk but then it fails with sync. It seems like it's not a directly OneDrive related issue.

@KoenZomers
Copy link
Owner

@rdolezel, not related to the issue discussed here then but let's dive into that. Let me try to reproduce this scenario on my end.

@KoenZomers
Copy link
Owner

I can reproduce this one. Let me dive into it to see what's happening.

@KoenZomers
Copy link
Owner

Found the issue. It happens if you just share the database with someone, which is of course a perfectly valid scenario. If you share the folder in which the database resides, it works well. Working on a fix.

@rdolezel
Copy link

rdolezel commented May 5, 2019

Interesting. I will try to share the whole folder.

Oh, it really works! Good to know. Easy temporary workaround, thanks for sharing.

@KoenZomers
Copy link
Owner

I've fixed the issue. It was quite a difficult one but I managed to do it. Working on releasing a new version now. Will take about an hour to get done.

@KoenZomers
Copy link
Owner

Creating the new version also was more complex than I expected, but it has made it. Go ahead and see if with this version it resolves your issue: https://github.com/KoenZomers/KeePassOneDriveSync/releases

@rdolezel
Copy link

rdolezel commented May 5, 2019

New release downloaded and installed, OneDrive folder unshared, OneDrive specific KDBX shared, database opened from "Shared with me" tab.
Trying to Sync now ... works!
Well done, thanks.

@KoenZomers
Copy link
Owner

Closing this topic to finish off this discussion. If anyone still needs support on their proxy situation, please open a new issue and be willing to e-mail Fiddler logs to me so I can try to figure out what goes wrong, but it's a bit of a needle in a haystack without being able to reproduce it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants