Page 1 of 1

Testing REGISTER command without creating an account

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

Re: Testing REGISTER command without creating an account

Posted: 05 Apr 2017, 09:39
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.

Re: Testing REGISTER command without creating an account

Posted: 05 Apr 2017, 12:52
by MasterBel2
no problem, thanks!

Re: Testing REGISTER command without creating an account

Posted: 05 Apr 2017, 14:16
by TurBoss
other solution is to deploy our own uberserver for testing propourses

very easy with python 3

https://github.com/spring/uberserver

Re: Testing REGISTER command without creating an account

Posted: 05 Apr 2017, 17:29
by jamerlan
or write your own lobby server (trollface)

Re: Testing REGISTER command without creating an account

Posted: 06 Apr 2017, 01:33
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.

Re: Testing REGISTER command without creating an account

Posted: 06 Apr 2017, 01:42
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.

Re: Testing REGISTER command without creating an account

Posted: 06 Apr 2017, 23:17
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.

Re: Testing REGISTER command without creating an account

Posted: 08 Apr 2017, 17:26
by TurBoss
Hi

seems that there are some bugs on new installs

Re: Testing REGISTER command without creating an account

Posted: 08 Apr 2017, 18:29
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

Re: Testing REGISTER command without creating an account

Posted: 08 Apr 2017, 19:19
by TurBoss
got merged into mainstream so you can just grab de official repo

Re: Testing REGISTER command without creating an account

Posted: 09 Apr 2017, 02:00
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

Re: Testing REGISTER command without creating an account

Posted: 10 Apr 2017, 03:14
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.

Re: Testing REGISTER command without creating an account

Posted: 10 Apr 2017, 03:48
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