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 » 05 Apr 2017, 09:30

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.
0 x

gajop
Moderator
Posts: 2972
Joined: 05 Aug 2009, 20:42

Re: Testing REGISTER command without creating an account

Post by gajop » 05 Apr 2017, 09:39

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.
0 x

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

Re: Testing REGISTER command without creating an account

Post by MasterBel2 » 05 Apr 2017, 12:52

no problem, thanks!
0 x

User avatar
TurBoss
Jauria RTS Developer
Posts: 84
Joined: 27 Jan 2014, 01:04

Re: Testing REGISTER command without creating an account

Post by TurBoss » 05 Apr 2017, 14:16

other solution is to deploy our own uberserver for testing propourses

very easy with python 3

https://github.com/spring/uberserver
0 x

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 » 05 Apr 2017, 17:29

or write your own lobby server (trollface)
0 x

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

Re: Testing REGISTER command without creating an account

Post by MasterBel2 » 06 Apr 2017, 01:33

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.
0 x

gajop
Moderator
Posts: 2972
Joined: 05 Aug 2009, 20:42

Re: Testing REGISTER command without creating an account

Post by gajop » 06 Apr 2017, 01:42

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.
0 x

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

Re: Testing REGISTER command without creating an account

Post by MasterBel2 » 06 Apr 2017, 23:17

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.
0 x

User avatar
TurBoss
Jauria RTS Developer
Posts: 84
Joined: 27 Jan 2014, 01:04

Re: Testing REGISTER command without creating an account

Post by TurBoss » 08 Apr 2017, 17:26

Hi

seems that there are some bugs on new installs
0 x

User avatar
TurBoss
Jauria RTS Developer
Posts: 84
Joined: 27 Jan 2014, 01:04

Re: Testing REGISTER command without creating an account

Post by TurBoss » 08 Apr 2017, 18:29

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
0 x

User avatar
TurBoss
Jauria RTS Developer
Posts: 84
Joined: 27 Jan 2014, 01:04

Re: Testing REGISTER command without creating an account

Post by TurBoss » 08 Apr 2017, 19:19

got merged into mainstream so you can just grab de official repo
0 x

abma
Spring Developer
Posts: 3493
Joined: 01 Jun 2009, 00:08

Re: Testing REGISTER command without creating an account

Post by abma » 09 Apr 2017, 02:00

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
0 x

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

Re: Testing REGISTER command without creating an account

Post by MasterBel2 » 10 Apr 2017, 03:14

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.
0 x

gajop
Moderator
Posts: 2972
Joined: 05 Aug 2009, 20:42

Re: Testing REGISTER command without creating an account

Post by gajop » 10 Apr 2017, 03:48

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
0 x

Post Reply

Return to “Lobby Clients & Server”