ngocchung75 / MHST2013-14

MHST2013-14 - Nghiên cứu triển khai một hệ thống MOOC cho Việt Nam
13 stars 11 forks source link

Error message displays after logging in by Facebook ID #4

Closed hoadh closed 11 years ago

hoadh commented 11 years ago

Steps:

  1. Visit http://103.7.177.250:8000
  2. Go to Login page
  3. Click Facebook link
  4. Enter valid Facebook account with email and password

Observed: Error message displays. See the following screenshot and traceback for more details !

Screenshot: 2013-08-21-231449_1366x768_scrot

Traceback:

Environment:

Request Method: GET
Request URL: http://103.7.177.250:8000/complete/facebook/?redirect_state=SsK0d4M01hLiSSOj0jJTpZoOGmLw1gkR&code=AQCPEEsnXpXmgFM5JHlCEi_L4cgz7ijmy0guoF6Q5UGc3kaEfUoC3bwZw6AdJhgDGST8jYouJQtc41APckxymsdX6f2Lc4_Gcl2dNp3GvCb5zW0kcG3tQP0eg8zcQibv8mAcfMsU8jvFFnsBpypsIGnGFvIfju8zR3lj_32TjTd768RvEgEWG5sCvf7glOUWyOUMdxFzNonNTTttyq3sF5yPz_m5hi_T_slU6BNKWivUSSZsMdnJAGz4tNmN_98KbyoW37eYswofg1ze-g_9OS7noABVPJT6IrRQUR6B6wvu9zMdazW44R3qtnfDFdNVQUo&state=SsK0d4M01hLiSSOj0jJTpZoOGmLw1gkR

Django Version: 1.4.5
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.humanize',
 'django.contrib.messages',
 'django.contrib.sessions',
 'django.contrib.sites',
 'djcelery',
 'south',
 'social_auth',
 'service_status',
 'mitxmako',
 'pipeline',
 'staticfiles',
 'static_replace',
 'circuit',
 'courseware',
 'perfstats',
 'student',
 'static_template_view',
 'staticbook',
 'track',
 'util',
 'certificates',
 'instructor',
 'instructor_task',
 'open_ended_grading',
 'psychometrics',
 'licenses',
 'course_groups',
 'external_auth',
 'django_openid_auth',
 'wiki',
 'django_notify',
 'course_wiki',
 'mptt',
 'sekizai',
 'wiki.plugins.links',
 'wiki.plugins.notifications',
 'course_wiki.plugins.markdownedx',
 'foldit',
 'django.contrib.admin',
 'debug',
 'django_comment_client',
 'django_comment_common',
 'notes',
 'lms_migration',
 'external_auth',
 'django_openid_auth',
 'debug_toolbar',
 'debug_toolbar_mongo')
Installed Middleware:
('contentserver.middleware.StaticContentServer',
 'request_cache.middleware.RequestCache',
 'django_comment_client.middleware.AjaxExceptionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'cache_toolbox.middleware.CacheBackedAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'track.middleware.TrackMiddleware',
 'mitxmako.middleware.MakoMiddleware',
 'course_wiki.course_nav.Middleware',
 'django.middleware.transaction.TransactionMiddleware',
 'django_comment_client.utils.ViewNameMiddleware',
 'codejail.django_integration.ConfigureCodeJailMiddleware',
 'student.middleware.AuthCanceledSocialAuthExceptionMiddleware',
 'django_comment_client.utils.QueryCountDebugMiddleware',
 'debug_toolbar.middleware.DebugToolbarMiddleware')

Traceback:
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
  77.         return view_func(*args, **kwargs)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django_social_auth-0.7.12-py2.7.egg/social_auth/decorators.py" in wrapper
  29.             return func(request, request.social_auth_backend, *args, **kwargs)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django_social_auth-0.7.12-py2.7.egg/social_auth/views.py" in complete
  41.         return complete_process(request, backend, *args, **kwargs)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django_social_auth-0.7.12-py2.7.egg/social_auth/views.py" in complete_process
  101.     user = auth_complete(request, backend, *args, **kwargs)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django_social_auth-0.7.12-py2.7.egg/social_auth/views.py" in auth_complete
  183.     return backend.auth_complete(user=user, request=request, *args, **kwargs)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django_social_auth-0.7.12-py2.7.egg/social_auth/backends/facebook.py" in auth_complete
  146.             return self.do_auth(access_token, expires=expires, *args, **kwargs)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django_social_auth-0.7.12-py2.7.egg/social_auth/backends/facebook.py" in do_auth
  188.         return authenticate(*args, **kwargs)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in authenticate
  45.             user = backend.authenticate(**credentials)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django_social_auth-0.7.12-py2.7.egg/social_auth/backends/__init__.py" in authenticate
  111.         out = self.pipeline(pipeline, *args, **kwargs)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django_social_auth-0.7.12-py2.7.egg/social_auth/backends/__init__.py" in pipeline
  140.                 result = func(*args, **out) or {}
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django_social_auth-0.7.12-py2.7.egg/social_auth/backends/pipeline/user.py" in create_user
  49.                                            email=details.get('email')),
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django_social_auth-0.7.12-py2.7.egg/social_auth/db/base.py" in create_user
  114.                                                     email=email)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django/contrib/auth/models.py" in create_user
  160.         user.save(using=self._db)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django/db/models/base.py" in save
  463.         self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django/db/models/base.py" in save_base
  551.                 result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django/db/models/manager.py" in _insert
  203.         return insert_query(self.model, objs, fields, **kwargs)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django/db/models/query.py" in insert_query
  1593.     return query.get_compiler(using=using).execute_sql(return_id)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
  912.             cursor.execute(sql, params)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute
  40.             return self.cursor.execute(sql, params)
File "/home/sv/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py" in execute
  344.             return Database.Cursor.execute(self, query, params)

Exception Type: IntegrityError at /complete/facebook/
Exception Value: column email is not unique
ghost commented 11 years ago

Lỗi này đã fix

hoadh commented 11 years ago

Chưa fix được nhé Hùng. Anh mới gởi account (mà anh dùng và gặp lỗi) qua email em và Chung. Em thử xem có gặp không nhé.

ngocchung75 commented 11 years ago

Bug đã được fix trên server. Và đã test thành công với nhiều tài khoản. Hòa check lại close bug nhé. http://edx.dtu.vn:8000/login