VictorNine / bitwarden-go

A Bitwarden-compatible server written in Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Importing - Fails or Imports nothing

davehope opened this issue · comments

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.

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.

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.

Closing as stale