mvdan / bitw

Minimalist BitWarden client
BSD 3-Clause "New" or "Revised" License
169 stars 15 forks source link

error: could not sync: json: cannot unmarshal array into Go struct field Domains.Domains.EquivalentDomains of type string #30

Closed WillJBrown closed 3 years ago

WillJBrown commented 3 years ago

Hi,

I've just started trying to run this. I can get bitw login to work but when I run bitw sync it dumps a whole load of encrypted stuff in what looks like a json array and then returns the error above.

1 │ { 2 │ "DeviceID": "REDACTED", 3 │ "AccessToken": "REDACTED", 4 │ "RefreshToken": "REDACTED" 5 │ "TokenExpiry": "2021-10-03T00:47:23.103238698Z", 6 │ "KDF": 0, 7 │ "KDFIterations": 100000, 8 │ "LastSync": "0001-01-01T00:00:00Z", 9 │ "Sync": { 10 │ "Profile": { 11 │ "ID": "00000000-0000-0000-0000-000000000000", 12 │ "Name": "", 13 │ "Email": "", 14 │ "EmailVerified": false, 15 │ "Premium": false, 16 │ "MasterPasswordHint": "", 17 │ "Culture": "", 18 │ "TwoFactorEnabled": false, 19 │ "Key": "", 20 │ "PrivateKey": "", 21 │ "SecurityStamp": "", 22 │ "Organizations": null 23 │ }, 24 │ "Folders": null, 25 │ "Ciphers": null, 26 │ "Domains": { 27 │ "EquivalentDomains": null, 28 │ "GlobalEquivalentDomains": null 29 │ } 30 │ } 31 │ }

I've read through all the issues on this github and I couldn't find anything quite the same.

Any ideas? Am I doing something obvious wrong?

mvdan commented 3 years ago

Can you check if the commit above fixed it for you? Thanks!

WillJBrown commented 3 years ago

Hi, Thanks for the swift response. Unfortunately I don't think this does fix it. I cleared out everything, recloned the git, ran go install mvdan.cc/bitw@latest and copied it to /usr/local/bin/ which says I'm calling the new file. unfortunately I still have the same error message. Any other information I can give?

mvdan commented 3 years ago

Hm. Can you double check that you built the latest master commit? Also, try clearing ~/.config/bitw, though that should not matter here.

WillJBrown commented 3 years ago

Hi, This did fix it. I just had to clone the repo and run "go install" in the directory instead of go install mvdan.cc/bitw@latest Thanks