Tic Tac Toe Cant Start Game

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Tic Tac Toe Cant Start Game

Postby Lapo » 05 Nov 2018, 10:40

Hi,
it sounds like the Tris extension is not working and the two players can't enter the game.
I would recommend checking the server side logs. It's likely you will find an error at the time you launch a game.

Let us know what you find.
Also, what version of SFS2X are you running?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
avinash.c
Posts: 15
Joined: 05 Nov 2018, 09:29

Re: Tic Tac Toe Cant Start Game

Postby avinash.c » 05 Nov 2018, 11:14

Hello Bax and Lapo,
Thanks for the quick reply.
I did watch the logs. I have noticed this.
Warning:-
com.smartfoxserver.v2.exceptions.SFSExtensionException:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: com.smartfoxserver.v2.exceptions.SFSExtensionException
Message: Extension boot error. The provided path is not a directory: extensions/Tris
Description: Failure while creating room extension.
Possible Causes: If the CreateRoom request was sent from client make sure that the extension name matches the name of an existing extension
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.entities.managers.SFSExtensionManager.createJavaExtension(SFSExtensionManager.java:346)
com.smartfoxserver.v2.entities.managers.SFSExtensionManager.createExtension(SFSExtensionManager.java:260)
com.smartfoxserver.v2.entities.managers.SFSRoomManager.createRoomExtension(SFSRoomManager.java:247)
com.smartfoxserver.v2.entities.managers.SFSRoomManager.createRoom(SFSRoomManager.java:194)
com.smartfoxserver.v2.entities.SFSZone.createRoom(SFSZone.java:272)
com.smartfoxserver.v2.api.SFSApi.createRoom(SFSApi.java:733)
com.smartfoxserver.v2.api.SFSApi.createRoom(SFSApi.java:710)
com.smartfoxserver.v2.controllers.system.CreateRoom.execute(CreateRoom.java:275)
com.smartfoxserver.v2.controllers.v290.SystemReqController.processRequest(SystemReqController.java:172)
com.smartfoxserver.v2.controllers.v290.SystemReqController.enqueueRequest(SystemReqController.java:127)
com.smartfoxserver.bitswarm.io.protocols.AbstractProtocolCodec.dispatchRequestToController(AbstractProtocolCodec.java:39)
com.smartfoxserver.v2.protocol.SFSProtocolCodec.dispatchRequest(SFSProtocolCodec.java:133)
com.smartfoxserver.v2.protocol.SFSProtocolCodec.onPacketRead(SFSProtocolCodec.java:90)
com.smartfoxserver.v2.protocol.binary.BinaryIoHandler$1.run(BinaryIoHandler.java:477)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Info- Room created: { Zone: BasicExamples }, [ Room: 1's game, Id: 33, Group: games, isGame: true ], type = SFSRoom
Info- Room joined: [ Room: 1's game, Id: 33, Group: games, isGame: true ], { Zone: BasicExamples }, ( User Name: 1, Id: 60, Priv: 0, Sess: 113.193.237.254:14134 ) , asSpect: false
Warning- com.smartfoxserver.v2.exceptions.SFSExtensionException: No extensions can be invoked: { Zone: BasicExamples }, RoomId: 33
com.smartfoxserver.v2.controllers.v290.ExtensionReqController.processRequest(ExtensionReqController.java:157)
com.smartfoxserver.v2.controllers.v290.ExtensionReqController$1.run(ExtensionReqController.java:68)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)




I understand there is a java/extension error.
But as i mentioned in my last post. I copied the server folder into the installed path of sfx2x/extensions folder.

The version i am using was 2.13.

And there is no error or warning while logging into game.

Please check and let me know what i should do.

Thanks Avinash
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Tic Tac Toe Cant Start Game

Postby Lapo » 05 Nov 2018, 11:52

It looks like something is wrong with the way you have deployed the game Extension.
Under the SFS2X/extensions/ directory you should have a Tris/ folder containing the TrisExtension.jar file.

Make sure the names are correct, in a case-sensitive way, i.e. the folder must be "Tris" and to "tris" etc...

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
avinash.c
Posts: 15
Joined: 05 Nov 2018, 09:29

Re: Tic Tac Toe Cant Start Game

Postby avinash.c » 05 Nov 2018, 12:02

User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Tic Tac Toe Cant Start Game

Postby Bax » 05 Nov 2018, 15:02

That's really weird!
What about the other examples using Extensions? Is everything working fine?
Also, did you try creating the Tris folder manually and just unzip the TrisExtension.jar file to it?
Paolo Bax
The SmartFoxServer Team
avinash.c
Posts: 15
Joined: 05 Nov 2018, 09:29

Re: Tic Tac Toe Cant Start Game

Postby avinash.c » 05 Nov 2018, 15:15

Hi Bax,

Wait.. What unzip? I didn`t do anything like that.

But i just copied the Tris folder from server/deploy to SFS installed path/SFS2X/extensions folder, Thats all.

And I even tried using asset store plugin for unity. So, in menu i have seen an option to deploy examples. So i even tried it. Both cases i faced same issue. And can you tell me why we should do this copy thing. Will it be needed for the main project i am going to develop. And what is the purpose of doing this? What is the need to install the sfxserver app?
Should i need to change anything in server.xml under config folder?

I will give a try creating a folder manually and copy the jar to it.

Examples like object movement working fine. But FPS, Tris are not working.

Thanks.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Tic Tac Toe Cant Start Game

Postby Bax » 05 Nov 2018, 15:43

Sorry, I'm not following you entirely.
First of all let me clarify this: we have an examples pack available on your website (and the one you linked is one of the tutorials) and then we have the asset store package. Let's discuss them separately.

Examples pack
I believe you initially installed SmartFoxServer 2X, then downloaded and unzipped the examples pack, then copied the "04 Tris/server/Extension_Java/deploy/Tris" folder to the "SFS2X/extensions" folder, is that right?
Then launching SFS and running the example's client should have worked, but for some reason you get that strange error ("extension/Tris is not a folder") we have never seen before.

Asset Store package
That is a totally different beast, made to test all our examples at once with a single Unity download. They require you to install SmartFoxServer and then click SmartFoxServer > Examples deployment in the Unity menu, which essentially does what you did before manually (copy the Extensions used by the examples to the SmartFoxServer folder).

-----

Whether you go with the first approach or the second one, this has nothing to do with your own project. This is only to run the examples we provide, but if you just want to work on your own project, you don't need anything of the above.

So... if you want to run the Tris example, my suggestion is to create the "extensions/Tris" folder manually, and copy the "TrisExtension.jar" file to it. Then stop and restart SFS and try again to launch the example in Unity.
If you still get the same error, please show me the content of the "zones/BasicExamples.zone.xml". Thank you.
Paolo Bax
The SmartFoxServer Team
avinash.c
Posts: 15
Joined: 05 Nov 2018, 09:29

Re: Tic Tac Toe Cant Start Game

Postby avinash.c » 06 Nov 2018, 06:49

Hello Bax,

I have tried the procedure once more from starting by creating a new folder and copying it. So the error i mentioned yesterday was not coming now. But there is new :(

1. I have created a zone in my server Name "BasicExamples"
2. Created a room name "The Lobby" with properties default settings referred from your documentation.
Then i faced only this error after clicking Start New Game in Tris Lobby Scene. And even here the chat is fine and game is not connected between players.

com.smartfoxserver.v2.exceptions.SFSExtensionException: No extensions can be invoked: { Zone: BasicExamples }, RoomId: 0
com.smartfoxserver.v2.controllers.v290.ExtensionReqController.processRequest(ExtensionReqController.java:157)
com.smartfoxserver.v2.controllers.v290.ExtensionReqController$1.run(ExtensionReqController.java:68)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)


3. In fps example it is showing an error message in unity says "UDP initialization failed".

Thanks
Avinash
Last edited by avinash.c on 06 Nov 2018, 07:58, edited 1 time in total.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Tic Tac Toe Cant Start Game

Postby Bax » 06 Nov 2018, 07:50

I'm not sure why you had to create the "BasicExamples" Zone. It already exists when you install SFS, unless you deleted it.
Anyway, the "group id" must be set to the "default" string, and "is game" must be set to false. In fact this is room is the lobby where players meet, not the actual game Room (which is created dynamically by the first player starting a match).

About the FPS example, it requires UDP listening to be active in the server configuration, as described in step 4 of the Setup & Run chapter of this tutorial: http://docs2x.smartfoxserver.com/ExamplesUnity/fps
Again this should be pre-configured in SFS when you install it.

Maybe it would be best to reinstall SFS and start from scratch.
Hope this helps.
Paolo Bax
The SmartFoxServer Team
avinash.c
Posts: 15
Joined: 05 Nov 2018, 09:29

Re: Tic Tac Toe Cant Start Game

Postby avinash.c » 06 Nov 2018, 08:02

Hello Bak,

Please check the old post again. I have edited it.

It already exists when you install SFS, unless you deleted it.

Yes it was deleted yesterday night when restarting the server. Sorry for that.

Maybe it would be best to reinstall SFS and start from scratch.

Actually i did it. Then the yesterdays errors are gone.

Now i am facing only No extensions can be invoked: {Zone: BasicExamples }, RoomId: 2

Please check once.
Thanks
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Tic Tac Toe Cant Start Game

Postby Bax » 06 Nov 2018, 08:21

So, the Extension can't be invoked even if you have the TrisExtension.jar file under the /extensions/Tris folder?
Maybe you deleted it too? This is really weird because my colleague tried again yesterday, and everything works as expected.
Paolo Bax
The SmartFoxServer Team
avinash.c
Posts: 15
Joined: 05 Nov 2018, 09:29

Re: Tic Tac Toe Cant Start Game

Postby avinash.c » 06 Nov 2018, 08:29

Bax wrote:So, the Extension can't be invoked even if you have the TrisExtension.jar file under the /extensions/Tris folder?
Maybe you deleted it too? This is really weird because my colleague tried again yesterday, and everything works as expected.


No i haven't deleted it. I have double checked it.

What would be the reason for Extension can't be invoked?

And i have seen one post https://stackoverflow.com/questions/28059112/smartfox-example-tris-for-dynamic-rooms-is-not-working. Uploaded the rar files in to the server extensions folder. Is that required?

If possible please come to any live chat to discuss in deep. My Mail ID: avinash.c@juegostudio.net or avinashjuego@gmail.com
Thanks
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Tic Tac Toe Cant Start Game

Postby Lapo » 06 Nov 2018, 09:37

We've tried to reproduce the problem but the example works perfectly fine out of the box.
We've installed a new SFS2X, downloaded the examples and built it in Unity without a single hiccup.

The errors you've reported suggest that there are permission problems in your installation that prevent the server from loading the game's Extension.

Alternatively it could be something related with OS X Sierra. Our tests were performed on a Mac with the previous OS X (El Capitan)
We'll setup a machine with a more recent OS X version and see if we can reproduce it.

Meanwhile can you please tell us your OS security settings?
Open the System Preferences > Security and Privacy
What does the Allow applications dowloaded from say?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
avinash.c
Posts: 15
Joined: 05 Nov 2018, 09:29

Re: Tic Tac Toe Cant Start Game

Postby avinash.c » 06 Nov 2018, 10:30

Hello Lapo,

Meanwhile can you please tell us your OS security settings?

macOS Sierra 10.12.6

What does the Allow applications dowloaded from say?

App Store and identified developers

Thanks
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Tic Tac Toe Cant Start Game

Postby Lapo » 06 Nov 2018, 11:04

Thanks, we'll get back to you once we've tested on Sierra.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Google [Bot] and 63 guests