question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot login to default admin account

See original GitHub issue

After deploying Doccano, I can’t login to the default admin account. The server returns “Wrong password or username” message. I tried both installing with Heroku button and installing docker or docker-compose on AWS Linux / AWS Ubuntu and receive the same error log below. It seems related to azuread_tenant.py.

How to reproduce the problem

I tried both installing with Heroku button and installing docker or docker-compose on AWS Linux.

Internal Server Error: /v1/auth-token
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 497, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 457, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 468, in raise_uncaught_exception
    raise exc
  File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 494, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/rest_framework/authtoken/views.py", line 44, in post
    serializer.is_valid(raise_exception=True)
  File "/usr/local/lib/python3.8/site-packages/rest_framework/serializers.py", line 235, in is_valid
    self._validated_data = self.run_validation(self.initial_data)
  File "/usr/local/lib/python3.8/site-packages/rest_framework/serializers.py", line 433, in run_validation
    value = self.validate(value)
  File "/usr/local/lib/python3.8/site-packages/rest_framework/authtoken/serializers.py", line 20, in validate
    user = authenticate(request=self.context.get('request'),
  File "/usr/local/lib/python3.8/site-packages/django/contrib/auth/__init__.py", line 66, in authenticate
    for backend, backend_path in _get_backends(return_tuples=True):
  File "/usr/local/lib/python3.8/site-packages/django/contrib/auth/__init__.py", line 27, in _get_backends
    backend = load_backend(backend_path)
  File "/usr/local/lib/python3.8/site-packages/django/contrib/auth/__init__.py", line 21, in load_backend
    return import_string(path)()
  File "/usr/local/lib/python3.8/site-packages/django/utils/module_loading.py", line 17, in import_string
    module = import_module(module_path)
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/lib/python3.8/site-packages/social_core/backends/azuread_tenant.py", line 6, in <module>
    from jwt import DecodeError, ExpiredSignature, decode as jwt_decode
ImportError: cannot import name 'ExpiredSignature' from 'jwt' (/usr/local/lib/python3.8/site-packages/jwt/__init__.py)

Your Environment

  • Operating System: Amazon Linux 2
  • Python Version Used: 3.8
  • When you install doccano: yesterday
  • How did you install doccano (Heroku button etc): docker, docker-compose, Heroku button

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
Code4SAFrankiecommented, Dec 24, 2020

Did a .\python.exe -m pip install --upgrade pyjwt==1.4.0 and python manage.py migrate python manage.py create_roles python manage.py create_admin --noinput --username "admin" --email "admin@example.com" --password "password" python manage.py runserver and http://127.0.0.1:8000/admin after that the following worked .\doccano.exe --username admin --password password

2reactions
zenggocommented, Dec 24, 2020

Same problem here.

It may because the PyJWT version is incompatible, refer to this issue of social_core

I fix it by adding PyJWT>=1.4.0,<2 to the doccano/app/requirements.txt.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't Login as Administrator - Microsoft Community
1) Press Shift and Restart from the power icon (together) · 2) Select Troubleshoot. · 3) Go to Advanced Options. · 4) Select...
Read more >
Can't sign in to the Admin console - Google Support
If you signed up your domain for Google Workspace, Cloud Identity, or another managed account, you're an admin of that account. To access...
Read more >
Updated to High Sierra, all Admin … | Apple Developer Forums
If you're unable to login at startup using username: root and empty password, then login with your existing account (standard user). Again, head...
Read more >
User Accounts - Google Search Appliance Admin Console Help
You cannot delete the default account. You can change the password for the admin account. Administrators and managers have access to different search ......
Read more >
Admin account - AWS Directory Service
Permissions granted to the AWS Managed Microsoft AD admin account. ... AWS Domain Administrators have full administrative access to all domains hosted on ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found