Current syncserver crashes with InterfaceError

RESOLVED WORKSFORME

Status

Cloud Services
Server: Sync
RESOLVED WORKSFORME
6 years ago
6 years ago

People

(Reporter: talchas, Assigned: rfkelly)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Build ID: 20111220165912

Steps to reproduce:

hg clone https://hg.mozilla.org/services/server-full
make build
(and then to work around missing pysqlite dependency as noted by https://groups.google.com/forum/#!topic/mozilla-services-dev/HLOx116beKk)
bin/pip install -i http://pypi.python.org/simple pysqlite

Then open firefox (9.0.1)/Set Up Sync, pass in my address




Actual results:

The server gives this crash:
2012-01-25 15:46:46,386 ERROR [syncserver] bf6913a2e0fb0fcc150409ea3c59e825
bf6913a2e0fb0fcc150409ea3c59e825
2012-01-25 15:46:46,386 ERROR [syncserver] Traceback (most recent call last):
  File "/home/ben/firefox-sync-server/deps/server-core/services/util.py", line 304, in __call__
    return self.app(environ, start_response)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/paste/translogger.py", line 68, in __call__
    return self.application(environ, replacement_start_response)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/ben/firefox-sync-server/deps/server-core/services/baseapp.py", line 187, in __notified
    response = func(self, request)
  File "/home/ben/firefox-sync-server/deps/server-core/services/baseapp.py", line 221, in __call__
    response = self._dispatch_request(request)
  File "/home/ben/firefox-sync-server/deps/server-core/services/baseapp.py", line 273, in _dispatch_request
    response = self._dispatch_request_with_match(request, match)
  File "/home/ben/firefox-sync-server/deps/server-core/services/baseapp.py", line 299, in _dispatch_request_with_match
    result = function(request, **params)
  File "/home/ben/firefox-sync-server/deps/server-reg/syncreg/controllers/user.py", line 98, in user_exists
    uid = self.auth.get_user_id(request.user)
  File "/home/ben/firefox-sync-server/deps/server-core/services/auth/sql.py", line 116, in get_user_id
    user_name=user_name).fetchone()
  File "/home/ben/firefox-sync-server/deps/server-core/services/util.py", line 335, in safe_execute
    return engine.execute(*args, **kwargs)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1788, in execute
    return connection.execute(statement, *multiparams, **params)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1191, in execute
    params)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1271, in _execute_clauseelement
    return self.__execute_context(context)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1302, in __execute_context
    context.parameters[0], context=context)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1401, in _cursor_execute
    context)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1394, in _cursor_execute
    context)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 299, in do_execute
    cursor.execute(statement, parameters)
InterfaceError: (InterfaceError) Error binding parameter 0 - probably unsupported type. u'SELECT users.id \nFROM users \nWHERE users.username = ?' ({'username': u'a', 'userid': None},)

Traceback (most recent call last):
  File "/home/ben/firefox-sync-server/deps/server-core/services/util.py", line 304, in __call__
    return self.app(environ, start_response)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/paste/translogger.py", line 68, in __call__
    return self.application(environ, replacement_start_response)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/ben/firefox-sync-server/deps/server-core/services/baseapp.py", line 187, in __notified
    response = func(self, request)
  File "/home/ben/firefox-sync-server/deps/server-core/services/baseapp.py", line 221, in __call__
    response = self._dispatch_request(request)
  File "/home/ben/firefox-sync-server/deps/server-core/services/baseapp.py", line 273, in _dispatch_request
    response = self._dispatch_request_with_match(request, match)
  File "/home/ben/firefox-sync-server/deps/server-core/services/baseapp.py", line 299, in _dispatch_request_with_match
    result = function(request, **params)
  File "/home/ben/firefox-sync-server/deps/server-reg/syncreg/controllers/user.py", line 98, in user_exists
    uid = self.auth.get_user_id(request.user)
  File "/home/ben/firefox-sync-server/deps/server-core/services/auth/sql.py", line 116, in get_user_id
    user_name=user_name).fetchone()
  File "/home/ben/firefox-sync-server/deps/server-core/services/util.py", line 335, in safe_execute
    return engine.execute(*args, **kwargs)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1788, in execute
    return connection.execute(statement, *multiparams, **params)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1191, in execute
    params)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1271, in _execute_clauseelement
    return self.__execute_context(context)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1302, in __execute_context
    context.parameters[0], context=context)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1401, in _cursor_execute
    context)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1394, in _cursor_execute
    context)
  File "/home/ben/firefox-sync-server/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 299, in do_execute
    cursor.execute(statement, parameters)
InterfaceError: (InterfaceError) Error binding parameter 0 - probably unsupported type. u'SELECT users.id \nFROM users \nWHERE users.username = ?' ({'username': u'a', 'userid': None},)


and firefox thinks the server is invalid.


Expected results:

No exceptions thrown (not passing User to things expecting user_name strings).

Updated

6 years ago
Component: General → Server: Sync
QA Contact: general → sync-server
(Assignee)

Updated

6 years ago
Assignee: nobody → rfkelly
(Assignee)

Comment 1

6 years ago
Thanks for the report, a couple of questions to get me up to speed:

1) can you confirm whether this happens with a fresh checkout of server-full from mercurial?
2) what command are you using to run the server?
(Reporter)

Comment 2

6 years ago
This has been fixed at some point, I'm not sure exactly when.

I'm pretty sure I was using "bin/python2.7 bin/paster serve development.ini"
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.