Testing REGISTER command without creating an account

Testing REGISTER command without creating an account

Discuss development of lobby clients, server, autohosts and auto-download software.

Moderators: Moderators, Lobby Developers

Post Reply
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Testing REGISTER command without creating an account

Post by MasterBel2 »

Subject should say it all. Is this possible? I don't want to have to create half a dozen new accounts just to test my lobby.

The alternative is that I nag someone to delete the accounts after creating them, but I don't want to be a nuisance.

EDIT: I'm having another go at getting uberserver working on my computer, so I can test on a private server. I'll still want to test compatability on the official server though.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Testing REGISTER command without creating an account

Post by gajop »

uberserver *is* the official server, there should be no difference in behavior. besides, don't worry about creating a few extra accounts, they'll get pruned eventually.
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Testing REGISTER command without creating an account

Post by MasterBel2 »

no problem, thanks!
User avatar
TurBoss
Jauria RTS Developer
Posts: 89
Joined: 27 Jan 2014, 01:04

Re: Testing REGISTER command without creating an account

Post by TurBoss »

other solution is to deploy our own uberserver for testing propourses

very easy with python 3

https://github.com/spring/uberserver
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: Testing REGISTER command without creating an account

Post by jamerlan »

or write your own lobby server (trollface)
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Testing REGISTER command without creating an account

Post by MasterBel2 »

I considered that jamerlan.

@TurBoss, I've previously spent hours trying to set it up but I run into issue after issue. However, before that I had it working. Why did I ever uninstall…

I'll get something working eventually. Thanks.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Testing REGISTER command without creating an account

Post by gajop »

Can you be more descriptive about your issues (if you want help getting them solved)? Uberserver install should be straightforward if you follow the instructions.
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Testing REGISTER command without creating an account

Post by MasterBel2 »

Well for starters, it looks like it's caught in the middle of a migration to python 3, so I had to go back a few versions to the one before the update to python 3 started.

I get this error when trying to start the server:

Code: Select all

Traceback (most recent call last):
  File "./server.py", line 16, in <module>
    from DataHandler import DataHandler
  File "/Users/foo/uberserver-master/DataHandler.py", line 12, in <module>
    from twisted.internet import ssl
  File "/Users/foo/virtenvs/uberserver/lib/python2.7/site-packages/twisted/internet/ssl.py", line 59, in <module>
    from OpenSSL import SSL
  File "/Users/foo/virtenvs/uberserver/lib/python2.7/OpenSSL/__init__.py", line 36, in <module>
    from OpenSSL import crypto
ImportError: dlopen(/Users/foo/virtenvs/uberserver/lib/python2.7/OpenSSL/crypto.so, 10): Symbol not found: _PyUnicodeUCS2_Decode
  Referenced from: /Users/foo/virtenvs/uberserver/lib/python2.7/OpenSSL/crypto.so
  Expected in: flat namespace
 in /Users/foo/virtenvs/uberserver/lib/python2.7/OpenSSL/crypto.so
The first time I got uberserver working I didn't have to worry about this. Terminal assures me pycrypto is installed, so I really don't know what's going on here.
User avatar
TurBoss
Jauria RTS Developer
Posts: 89
Joined: 27 Jan 2014, 01:04

Re: Testing REGISTER command without creating an account

Post by TurBoss »

Hi

seems that there are some bugs on new installs
User avatar
TurBoss
Jauria RTS Developer
Posts: 89
Joined: 27 Jan 2014, 01:04

Re: Testing REGISTER command without creating an account

Post by TurBoss »

Please can you test with this branch :

https://github.com/TurBoss/uberserver/tree/ServerPEM

remember to create your virtual env with

Code: Select all

virtualenv -p python3.X venv_name
where X is your python 3 version

i'm goin to freeze the virtual env so install all the deps should be more easy
User avatar
TurBoss
Jauria RTS Developer
Posts: 89
Joined: 27 Jan 2014, 01:04

Re: Testing REGISTER command without creating an account

Post by TurBoss »

got merged into mainstream so you can just grab de official repo
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Testing REGISTER command without creating an account

Post by abma »

Subject should say it all. Is this possible? I don't want to have to create half a dozen new accounts just to test my lobby.

The alternative is that I nag someone to delete the accounts after creating them, but I don't want to be a nuisance.
FYI: unused accounts gets "automaticly" deleted, so no worries...

https://github.com/spring/uberserver/bl ... rs.py#L750
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Testing REGISTER command without creating an account

Post by MasterBel2 »

Thanks everyone, I have both register and uberserver working.

@TurBoss:

Code: Select all

  File "/Users/foo/uberserver-master/DataHandler.py", line 91, in _fk_pragma_on_connect
    dbapi_con.execute('PRAGMA synchronous = OFF')
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) Safety level may not be changed inside a transaction
This can be fixed by commenting out the line it's protesting about. Currently I can't find any issue that arises because of this. I couldn't get the server running until that line was commented out.

I also frequently get this (or similar) error (not fatal):

Code: Select all

------------------------------------------------------------
Error in handling data from client: name 'unicode' is not defined, b'k=disabled\tgame/startpostype=0\t\n#21 MYBATTLESTATUS 4195328 46378\n', Traceback (most recent call last):
  File "/Users/foo/uberserver-master/twistedserver.py", line 37, in dataReceived
    self.Handle(data.decode("utf-8"))
  File "/Users/foo/uberserver-master/Client.py", line 160, in Handle
    self.HandleProtocolCommands(self.data.split("\n"), msg_limits)
  File "/Users/foo/uberserver-master/Client.py", line 210, in HandleProtocolCommands
    self.HandleProtocolCommand(command)
  File "/Users/foo/uberserver-master/Client.py", line 166, in HandleProtocolCommand
    self._root.protocol._handle(self, cmd)
  File "protocol/Protocol.py", line 296, in _handle
    function(*([client] + fun_args))
  File "protocol/Protocol.py", line 1790, in in_SETSCRIPTTAGS
    self._root.broadcast_battle('SETSCRIPTTAGS %s'%'\t'.join(scripttags), client.current_battle)
  File "/Users/foo/uberserver-master/DataHandler.py", line 372, in broadcast_battle
    if type(ignore) in (str, unicode): ignore = [ignore]
NameError: name 'unicode' is not defined
I'm not exactly sure what the problem is there, so I've just left it alone an let it complain.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Testing REGISTER command without creating an account

Post by gajop »

The unicode thing seems like a bug (python 3.5 doesn't have the 'unicode' type)

Code: Select all

~ python3.5
Python 3.5.2 (default, Nov 17 2016, 17:05:23) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> unicode
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'unicode' is not defined
>>> 

Code: Select all

~ python2.7
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> unicode
<type 'unicode'>
>>> 
That check should be converted to http://stackoverflow.com/a/23692403/7656871
Post Reply

Return to “Lobby Clients & Server”