syncrypt / client

Syncrypt command line client and sync daemon
https://syncrypt.space
GNU General Public License v3.0
11 stars 1 forks source link

Daemon deletes auth token from vault config #14

Closed bakkdoor closed 8 years ago

bakkdoor commented 8 years ago

I've run into multiple cases where the daemon process ends up deleting the auth token from one or more of the vaults it's managing (it had a valid auth token before). This causes all kinds of operations to suddenly fail and since we don't yet have a way to easily re-fetch that token there's no easy way to get it working again.

I'm guessing that there's some kind of race condition or other kind of error that only gets triggered under very specific conditions (not sure what those would be but I noticed that while switching between many different vaults within a short amount of time in the desktop GUI this happened).

Here's a sample log of this error:

[ERROR   ] Error handling request
Traceback (most recent call last):
  File "/Users/bakkdoor/projects/syncrypt/client/lib/python3.5/site-packages/aiohttp/server.py", line 266, in start
    yield from self.handle_request(message, payload)
  File "/Users/bakkdoor/projects/syncrypt/client/lib/python3.5/site-packages/aiohttp/web.py", line 90, in handle_request
    resp = yield from handler(request)
  File "/Users/bakkdoor/projects/syncrypt/client/syncrypt/api/resources.py", line 47, in dispatch_list
    objs = yield from self.get_obj_list(request)
  File "/Users/bakkdoor/projects/syncrypt/client/syncrypt/api/resources.py", line 282, in get_obj_list
    yield from vault.backend.open()
  File "/Users/bakkdoor/projects/syncrypt/client/syncrypt/backends/binary.py", line 672, in open
    with (yield from self.manager.acquire_connection()) as conn:
  File "/Users/bakkdoor/projects/syncrypt/client/syncrypt/backends/binary.py", line 610, in acquire_connection
    yield from conn.connect()
  File "/Users/bakkdoor/projects/syncrypt/client/syncrypt/backends/binary.py", line 145, in connect
    raise StorageBackendInvalidAuth('No username/email or auth token provided')
syncrypt.backends.base.StorageBackendInvalidAuth: No username/email or auth token provided