[ FireFox Sync Server ] [ 1.5 ] Browser synchronization

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
Post Reply
User avatar
QNAP_Stephane
Experience counts
Posts: 3217
Joined: Wed Mar 27, 2013 1:00 am

[ FireFox Sync Server ] [ 1.5 ] Browser synchronization

Post by QNAP_Stephane » Tue Nov 03, 2015 4:23 am

Image

https://www.mozilla.org/en/firefox/sync/

Download :

X86 Version http://www.positiv-it.fr/QNAP/APP/FireFoxSync_1.5_x86.qpkg.zip

Note :

listen by default on port 5000
modify config file : /opt/FireFoxSync/syncserver/syncserver.ini

About :

Firefox Sync, originally branded Mozilla Weave,] is a browser synchronization feature that allows users to partially synchronize bookmarks, browsing history, preferences, passwords, filled forms, add-ons, and the last 25 opened tabs across multiple computers.

It keeps user data on Mozilla servers, but according to Mozilla the data is encrypted in such a way that no third party, not even Mozilla, can access user information. It is also possible for the user to host their own Firefox Sync servers, or indeed, for any entity to do so.
Firefox Sync was originally an add-on for Mozilla Firefox 3.x and SeaMonkey 2.0, but it has been a built-in feature since Firefox 4.0 and SeaMonkey 2.1

Firefox Sync is built on top of Firefox Accounts as of Firefox 29, and therefore Firefox 29 and later cannot sync with Firefox 28
--------------------------------------------------------------------------
QnapClub AppCenter - https://www.qnapclub.eu
--------------------------------------------------------------------------

User avatar
PJGM
Easy as a breeze
Posts: 254
Joined: Mon Aug 08, 2011 8:49 pm
Location: Portugal

Re: [ FireFox Sync Server ] [ 1.5 ] Browser synchronization

Post by PJGM » Wed Nov 04, 2015 5:10 pm

Hi Stephane,

Thanks again for this app ! Great work!

I'm not quite sure if it's working properly for me ...

I installed the qpkg, changed the both lines in Firefox about:config (in two computers):

"identity.sync.tokenserver.uri" and “services.sync.tokenServerURI” to

http://192.168.1.87:5000/token/1.0/sync/1.5

...created an account on firefox Sync...

But no sync... :(

The strange is that I think that .db file has synced once...

Is there any log file on server side?

I will try to dig a little more from about:sync-log ;)

cheers
pjgm
QNAP TS-239Pro II+ w/ 2 x Samsung EcoGreen F4 2 TB (HD204UI) in JBOD |FW: 4.2.1
QNAP TS-469Pro w/ 4 x WD 3TB Red WD30EFRX in JBOD |FW: 4.2.1

User avatar
QNAP_Stephane
Experience counts
Posts: 3217
Joined: Wed Mar 27, 2013 1:00 am

Re: [ FireFox Sync Server ] [ 1.5 ] Browser synchronization

Post by QNAP_Stephane » Wed Nov 04, 2015 8:31 pm

yes i had no time to fully test it

but i am pretty sure it should work
--------------------------------------------------------------------------
QnapClub AppCenter - https://www.qnapclub.eu
--------------------------------------------------------------------------

User avatar
PJGM
Easy as a breeze
Posts: 254
Joined: Mon Aug 08, 2011 8:49 pm
Location: Portugal

Re: [ FireFox Sync Server ] [ 1.5 ] Browser synchronization

Post by PJGM » Thu Nov 05, 2015 2:55 am

Ok this is the firefox sync log...

Code: Select all

