VictorNine / bitwarden-go

A Bitwarden-compatible server written in Golang
MIT License
250 stars 33 forks source link

Importing - Fails or Imports nothing #39

Closed davehope closed 2 years ago

davehope commented 5 years ago

If i try and import my fairly large KeePass XML file, bitwarden-go crashes:

$ /home/bitwarden/go/bin/bitwarden-go -disableRegistration -location /home/bitwarden/go/bin/ 2019/04/07 15:10:43 Starting server on :8000 2019/04/07 15:11:15 dave@xxxx is trying to import data 2019/04/07 15:11:15 json: cannot unmarshal array into Go struct field newCipher.fields of type string

If I try and import a smaller set (a folder containing one or two entries), this is reported as successful by bitwarden-web but no entries appear. bitwarden-go reports:

$ /home/bitwarden/go/bin/bitwarden-go -disableRegistration -location /home/bitwarden/go/bin/ 2019/04/07 15:11:35 Starting server on :8000 2019/04/07 15:11:39 dave@xxxx is trying to import data

In the chrome inspector, I can see a successful POST to api/ciphers/import and then a GET to api/accounts/revision-date (which fails - 404)

Adding a single item through bitwarden-web, or one of the mobile apps works fine.

davehope commented 5 years ago

After further investigation:

The first issue I mentioned seems to occur when the KeePass backup contains JSON data as an additional string value. This was the case on many of my entires from using KeePassHTTP in the past.

For the second issue, this may be a quirk of my setup. After testing importing entries they do appear in the desktop client. So probably a quirk in my setup of bitwarden-web. I've not yet figured out how to get tell webpack-dev-server a different hostname & port for the requests to sockjs-node, so that could be the cause I guess.

korney4eg commented 4 years ago

Hey @davehope could you let me know how do you import the data?

I cannot access web vault, so I don't see any way to do it.

davehope commented 2 years ago

Closing as stale