Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Can't seem to sync #45

Closed
jacklenox opened this issue Mar 27, 2018 · 18 comments
Closed

Can't seem to sync #45

jacklenox opened this issue Mar 27, 2018 · 18 comments

Comments

@jacklenox
Copy link

jacklenox commented Mar 27, 2018

I was excited to stumble upon this project. I believe I've got it up and running on my local machine, however I can't seem to sync any of the apps with the ruby server. When I try to sync from either the desktop app or web browser, it fails to do so. On startup, both the desktop app and Firefox browser extension seem to hang indefinitely with the loading gif until I interact with them.

I see this on the command line when I run the server and then try to connect via an app:

$ env RACK_ENV=production bundle exec rackup -p 4567 config.ru
[2018-03-27 13:57:38] INFO  WEBrick 1.3.1                                      
[2018-03-27 13:57:38] INFO  ruby 2.3.3 (2016-11-21) [x86_64-linux-gnu]         
[2018-03-27 13:57:38] INFO  WEBrick::HTTPServer#start: pid=2503 port=4567      
127.0.0.1 - - [27/Mar/2018:13:57:49 +0100] "POST /identity/connect/token HTTP/1.1" 200 1093 0.0246
127.0.0.1 - - [27/Mar/2018:13:57:49 +0100] "GET /api/sync HTTP/1.1" 200 91577 0.0329

You can see the sync request is returning a 200. However my browser extension seems to always fail to sync and is still showing: Last Sync: 01/01/1970 01:00:00

UPDATE Forgot to mention, I'm on Ubuntu 17.10, just in case that's relevant. And I'm running the server locally as per the instructions in the README. Server URL: http://127.0.0.1:4567

@raufis27
Copy link

Can you check desktop app and extension version ?

@jacklenox
Copy link
Author

Here's all the desktop app info:

Version 1.1.0
Shell 1.8.2
Renderer 59.0.3071.115
Node 8.2.1
Architecture x64

@raufis27
Copy link

That looks good. So were you able to create account and sign in with desktop app ?

@jacklenox
Copy link
Author

FF and Chrome extension version is 1.25.5. I tested it and it's also not working in Chrome, which I'd expect as they're now essentially the same extension.

@jacklenox
Copy link
Author

Yep, I can create an account and sign in, I just can't sync.

@raufis27
Copy link

Let's focus on desktop app first. Logout, login back and try to create an entry. Does it work ?

@jacklenox
Copy link
Author

Ah, I've found the issue by creating a new user. Everything seems to work fine up to the point that I import my 1Password stuff. As soon as I do that, it breaks.

@jacklenox
Copy link
Author

Let's focus on desktop app first. Logout, login back and try to create an entry. Does it work ?

Yep, everything works fine, including syncing across apps/extensions, until I try to import 1Password stuff.

The 1Password import seems to go fine, e.g. no errors in the console, but it's obviously breaking something.

@raufis27
Copy link

Do you use ruby script to import 1pass ? If yes, then it is not gonna work, I had the same problem with keepass. Those scripts are not optimized for new api. Your option is to install Vault and import 1pass db.

@jacklenox
Copy link
Author

Oh, I see. Yes I used the ruby script. Sorry, I didn't realise that. So when you say "install Vault", what do you mean by that?

@raufis27
Copy link

@jcs Could you please update manual and remove import scripts section. Unless you want to fix them.

@raufis27
Copy link

@jacklenox please read #42
I used mprasil's scripts to build web vault and api on ubuntu. I don't use docker. https://github.com/mprasil/docker-bitwarden
Check build-web and build-api scripts from repository, install nginx and use nginx.conf to setup proxy for vault.

@mprasil
Copy link

mprasil commented Mar 27, 2018

@jacklenox if you're OK using Docker (even temporary) see my docker image here. You can just use it to import the passwords via Vault and then continue using the created db file with any setup you like.

@universal
Copy link
Contributor

the 1password import still uses the old data field for storing the information. You should be able to fix your data by calling the migrate_data! method in the cipher model from an irb session or at the end of the import script.

fixing / adopting the import script shouldn't also be too hard, just take the migrate_data! method as a rough blueprint and adopt the necessary sections.

@jacklenox
Copy link
Author

Thank you so much for you all your help @raufis27, @mprasil and @universal.

@mprasil, your Docker thing is great. I've got it up and running. For some reason I'm struggling to run it on any port other than 8080. Should it not just be as simple as changing the ports here? docker run -d -v /bitwarden_data/:/bitwarden/api/db/ -p 8080:8080 mprasil/bitwarden-ruby?

@mprasil
Copy link

mprasil commented Mar 27, 2018

Yes, it should be pretty easy just do -p <whatever_port>:8080 and the service will be exposed on whatever_port. I don't see how that won't work unless your Docker installation is seriously miss-configured.

jcs added a commit that referenced this issue Mar 27, 2018
These tools need to be updated to put data into their new native
fields, but for now just migrate from the old data field.

See #41 and #45
@jcs
Copy link
Owner

jcs commented Mar 27, 2018

The importers should now migrate data to the new format if you want to try importing again to a clean database.

@jacklenox
Copy link
Author

@mprasil Thank you! I was changing both port numbers there. 🤦‍♂️

@jcs Thank you also, I may try that again!

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

No branches or pull requests

5 participants