1446662365510   Sync.Service   INFO   Loading Weave 1.44.0
1446662365513   Sync.Engine.Clients   DEBUG   Engine initialized
1446662365515   Sync.Engine.Clients   DEBUG   Resetting clients last sync time
1446662365523   Sync.Engine.Bookmarks   DEBUG   Engine initialized
1446662365527   Sync.Engine.Forms   DEBUG   Engine initialized
1446662365531   Sync.Engine.History   DEBUG   Engine initialized
1446662365537   Sync.Engine.Passwords   DEBUG   Engine initialized
1446662365541   Sync.Engine.Prefs   DEBUG   Engine initialized
1446662365545   Sync.Engine.Tabs   DEBUG   Engine initialized
1446662365546   Sync.Engine.Tabs   DEBUG   Resetting tabs last sync time
1446662365552   Sync.Engine.Addons   DEBUG   Engine initialized
1446662365555   Sync.Service   INFO   Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
1446662365559   Sync.SyncScheduler   DEBUG   Clearing sync triggers and the global score.
1446662365560   Sync.Status   DEBUG   Status.service: success.status_ok => success.status_ok
1446662365560   Sync.Status   DEBUG   Status.service: success.status_ok => success.status_ok
1446662365560   Sync.AddonsReconciler   INFO   Registering as Add-on Manager listener.
1446662365561   Sync.AddonsReconciler   DEBUG   Adding change listener.
1446662365561   Sync.Tracker.History   INFO   Adding Places observer.
1446662365563   FirefoxAccounts   DEBUG   got keyPair
1446662365564   FirefoxAccounts   DEBUG   getCertificateSigned: true true
1446662365572   browserwindow.syncui   DEBUG   observed: weave:service:ready
1446662365574   browserwindow.syncui   DEBUG   _loginFailed has sync state=success.login
1446662365577   Sync.Engine.AdblockPlus   DEBUG   Engine initialized
1446662365578   Sync.Status   DEBUG   Status.service: success.status_ok => success.status_ok
1446662365580   FirefoxAccounts   TRACE   not checking freshness of profile as it remains recent
1446662366368   Hawk   DEBUG   (Response) /certificate/sign: code: 200 - Status text: OK
1446662366368   Sync.RESTResponse   TRACE   Processing response headers.
1446662366368   Hawk   DEBUG   Clock offset vs https://api.accounts.firefox.com/v1: -11368
1446662366369   FirefoxAccounts   DEBUG   getCertificate got a new one: true
1446662366369   FirefoxAccounts   DEBUG   _updateAccountData with items: ["keyPair","cert"]
1446662366370   FirefoxAccounts   DEBUG   getAssertionFromCert
1446662366371   FirefoxAccounts   DEBUG   writing plain storage: ["email","sessionToken","uid","verified","oauthTokens"]
1446662366371   FirefoxAccounts   TRACE   starting write of json user data: ["email","sessionToken","uid","verified","oauthTokens"]
1446662366376   FirefoxAccounts   DEBUG   getAssertionFromCert returning signed: true
1446662366377   Sync.BrowserIDManager   DEBUG   Getting a token
1446662366377   Common.TokenServerClient   DEBUG   Beginning BID assertion exchange: http://192.168.1.87:5000/token/1.0/sync/1.5
1446662366383   FirefoxAccounts   TRACE   finished write of json user data - took: 12
1446662366383   FirefoxAccounts   DEBUG   writing secure storage: ["kA","kB"]
1446662366384   FirefoxAccounts   TRACE   starting write of user data to the login manager
1446662366402   FirefoxAccounts   TRACE   finished write of user data to the login manager
1446662366408   Common.TokenServerClient   DEBUG   Got token response: 500
1446662366408   Sync.RESTResponse   TRACE   Processing response headers.
1446662366409   Common.TokenServerClient   INFO   Server-reported error: "The public_url setting doesn't match the application url.\nThis will almost certainly cause authentication failures!\n    public_url setting is: http://localhost:5000\n    application url is:    http://192.168.1.87:5000\nYou can disable this check by setting the force_wsgi_environ\noption in your config file, but do so at your own risk."
1446662366409   Sync.BrowserIDManager   ERROR   Non-authentication error in _fetchTokenForUser: TokenServerClientServerError({"now":"2015-11-04T18:39:26.409Z","message":"Server error.","cause":"general","response_body":"{\"status\": \"error\", \"errors\": [\"The public_url setting doesn't match the application url.\\nThis will almost certainly cause authentication failures!\\n    public_url setting is: http://localhost:5000\\n    application url is:    http://192.168.1.87:5000\\nYou can disable this check by setting the force_wsgi_environ\\noption in your config file, but do so at your own risk.\"]}","response_headers":{"server":"gunicorn/19.1.1","date":"Wed, 04 Nov 2015 18:39:15 GMT","connection":"keep-alive","content-length":"373","content-type":"application/json; charset=UTF-8","x-weave-timestamp":"1446662355.34","x-timestamp":"1446662355"},"response_status":500}) (resource://gre/modules/services-common/tokenserverclient.js:36:36) JS Stack trace: @tokenserverclient.js:36:36 < @browserid_identity.js:14:1 < @status.js:15:1 < SyncServiceObserver.init@sync.js:76:62 < @sync.js:459:1 < require@bootstrap.js:137:7 < @main.js:30:1 < require@bootstrap.js:137:7 < startup@bootstrap.js:21:3 < XPI_callBootstrapMethod@XPIProvider.jsm:4774:9 < XPI_startup@XPIProvider.jsm:2484:13 < callProvider@AddonManager.jsm:221:12 < _startProvider@AddonManager.jsm:828:5 < AMI_startup@AddonManager.jsm:999:9 < AMP_startup@AddonManager.jsm:2672:5 < AMC_observe@addonManager.js:58:7
1446662366410   Sync.Status   DEBUG   Status.login: success.login => error.login.reason.network
1446662366410   Sync.Status   DEBUG   Status.service: success.status_ok => error.login.failed
1446662366410   browserwindow.syncui   DEBUG   observed: weave:ui:login:error
1446662366410   browserwindow.syncui   DEBUG   onLoginError: login=error.login.reason.network, sync=success.sync
1446662366411   browserwindow.syncui   DEBUG   _loginFailed has sync state=error.login.reason.network
1446662366412   Sync.BrowserIDManager   ERROR   Background fetch for key bundle failed: TokenServerClientServerError({"now":"2015-11-04T18:39:26.409Z","message":"Server error.","cause":"general","response_body":"{\"status\": \"error\", \"errors\": [\"The public_url setting doesn't match the application url.\\nThis will almost certainly cause authentication failures!\\n    public_url setting is: http://localhost:5000\\n    application url is:    http://192.168.1.87:5000\\nYou can disable this check by setting the force_wsgi_environ\\noption in your config file, but do so at your own risk.\"]}","response_headers":{"server":"gunicorn/19.1.1","date":"Wed, 04 Nov 2015 18:39:15 GMT","connection":"keep-alive","content-length":"373","content-type":"application/json; charset=UTF-8","x-weave-timestamp":"1446662355.34","x-timestamp":"1446662355"},"response_status":500}) (resource://gre/modules/services-common/tokenserverclient.js:36:36) JS Stack trace: @tokenserverclient.js:36:36 < @browserid_identity.js:14:1 < @status.js:15:1 < SyncServiceObserver.init@sync.js:76:62 < @sync.js:459:1 < require@bootstrap.js:137:7 < @main.js:30:1 < require@bootstrap.js:137:7 < startup@bootstrap.js:21:3 < XPI_callBootstrapMethod@XPIProvider.jsm:4774:9 < XPI_startup@XPIProvider.jsm:2484:13 < callProvider@AddonManager.jsm:221:12 < _startProvider@AddonManager.jsm:828:5 < AMI_startup@AddonManager.jsm:999:9 < AMP_startup@AddonManager.jsm:2672:5 < AMC_observe@addonManager.js:58:7
1446662366412   Sync.BrowserIDManager   ERROR   Could not authenticate: TokenServerClientServerError({"now":"2015-11-04T18:39:26.409Z","message":"Server error.","cause":"general","response_body":"{\"status\": \"error\", \"errors\": [\"The public_url setting doesn't match the application url.\\nThis will almost certainly cause authentication failures!\\n    public_url setting is: http://localhost:5000\\n    application url is:    http://192.168.1.87:5000\\nYou can disable this check by setting the force_wsgi_environ\\noption in your config file, but do so at your own risk.\"]}","response_headers":{"server":"gunicorn/19.1.1","date":"Wed, 04 Nov 2015 18:39:15 GMT","connection":"keep-alive","content-length":"373","content-type":"application/json; charset=UTF-8","x-weave-timestamp":"1446662355.34","x-timestamp":"1446662355"},"response_status":500}) (resource://gre/modules/services-common/tokenserverclient.js:36:36) JS Stack trace: @tokenserverclient.js:36:36 < @browserid_identity.js:14:1 < @status.js:15:1 < SyncServiceObserver.init@sync.js:76:62 < @sync.js:459:1 < require@bootstrap.js:137:7 < @main.js:30:1 < require@bootstrap.js:137:7 < startup@bootstrap.js:21:3 < XPI_callBootstrapMethod@XPIProvider.jsm:4774:9 < XPI_startup@XPIProvider.jsm:2484:13 < callProvider@AddonManager.jsm:221:12 < _startProvider@AddonManager.jsm:828:5 < AMI_startup@AddonManager.jsm:999:9 < AMP_startup@AddonManager.jsm:2672:5 < AMC_observe@addonManager.js:58:7
1446662366414   FirefoxAccounts   TRACE   not checking freshness of profile as it remains recent
1446662369579   Sync.BrowserIDManager   INFO   currentAuthState returning error.login.reason.network due to previous failure
1446662369579   Sync.Status   DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1446662369579   Sync.Status   DEBUG   Status.service: error.login.failed => error.login.failed
1446662376582   Sync.Tracker.Forms   DEBUG   Saving changed IDs to forms
1446662376989   Sync.Tracker.History   DEBUG   Saving changed IDs to history
1446662382520   Sync.Tracker.History   DEBUG   Saving changed IDs to history
1446662397335   Sync.Tracker.History   DEBUG   Saving changed IDs to history
1446662768685   Sync.Tracker.History   DEBUG   Saving changed IDs to history
1446662941607   Sync.Tracker.History   DEBUG   Saving changed IDs to history
1446662947609   Sync.Tracker.History   DEBUG   Saving changed IDs to history
1446662952759   Sync.Tracker.History   DEBUG   Saving changed IDs to history
1446662999978   Sync.Tracker.History   DEBUG   Saving changed IDs to history
1446663007529   Sync.Tracker.History   DEBUG   Saving changed IDs to history
1446663009918   Sync.ErrorHandler   DEBUG   Beginning user-triggered sync.
1446663009919   Sync.Service   DEBUG   User-Agent: Firefox/42.0 FxSync/1.44.0.20151029151421.
1446663009919   Sync.Service   INFO   Starting sync at 2015-11-04 18:50:09
1446663009919   Sync.Service   DEBUG   In sync: should login.
1446663009919   browserwindow.syncui   DEBUG   observed: weave:service:login:start
1446663009919   browserwindow.syncui   DEBUG   onActivityStart with numActive: 0
1446663009920   browserwindow.syncui   DEBUG   _loginFailed has sync state=error.login.reason.network
1446663009920   Sync.BrowserIDManager   INFO   currentAuthState returning error.login.reason.network due to previous failure
1446663009920   Sync.Status   DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1446663009920   Sync.Status   DEBUG   Status.service: error.login.failed => error.login.failed
1446663009920   Sync.BrowserIDManager   INFO   currentAuthState returning error.login.reason.network due to previous failure
1446663009921   Sync.Status   DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1446663009921   Sync.Status   DEBUG   Status.service: error.login.failed => error.login.failed
1446663009923   Sync.BrowserIDManager   INFO   Waiting for user to be verified.
1446663009923   FirefoxAccounts   DEBUG   already verified
1446663009923   Sync.BrowserIDManager   INFO   Starting fetch for key bundle.
1446663009923   FirefoxAccounts   DEBUG   already verified
1446663009923   Sync.BrowserIDManager   INFO   Getting an assertion from: http://192.168.1.87:5000/token/1.0/sync/1.5
1446663009924   FirefoxAccounts   DEBUG   enter getAssertion()
1446663009925   FirefoxAccounts   DEBUG   getKeypairAndCertificate: already have keyPair and certificate
1446663009925   FirefoxAccounts   DEBUG   getAssertionFromCert
1446663009946   FirefoxAccounts   DEBUG   getAssertionFromCert returning signed: true
1446663009946   Sync.BrowserIDManager   DEBUG   Getting a token
1446663009947   Common.TokenServerClient   DEBUG   Beginning BID assertion exchange: http://192.168.1.87:5000/token/1.0/sync/1.5
1446663009957   Common.TokenServerClient   DEBUG   Got token response: 500
1446663009957   Sync.RESTResponse   TRACE   Processing response headers.
1446663009957   Common.TokenServerClient   INFO   Server-reported error: "The public_url setting doesn't match the application url.\nThis will almost certainly cause authentication failures!\n    public_url setting is: http://localhost:5000\n    application url is:    http://192.168.1.87:5000\nYou can disable this check by setting the force_wsgi_environ\noption in your config file, but do so at your own risk."
1446663009957   Sync.BrowserIDManager   ERROR   Non-authentication error in _fetchTokenForUser: TokenServerClientServerError({"now":"2015-11-04T18:50:09.957Z","message":"Server error.","cause":"general","response_body":"{\"status\": \"error\", \"errors\": [\"The public_url setting doesn't match the application url.\\nThis will almost certainly cause authentication failures!\\n    public_url setting is: http://localhost:5000\\n    application url is:    http://192.168.1.87:5000\\nYou can disable this check by setting the force_wsgi_environ\\noption in your config file, but do so at your own risk.\"]}","response_headers":{"server":"gunicorn/19.1.1","date":"Wed, 04 Nov 2015 18:49:58 GMT","connection":"keep-alive","content-length":"373","content-type":"application/json; charset=UTF-8","x-weave-timestamp":"1446662998.91","x-timestamp":"1446662998"},"response_status":500}) (resource://gre/modules/services-common/tokenserverclient.js:36:36) JS Stack trace: @tokenserverclient.js:36:36 < @browserid_identity.js:14:1 < @status.js:15:1 < SyncServiceObserver.init@sync.js:76:62 < @sync.js:459:1 < require@bootstrap.js:137:7 < @main.js:30:1 < require@bootstrap.js:137:7 < startup@bootstrap.js:21:3 < XPI_callBootstrapMethod@XPIProvider.jsm:4774:9 < XPI_startup@XPIProvider.jsm:2484:13 < callProvider@AddonManager.jsm:221:12 < _startProvider@AddonManager.jsm:828:5 < AMI_startup@AddonManager.jsm:999:9 < AMP_startup@AddonManager.jsm:2672:5 < AMC_observe@addonManager.js:58:7
1446663009958   Sync.Status   DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1446663009958   Sync.Status   DEBUG   Status.service: error.login.failed => error.login.failed
1446663009958   browserwindow.syncui   DEBUG   observed: weave:ui:login:error
1446663009958   browserwindow.syncui   DEBUG   onLoginError: login=error.login.reason.network, sync=success.sync
1446663009958   browserwindow.syncui   DEBUG   _loginFailed has sync state=error.login.reason.network
1446663009960   Sync.BrowserIDManager   ERROR   Background fetch for key bundle failed: TokenServerClientServerError({"now":"2015-11-04T18:50:09.957Z","message":"Server error.","cause":"general","response_body":"{\"status\": \"error\", \"errors\": [\"The public_url setting doesn't match the application url.\\nThis will almost certainly cause authentication failures!\\n    public_url setting is: http://localhost:5000\\n    application url is:    http://192.168.1.87:5000\\nYou can disable this check by setting the force_wsgi_environ\\noption in your config file, but do so at your own risk.\"]}","response_headers":{"server":"gunicorn/19.1.1","date":"Wed, 04 Nov 2015 18:49:58 GMT","connection":"keep-alive","content-length":"373","content-type":"application/json; charset=UTF-8","x-weave-timestamp":"1446662998.91","x-timestamp":"1446662998"},"response_status":500}) (resource://gre/modules/services-common/tokenserverclient.js:36:36) JS Stack trace: @tokenserverclient.js:36:36 < @browserid_identity.js:14:1 < @status.js:15:1 < SyncServiceObserver.init@sync.js:76:62 < @sync.js:459:1 < require@bootstrap.js:137:7 < @main.js:30:1 < require@bootstrap.js:137:7 < startup@bootstrap.js:21:3 < XPI_callBootstrapMethod@XPIProvider.jsm:4774:9 < XPI_startup@XPIProvider.jsm:2484:13 < callProvider@AddonManager.jsm:221:12 < _startProvider@AddonManager.jsm:828:5 < AMI_startup@AddonManager.jsm:999:9 < AMP_startup@AddonManager.jsm:2672:5 < AMC_observe@addonManager.js:58:7
1446663009960   Sync.BrowserIDManager   ERROR   Could not authenticate: TokenServerClientServerError({"now":"2015-11-04T18:50:09.957Z","message":"Server error.","cause":"general","response_body":"{\"status\": \"error\", \"errors\": [\"The public_url setting doesn't match the application url.\\nThis will almost certainly cause authentication failures!\\n    public_url setting is: http://localhost:5000\\n    application url is:    http://192.168.1.87:5000\\nYou can disable this check by setting the force_wsgi_environ\\noption in your config file, but do so at your own risk.\"]}","response_headers":{"server":"gunicorn/19.1.1","date":"Wed, 04 Nov 2015 18:49:58 GMT","connection":"keep-alive","content-length":"373","content-type":"application/json; charset=UTF-8","x-weave-timestamp":"1446662998.91","x-timestamp":"1446662998"},"response_status":500}) (resource://gre/modules/services-common/tokenserverclient.js:36:36) JS Stack trace: @tokenserverclient.js:36:36 < @browserid_identity.js:14:1 < @status.js:15:1 < SyncServiceObserver.init@sync.js:76:62 < @sync.js:459:1 < require@bootstrap.js:137:7 < @main.js:30:1 < require@bootstrap.js:137:7 < startup@bootstrap.js:21:3 < XPI_callBootstrapMethod@XPIProvider.jsm:4774:9 < XPI_startup@XPIProvider.jsm:2484:13 < callProvider@AddonManager.jsm:221:12 < _startProvider@AddonManager.jsm:828:5 < AMI_startup@AddonManager.jsm:999:9 < AMP_startup@AddonManager.jsm:2672:5 < AMC_observe@addonManager.js:58:7
1446663009961   FirefoxAccounts   DEBUG   FxAccountsProfileClient: Requested profile
1446663009961   FirefoxAccounts   DEBUG   getOAuthToken enter
1446663009962   FirefoxAccounts   TRACE   getCachedToken returning cached token
1446663009962   FirefoxAccounts   DEBUG   getOAuthToken returning a cached token
1446663009964   browserwindow.syncui   DEBUG   observed: weave:service:login:error
1446663009964   browserwindow.syncui   DEBUG   onActivityStop with numActive: 1
1446663009964   browserwindow.syncui   DEBUG   _loginFailed has sync state=error.login.reason.network
1446663009964   Sync.SyncScheduler   DEBUG   Clearing sync triggers and the global score.
1446663009964   Sync.SyncScheduler   DEBUG   Next sync in 3600000 ms.
1446663009965   Sync.ErrorHandler   ERROR   Sync encountered a login error
QNAP TS-239Pro II+ w/ 2 x Samsung EcoGreen F4 2 TB (HD204UI) in JBOD |FW: 4.2.1
QNAP TS-469Pro w/ 4 x WD 3TB Red WD30EFRX in JBOD |FW: 4.2.1

User avatar
QNAP_Stephane
Experience counts
Posts: 3217
Joined: Wed Mar 27, 2013 1:00 am

Re: [ FireFox Sync Server ] [ 1.5 ] Browser synchronization

Post by QNAP_Stephane » Thu Nov 05, 2015 3:06 am

ouch...

may be open port 5000 or/and put public ip instead of localhost
--------------------------------------------------------------------------
QnapClub AppCenter - https://www.qnapclub.eu
--------------------------------------------------------------------------

User avatar
PJGM
Easy as a breeze
Posts: 254
Joined: Mon Aug 08, 2011 8:49 pm
Location: Portugal

Re: [ FireFox Sync Server ] [ 1.5 ] Browser synchronization

Post by PJGM » Thu Nov 05, 2015 4:32 am

QNAP_Stephane wrote:ouch...

may be open port 5000 or/and put public ip instead of localhost


Done it...but same result... :?
QNAP TS-239Pro II+ w/ 2 x Samsung EcoGreen F4 2 TB (HD204UI) in JBOD |FW: 4.2.1
QNAP TS-469Pro w/ 4 x WD 3TB Red WD30EFRX in JBOD |FW: 4.2.1

User avatar
PJGM
Easy as a breeze
Posts: 254
Joined: Mon Aug 08, 2011 8:49 pm
Location: Portugal

Re: [ FireFox Sync Server ] [ 1.5 ] Browser synchronization

Post by PJGM » Sat Nov 07, 2015 8:00 pm

Stephane,

Is working now :D

After install we need to do this steps:

1st- Open router 5000 port
2nd- Change identity.sync.tokenserver.uri to http://[public url]:5000/token/1.0/sync/1.5
3th- Edit syncserver.ini file and set/point the host (under [server:main]) to our private qnap ip
4th- Edit syncserver.ini file and set/point the public_url (under [syncserver]) to http://[public url]:5000/
5th- Restart sync server (or restart qnap)

Example of syncserver.ini file:

Code: Select all

[server:main]
use = egg:gunicorn
host = 192.168.1.87
port = 5000
workers = 2
timeout = 30

[app:main]
use = egg:syncserver

[syncserver]
# This must be edited to point to the public URL of your server,
# i.e. the URL as seen by Firefox.
public_url = http://[public url]:5000/

# This defines the database in which to store all server data.
#sqluri = sqlite:////tmp/syncserver.db

# This is a secret key used for signing authentication tokens.
# It should be long and randomly-generated.
# The following command will give a suitable value on *nix systems:
#
#    head -c 20 /dev/urandom | sha1sum
#
# If not specified then the server will generate a temporary one at startup.
#secret = INSERT_SECRET_KEY_HERE

# Set this to "false" to disable new-user signups on the server.
# Only request by existing accounts will be honoured.
# allow_new_users = false

# Set this to "true" to work around a mismatch between public_url and
# the application URL as seen by python, which can happen in certain reverse-
# proxy hosting setups.  It will overwrite the WSGI environ dict with the
# details from public_url.  This could have security implications if e.g.
# you tell the app that it's on HTTPS but it's really on HTTP, so it should
# only be used as a last resort and after careful checking of server config.
force_wsgi_environ = false

# Uncomment and edit the following to use a local BrowserID verifier
# rather than posting assertions to the mozilla-hosted verifier.
# Audiences should be set to your public_url without a trailing slash.
#[browserid]
#backend = tokenserver.verifiers.LocalVerifier
#audiences = https://localhost:5000


Additional note: By default the server will use an in-memory database for storage, meaning that any sync data will be lost on server restart. we will almost certainly want to configure a more permanent database, which can be done with the “sqluri” setting (under [syncserver])

I will try that change and post the feedback...

cheers
pjgm
QNAP TS-239Pro II+ w/ 2 x Samsung EcoGreen F4 2 TB (HD204UI) in JBOD |FW: 4.2.1
QNAP TS-469Pro w/ 4 x WD 3TB Red WD30EFRX in JBOD |FW: 4.2.1

firej
Starting out
Posts: 40
Joined: Sat Nov 14, 2015 5:56 pm

Re: [ FireFox Sync Server ] [ 1.5 ] Browser synchronization

Post by firej » Tue Mar 15, 2016 11:00 pm

What versions does play with? 27 and before? Where is the path for firefox sync?
QNAP TS-453 Pro with 2GB Ram
2x HGST HDN724030ALE640 2.73TB
(RAID1) - Static Single Volume 2.65TB
FW: QTS 4.3.3.0404

User avatar
bitstreamout
Starting out
Posts: 23
Joined: Tue Jun 21, 2016 1:09 am
Location: Germany

Re: [ FireFox Sync Server ] [ 1.5 ] Browser synchronization

Post by bitstreamout » Fri Apr 14, 2017 11:52 pm

It does not work ... I see always an Internal server error. Indeed the FireFoxSync is running, the "identity.sync.tokenserver.uri" is set to the internal FQDN + :5000/token/1.0/sync/1.5 of the my QNAP NAS. The "syncserver/syncserver.ini" is setup to the private IP of my QNAP NAS also the public_url is with FQDN or IP of my ANS + :5000/ ... nevertheless it does not work.
HS-251+

blubmaster199
New here
Posts: 6
Joined: Sat Oct 22, 2016 4:53 pm

Re: [ FireFox Sync Server ] [ 1.5 ] Browser synchronization

Post by blubmaster199 » Sat Feb 17, 2018 7:31 am

Hi...
I have the same problem. I am trying since 2 hours to bring it to work but without any success. I get everytime the same error:

Code: Select all

1518823063086   Sync.LogManager   DEBUG   Flushing file log
1518823063088   FirefoxAccounts   TRACE   not checking freshness of profile as it remains recent
1518823063104   Sync.LogManager   DEBUG   Log cleanup threshold time: 1517959063104
1518823063108   Sync.LogManager   DEBUG   Done deleting files.
1518823368484   Sync.ErrorHandler   DEBUG   Beginning user-triggered sync.
1518823368488   Sync.Service   DEBUG   User-Agent: Firefox/59.0 (Windows NT 10.0; Win64; x64) FxSync/1.61.0.20180215111455.desktop
1518823368488   Sync.Service   INFO   Starting sync at 2018-02-17 00:22:48 in browser session qMFtnj-myYLw
1518823368488   Sync.Service   DEBUG   In sync: should login.
1518823368488   Sync.Service   INFO   Logging in the user.
1518823368488   Sync.BrowserIDManager   INFO   Waiting for user to be verified.
1518823368488   FirefoxAccounts   DEBUG   already verified
1518823368488   Sync.BrowserIDManager   INFO   Starting fetch for key bundle.
1518823368488   FirefoxAccounts   DEBUG   already verified
1518823368488   Sync.BrowserIDManager   INFO   Getting an assertion from: http://10.0.10.34:5000/1.0/sync/1.5
1518823368488   FirefoxAccounts   DEBUG   enter getAssertion()
1518823368490   FirefoxAccounts   DEBUG   getKeypairAndCertificate: already have keyPair and certificate
1518823368490   FirefoxAccounts   DEBUG   getAssertionFromCert
1518823368490   FirefoxAccounts   DEBUG   getAssertionFromCert returning signed: true
1518823368490   Sync.BrowserIDManager   DEBUG   Getting a token
1518823368490   Services.Common.TokenServerClient   DEBUG   Beginning BID assertion exchange: http://10.0.10.34:5000/1.0/sync/1.5
1518823368490   Services.Common.RESTRequest   DEBUG   GET request to http://10.0.10.34:5000/1.0/sync/1.5
1518823368490   Services.Common.RESTRequest   TRACE   HTTP Header accept: application/json
1518823368490   Services.Common.RESTRequest   TRACE   HTTP Header authorization: ***** (suppressed)
1518823368490   Services.Common.RESTRequest   TRACE   HTTP Header x-client-state: 99372c43f790756d922ed73c06f883ef
1518823369492   Services.Common.RESTRequest   TRACE   onStartRequest: GET http://10.0.10.34:5000/1.0/sync/1.5
1518823369494   Services.Common.RESTRequest   TRACE   Channel for GET http://10.0.10.34:5000/1.0/sync/1.5 returned status code 2152398861
1518823369494   Services.Common.RESTRequest   DEBUG   GET http://10.0.10.34:5000/1.0/sync/1.5 failed: 2152398861 - NS_ERROR_CONNECTION_REFUSED
1518823369494   Sync.BrowserIDManager   ERROR   Non-authentication error in _fetchTokenForUser: TokenServerClientNetworkError({"error":{}}) (resource://services-common/tokenserverclient.js:38:36) JS Stack trace: TokenServerClientNetworkError@tokenserverclient.js:62:16 < onResponse@tokenserverclient.js:269:12 < onStopRequest@rest.js:485:7
1518823369494   Sync.Status   DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1518823369494   Sync.Status   DEBUG   Status.service: error.login.failed => error.login.failed
1518823369494   Sync.BrowserIDManager   ERROR   Background fetch for key bundle failed: TokenServerClientNetworkError({"error":{}}) (resource://services-common/tokenserverclient.js:38:36) JS Stack trace: TokenServerClientNetworkError@tokenserverclient.js:62:16 < onResponse@tokenserverclient.js:269:12 < onStopRequest@rest.js:485:7
1518823369494   Sync.BrowserIDManager   ERROR   Could not authenticate: TokenServerClientNetworkError({"error":{}}) (resource://services-common/tokenserverclient.js:38:36) JS Stack trace: TokenServerClientNetworkError@tokenserverclient.js:62:16 < onResponse@tokenserverclient.js:269:12 < onStopRequest@rest.js:485:7
1518823369494   Sync.BrowserIDManager   INFO   currentAuthState returning error.login.reason.network due to previous failure
1518823369494   Sync.Status   DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1518823369494   Sync.Status   DEBUG   Status.service: error.login.failed => error.login.failed
1518823369494   Sync.ErrorHandler   ERROR   Sync encountered a login error
1518823369494   Sync.SyncScheduler   DEBUG   Clearing sync triggers and the global score.
1518823369494   Sync.SyncScheduler   DEBUG   Next sync in 3600000 ms. (why=schedule)
1518823369496   Sync.Service   DEBUG   Exception calling WrappedLock: TokenServerClientNetworkError({"error":{}}) (resource://services-common/tokenserverclient.js:38:36) JS Stack trace: TokenServerClientNetworkError@tokenserverclient.js:62:16 < onResponse@tokenserverclient.js:269:12 < onStopRequest@rest.js:485:7
1518823369496   Sync.Service   DEBUG   Not syncing: login returned false.


Settings:

Code: Select all

[server:main]
use = egg:gunicorn
host = 10.0.10.34
port = 5000
workers = 2
timeout = 30

[app:main]
use = egg:syncserver

[syncserver]
public_url = http://localhost:5000/

sqluri = sqlite://sync:password@localhost:3306/syncserver


The strange is... NMap is not showing the Port 5000 as open..
Any idea?

PatchPanel
New here
Posts: 4
Joined: Mon May 28, 2018 6:48 am

Re: [ FireFox Sync Server ] [ 1.5 ] Browser synchronization

Post by PatchPanel » Mon May 28, 2018 7:31 am

Hi,

any news on this topic ?
Does anybody has success in syncing ?

may be open port 5000

How do I do that ?

Here's my sync log with a NS_ERROR_CONNECTION_REFUSED message.

Code: Select all

[...]
1527460673985   Sync.Service   INFO   Starting sync at 2018-05-28 00:37:53 in browser session 7jmxUoPJ4pJu
1527460673986   Sync.Service   DEBUG   In sync: should login.
1527460673986   Sync.Service   INFO   User logged in successfully - verifying login.
1527460673987   Sync.BrowserIDManager   DEBUG   unlockAndVerifyAuthState already has (or can fetch) sync keys
1527460673987   Sync.Status   DEBUG   Status.login: error.login.reason.network => success.status_ok
1527460673987   Sync.Status   DEBUG   Status.service: error.login.failed => error.login.failed
1527460673987   Sync.Service   DEBUG   Fetching unlocked auth state returned success.status_ok
1527460673987   Sync.BrowserIDManager   INFO   Getting keys
1527460673987   Sync.BrowserIDManager   INFO   Getting an assertion from: https://192.168.100.9:5000/token/1.0/sync/1.5
1527460673987   FirefoxAccounts   DEBUG   enter getAssertion()
1527460673988   FirefoxAccounts   DEBUG   getKeypairAndCertificate: already have keyPair and certificate
1527460673988   FirefoxAccounts   DEBUG   getAssertionFromCert
1527460673989   FirefoxAccounts   DEBUG   getAssertionFromCert returning signed: true
1527460673989   Sync.BrowserIDManager   DEBUG   Getting a token
1527460673989   Services.Common.TokenServerClient   DEBUG   Beginning BID assertion exchange: https://192.168.100.9:5000/token/1.0/sync/1.5
1527460673989   Services.Common.RESTRequest   DEBUG   GET request to https://192.168.100.9:5000/token/1.0/sync/1.5
1527460673989   Services.Common.RESTRequest   TRACE   HTTP Header accept: application/json
1527460673989   Services.Common.RESTRequest   TRACE   HTTP Header authorization: ***** (suppressed)
1527460673989   Services.Common.RESTRequest   TRACE   HTTP Header x-client-state: 24fcaa38c1676688a9e85c486e296539
1527460674990   Services.Common.RESTRequest   TRACE   onStartRequest: GET https://192.168.100.9:5000/token/1.0/sync/1.5
1527460674991   Services.Common.RESTRequest   TRACE   Channel for GET https://192.168.100.9:5000/token/1.0/sync/1.5 returned status code 2152398861
1527460674991   Services.Common.RESTRequest   DEBUG   GET https://192.168.100.9:5000/token/1.0/sync/1.5 failed: 2152398861 - NS_ERROR_CONNECTION_REFUSED
1527460674991   Sync.BrowserIDManager   ERROR   Non-authentication error in _fetchTokenForUser: TokenServerClientNetworkError({"error":{}}) (resource://services-common/tokenserverclient.js:36:36) JS Stack trace: TokenServerClientNetworkError@tokenserverclient.js:59:16
getTokenFromBrowserIDAssertion/response</<@tokenserverclient.js:245:22
onStopRequest@rest.js:483:7
1527460674991   Sync.Status   DEBUG   Status.login: success.status_ok => error.login.reason.network
1527460674991   Sync.Status   DEBUG   Status.service: error.login.failed => error.login.failed
1527460674991   Sync.BrowserIDManager   INFO   Failed to fetch the cluster URL: TokenServerClientNetworkError({"error":{}}) (resource://services-common/tokenserverclient.js:36:36) JS Stack trace: TokenServerClientNetworkError@tokenserverclient.js:59:16
getTokenFromBrowserIDAssertion/response</<@tokenserverclient.js:245:22
onStopRequest@rest.js:483:7
1527460674992   Sync.Service   DEBUG   verifyLogin failed: TokenServerClientNetworkError({"error":{}}) (resource://services-common/tokenserverclient.js:36:36) JS Stack trace: TokenServerClientNetworkError@tokenserverclient.js:59:16
getTokenFromBrowserIDAssertion/response</<@tokenserverclient.js:245:22
onStopRequest@rest.js:483:7
1527460674992   Sync.Status   DEBUG   Status.login: error.login.reason.network => error.login.reason.network
1527460674992   Sync.Status   DEBUG   Status.service: error.login.failed => error.login.failed
1527460674992   Sync.ErrorHandler   ERROR   Sync encountered a login error
1527460674992   Sync.SyncScheduler   DEBUG   Clearing sync triggers and the global score.
1527460674993   Sync.SyncScheduler   DEBUG   Next sync in 3600000 ms. (why=schedule)
1527460674996   Sync.Service   DEBUG   Exception calling WrappedLock: Error: Login failed: error.login.reason.network (resource://services-sync/service.js:853:15) JS Stack trace: onNotify@service.js:853:15
1527460674996   Sync.Service   DEBUG   Not syncing: login returned false.
[...]


Any idea ?

best regards
PatchPanel

Post Reply

Return to “Community Apps”