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.

[BUG] Error after connecting Admin account

See original GitHub issue

Describe the bug

could not connect, so checked logs, there were a lot of errors, and all of them were AccountDB has no attribute something.

for example 22-01-14 13:21:17 |Portal| [EE] 'AccountDB' object has no attribute 'at_init' (error logged on other side)

22-01-14 13:21:19  |Portal| [EE] AMP Error from AdminPortal2Server: Traceback (most recent call last):
22-01-14 13:21:19  |Portal| [EE] Failure: builtins.Exception: 'AccountDB' object has no attribute 'at_disconnect' (error logged on other side)
22-01-14 13:21:19  |Portal| [EE]  'AccountDB' object has no attribute 'at_disconnect' (error logged on other side)

22-01-14 15:33:58 [::] Traceback (most recent call last):
22-01-14 15:33:58 [::]   File "/home/godfather/evennia/evennia/server/sessionhandler.py", line 853, in call_inputfuncs
22-01-14 15:33:58 [::]     _INPUT_FUNCS[cname](session, *cmdargs, **cmdkwargs)
22-01-14 15:33:58 [::]   File "/home/godfather/evennia/evennia/server/inputfuncs.py", line 84, in text
22-01-14 15:33:58 [::]     txt = session.account.nicks.nickreplace(
22-01-14 15:33:58 [::] AttributeError: 'AccountDB' object has no attribute 'nicks'
22-01-14 15:49:43 [SS] Authentication Success: username(account 2) (IP: 127.0.0.1).
22-01-14 15:49:43 [..] Logged in: username(account 2) 127.0.0.1 (1 session(s) total)

To Reproduce

Steps to reproduce the behavior: I am just following ‘Getting Started’ guide for Linux, I successfully made an account, but when I tried connecting the admin account it would return an error.(client side)

Traceback (most recent call last):
  File "/home/godfather/evennia/evennia/commands/cmdhandler.py", line 644, in _run_command
    ret = cmd.func()
  File "/home/godfather/evennia/evennia/commands/default/unloggedin.py", line 151, in func
    session.sessionhandler.login(session, account)
  File "/home/godfather/evennia/evennia/server/sessionhandler.py", line 506, in login
    account.at_init()
AttributeError: 'AccountDB' object has no attribute 'at_init'

I can however login using the admin dashboard website. Also normal user account works just fine, but I can still see the “has no attribute” error in the Evennia server logs

Expected behavior

Admin accounts should connect. there shouldn’t be those “has no attributes” errors

Environment, Evennia version, OS etc


    Evennia 0.9.5 (rev fa79110ba) (rev fa79110ba)
    OS: posix
    Python: 3.10.1
    Twisted: 21.7.0
    Django: 3.2.11
    

OS is Arch Linux.

Additional context

❯ evennia start -l
   Tailing logfiles /home/godfather/Code/muddev/mygame/server/logs/server.log and portal.log (Ctrl-C to exit) ...
 [Devel: settings.IN_GAME_ERRORS is True. Turn off in production.]
 [Devel: settings.ALLOWED_HOSTS set to '*' (all). Limit in production.]
Portal starting ...
22-01-14 12:44:39  |Portal| Loading /home/godfather/evennia/evennia/server/portal/portal.py...
22-01-14 12:44:40  |Portal| Loaded.
22-01-14 12:44:40  |Portal| twistd 21.7.0 (/usr/bin/python 3.10.1) starting up.
22-01-14 12:44:40  |Portal| reactor class: twisted.internet.epollreactor.EPollReactor.
22-01-14 12:44:40  |Portal| AMP starting on 4006
22-01-14 12:44:40  |Portal| Telnet starting on 4000
22-01-14 12:44:40  |Portal| Websocket starting on 4002
22-01-14 12:44:40  |Portal| Webserver-proxy starting on 4001
... Portal started.
Server starting  ...
... Server started.
Evennia running.
------------------------ Evennia ---
mygame Portal 0.9.5 (rev fa79110ba)
    external ports:
        telnet: 4000
        webserver-proxy: 4001
        webclient-websocket: 4002
    internal_ports (to Server):
        webserver: 4005
        amp: 4006

mygame Server 0.9.5 (rev fa79110ba)
    internal ports (to Portal):
        webserver: 4005
        amp : 4006
------------------------------------
22-01-14 12:44:40  |Portal| Portal starting server ... 
22-01-14 12:44:40 Loading /home/godfather/evennia/evennia/server/server.py...
22-01-14 12:44:40 Loaded.
22-01-14 12:44:40 twistd 21.7.0 (/usr/bin/python 3.10.1) starting up.
22-01-14 12:44:40 reactor class: twisted.internet.epollreactor.EPollReactor.
22-01-14 12:44:40 Webserver starting on 4005
22-01-14 12:44:40 Evennia Server successfully started.
22-01-14 12:46:09  |Portal| Timing out client: IPv4Address(type='TCP', host='127.0.0.1', port=42018)
22-01-14 12:46:09 [SS] Authentication Success: gAdmin(account 3) (IP: 127.0.0.1).
22-01-14 12:46:09 [::] Traceback (most recent call last):
22-01-14 12:46:09 [::]   File "/home/godfather/evennia/evennia/commands/cmdhandler.py", line 644, in _run_command
22-01-14 12:46:09 [::]     ret = cmd.func()
22-01-14 12:46:09 [::]   File "/home/godfather/evennia/evennia/commands/default/unloggedin.py", line 151, in func
22-01-14 12:46:09 [::]     session.sessionhandler.login(session, account)
22-01-14 12:46:09 [::]   File "/home/godfather/evennia/evennia/server/sessionhandler.py", line 506, in login
22-01-14 12:46:09 [::]     account.at_init()
22-01-14 12:46:09 [::] AttributeError: 'AccountDB' object has no attribute 'at_init'
22-01-14 12:46:09 [EE] User input was: 'connect gAdmin FAKEpassword'.

CLIENT->

❯ telnet 127.0.0.1 4000
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

==============================================================
 Welcome to mygame, version 0.9.5!

 If you have an existing account, connect to it by typing:
      connect <username> <password>
 If you need to create an account, type (without the <>'s):
      create <username> <password>

 Enter help for more info. look will re-show this screen.
==============================================================
connect gAdmin FAKEpassword
Traceback (most recent call last):
  File "/home/godfather/evennia/evennia/commands/cmdhandler.py", line 644, in _run_command
    ret = cmd.func()
  File "/home/godfather/evennia/evennia/commands/default/unloggedin.py", line 151, in func
    session.sessionhandler.login(session, account)
  File "/home/godfather/evennia/evennia/server/sessionhandler.py", line 506, in login
    account.at_init()
AttributeError: 'AccountDB' object has no attribute 'at_init'

An untrapped error occurred.
(Traceback was logged 22-01-14 12:46:09).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
strikacocommented, Jan 14, 2022

Unrelated, but this sort of leakage in logs is not ideal:

22-01-14 12:46:09 [EE] User input was: 'connect gAdmin FAKEpassword'.

0reactions
Griatchcommented, Sep 22, 2022

Additional accounts created using createsuperuser will not be setup correctly (the first account works, but this is normally created automatically). This is now blocked to avoid this confusion.

Read more comments on GitHub >

github_iconTop Results From Across the Web

You receive an "Administrators only" error message in ...
Cause · You are not logged on as a user who belongs to the local Administrators group. · You do not have permission...
Read more >
App can't open using Built-in Administrator Account [Solved]
4. In the right pane, right-click on User Account Control: Admin Approval Mode for the Built-in Administrator account and select Properties.
Read more >
Can't sign in to the Admin console - Google Support
If you get this error when signing in to your Admin console, the Google Workspace or Cloud Identity account has been deactivated or...
Read more >
Logon Failure error occurs when a non-administrator domain ...
This issue occurs because the Backup Exec SQL instance, by default, doesn't allow any non-administrative user to access it. Solution. Give the domain/local...
Read more >
How to Fix Windows 10 Login Problems [EXPERT GUIDE]
The first thing you should immediately try is restarting your computer. If you can get to the log in screen, click on the...
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