mozilla-services / syncserver

Run-Your-Own Firefox Sync Server
Mozilla Public License 2.0
1.87k stars 145 forks source link

syncserver does not start correctly after last commits #231

Closed misterhsp closed 4 years ago

misterhsp commented 4 years ago

Since the last commits to 1.9.0, syncserver does not start correctly here. The following error occurs at startup. What is wrong?

ERROR:syncstorage.storage:Error while scanning package 'syncstorage.storage.spanner' Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/venusian/init.py", line 230, in scan import(modname) File "/usr/local/lib/python2.7/dist-packages/syncstorage/storage/spanner.py", line 19, in from google.api_core.exceptions import Aborted, AlreadyExists ImportError: No module named google.api_core.exceptions

Thanks...

tohuuuuu commented 4 years ago

I got around this error by manually installing google-api-core, google-cloud-language and google-cloud-spanner (but ran into another issue #232 ). Hmm, what does that google-cloud stuff do? I'm running my own sync server exactly to avoid such services...

misterhsp commented 4 years ago

I am back to the old version. Somehow it does not work properly anymore I have the impression. With the older version everything is ok again.

...

tohuuuuu commented 4 years ago

@misterhsp : which is the last version that works for you? I've skipped some versions, so i'm not sure which is the best one to rollback.

misterhsp commented 4 years ago

I am back before the last 4 commits that came a few days ago. Everything works again.

...

Emporea commented 4 years ago

I am having the same issue. Can somebody explain a newbie like me why Google api is even used in the first place with mozilla syncserver?

Emporea commented 4 years ago

@misterhsp and @tohuuuuu are you using the firefox 80 for Destop ( windows and linux)? Because since the upgrade to 80 i have also problems with the syncing regardless the new update of the syncserver to 1.9; I get signed out everytime. With Firefox 79 this problem didnt exist.

tohuuuuu commented 4 years ago

I got signed out immediately, too (yes, Firefox 80, Windows 10 and Linux Mint). I thought upgrading to lastet syncserver would be a remedy. Now, i stay logged in in FF, but i can't sync anymore. Either Issue #232 or authentication error, even after rolling back to a version from June this year.

tohuuuuu commented 4 years ago

For me, the following worked:

  1. Backup your syncserver dir before proceeding!!!
  2. Install a fresh syncserver 1.8.0: git clone -b 1.8.0 https://github.com/mozilla-services/syncserver.git
  3. Proceed to commit e1aab54cbcb6e570979835789f7b4624eebdc875 (otherwise login would fail - not sure about the "minimal" commit required by FF 80 for persistent login): git checkout e1aab54cbcb6e570979835789f7b4624eebdc875
  4. make build;
  5. Copy your syncserver.ini and syncserver.db from old installation to new installation;
  6. Edit your syncserver.db with your preferred Sqlite db tool, add fields keys_changed_at and node (both BIGINT) to table users manually (otherwise you'll hit issue #232).

Now, syncing works for me again with FF 80.

Emporea commented 4 years ago

https://pypi.org/project/google-cloud-spanner/ was the cause of the google error btw. #230

rfk commented 4 years ago

Can somebody explain a newbie like me why Google api is even used in the first place with mozilla syncserver?

The server has a spanner storage backend which was used as part of our migration of the production storage cluster to spanner, but it's not actually used unless you explicitly enable it when running the server. I agree it would be nice not to have to install those dependencies at all in the self-hosting case, but they should be harmless.

rfk commented 4 years ago

The latest commit should install these by default, thanks to @sbraz and https://github.com/mozilla-services/syncserver/pull/230. I'm going to close this out, but let me know if things are still not working and we can re-open.

Emporea commented 4 years ago

@rfk yeah i have created a new issue, because i think its not anymore related to spanner.