BlueBox for iOS

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

mmilen
Posts: 298
Joined: 09 Nov 2010, 00:48
Contact:

BlueBox for iOS

Postby mmilen » 18 Jul 2012, 13:32

Any update on when we can expect BlueBox functionality for iPad. I'm kind of giving up to make a stable online card game as iPad Network can be be relied on. I feel BlueBox would be the way to go.
User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: BlueBox for iOS

Postby A51Integrated » 18 Jul 2012, 21:29

Unfortunately no. BlueBox is quite a large undertaking so at this point in time we have no release date.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
mmilen
Posts: 298
Joined: 09 Nov 2010, 00:48
Contact:

Re: BlueBox for iOS

Postby mmilen » 18 Jul 2012, 23:37

Fair enough. Will look for solutions around TCP.
User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: BlueBox for iOS

Postby A51Integrated » 29 Aug 2012, 18:59

The latest iOS API has just been released - it now includes BlueBox support :D
A51 Integrated

http://a51integrated.com / +1 416-703-2300
mmilen
Posts: 298
Joined: 09 Nov 2010, 00:48
Contact:

Re: BlueBox for iOS

Postby mmilen » 29 Aug 2012, 21:56

Ow, that is awesome news.
mmilen
Posts: 298
Joined: 09 Nov 2010, 00:48
Contact:

Re: BlueBox for iOS

Postby mmilen » 29 Aug 2012, 22:06

I have tried the new API with blue box support and get this error in the server logs. The server is version 2.2.0.

Error for /BlueBox/BlueBox.do
java.lang.NoClassDefFoundError: com/smartfoxserver/v2/bluebox/data/BBMessage
at com.smartfoxserver.v2.bluebox.protocol.BBMessageCodec.decode(BBMessageCodec.java:37)
at com.smartfoxserver.v2.bluebox.SessionFilter.doFilter(SessionFilter.java:132)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.ClassNotFoundException: com.smartfoxserver.v2.bluebox.data.BBMessage
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:401)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: BlueBox for iOS

Postby A51Integrated » 29 Aug 2012, 22:16

I'm pretty sure that has nothing to do with the client API. Check the server config and make sure that your ports etc are correct and open. Try restarting the server just to be safe. After that, try posting to the main SFS2X Questions forum as this is off topic for this one.
A51 Integrated

http://a51integrated.com / +1 416-703-2300
mmilen
Posts: 298
Joined: 09 Nov 2010, 00:48
Contact:

Re: BlueBox for iOS

Postby mmilen » 29 Aug 2012, 22:27

I have this config file :


<SmartFoxConfig>
<ip>onlineplay.greatgameproducts.com</ip>
<port>9933</port>
<httpPort>8080</httpPort>
<httpPollSpeed>500</httpPollSpeed>
<zone>SocialBridgeTables</zone>
<useBlueBox>true</useBlueBox>
</SmartFoxConfig>

If I disable 9933 on my firewall, and start the App It gets no where ,, does not connect nor tries Blue Box. Is there anyhting I need in the code.

At the same time http://onlineplay.greatgameproducts.com:8080/admin/ is good , so the ports are properly opened.
User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: BlueBox for iOS

Postby A51Integrated » 29 Aug 2012, 22:38

Make sure the Web Server is activated in the Server Configurator section of the Admin Tool (Web Server tab).

Also, use a config like this:

Code: Select all

<SmartFoxConfig>
    <ip>onlineplay.greatgameproducts.com</ip>
    <port>9933</port>
    <zone>SocialBridgeTables</zone>
    <debug>true</debug>
    <useBlueBox>true</useBlueBox>
    <httpPort>8080</httpPort>
    <blueBoxPollingRate>250</blueBoxPollingRate>
</SmartFoxConfig>
A51 Integrated

http://a51integrated.com / +1 416-703-2300
mmilen
Posts: 298
Joined: 09 Nov 2010, 00:48
Contact:

Re: BlueBox for iOS

Postby mmilen » 29 Aug 2012, 22:48

The server is for sure up and running. As I can go to and monitor it. http://onlineplay.greatgameproducts.com:8080/admin/

I can see BlueBox.war file in the www folder, but I don;t see anything in the logs that indicated the war file is loaded by Jetty.

2012-08-29 18:38:14.109 iBridgeBaron[21957:10a03] [SFS - INFO]SFS2X API version: 1.1.0
2012-08-29 18:38:14.111 iBridgeBaron[21957:10a03] AppDelegate::onConfigLoadSuccess
2012-08-29 18:38:14.111 iBridgeBaron[21957:10a03] {
cfg = "[Host: onlineplay.greatgameproducts.com Port: 7933 Zone: SocialBridgeTables]";
}
2012-08-29 18:39:29.577 iBridgeBaron[21957:10a03] AppDelegate::onConnectionLost
2012-08-29 18:39:29.578 iBridgeBaron[21957:10a03] {
reason = unknown;
}
2012-08-29 18:39:29.619 iBridgeBaron[21957:10a03] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
*** First throw call stack:
(0x28aa022 0x2459cd6 0x2896644 0x65316f 0x652e3b 0x1fbfa49 0x1fbde84 0x1fbeea7 0x1fbde3f 0x1fbdfc5 0x1f02f5a 0x13bda39 0x148a596 0x13b4120 0x148a117 0x13b3fbf 0x287e94f 0x27e1b43 0x27e1424 0x27e0d84 0x27e0c9b 0x2a3c7d8 0x2a3c88a 0x15bc626 0x27d5 0x2715)
terminate called throwing an exception(lldb)
User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: BlueBox for iOS

Postby A51Integrated » 29 Aug 2012, 22:56

Do a clean of the project. Then run it again.
A51 Integrated

http://a51integrated.com / +1 416-703-2300
mmilen
Posts: 298
Joined: 09 Nov 2010, 00:48
Contact:

Re: BlueBox for iOS

Postby mmilen » 29 Aug 2012, 23:03

I did.

Now intersting that it al worked with my local install of the server that is version 2.1.0 . My production was clean install of the official release and then patched top 2.2.0. Is there any Zone specific configuration I need to be aware of ?
User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: BlueBox for iOS

Postby A51Integrated » 29 Aug 2012, 23:15

No, you should be good to go.
A51 Integrated

http://a51integrated.com / +1 416-703-2300
mmilen
Posts: 298
Joined: 09 Nov 2010, 00:48
Contact:

Re: BlueBox for iOS

Postby mmilen » 29 Aug 2012, 23:21

Just patched my local server to 2.2.0 and I get this when the App is connecting. Definately something is wrong with BlueBox in 2.2.0


19:13:07,233 ERROR [com.smartfoxserver.v2.controllers.ExtensionController-3] controllers.ExtensionController -
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.NullPointerException
Message: *** Null ***
Description: Error while handling client request in extension: { Ext: Admin, Type: JAVA, Lev: ZONE, { Zone: --=={{{ AdminZone }}}==-- }, {} }
Extension Cmd: bBoxMonitor.getData
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.admin.handlers.BlueBoxMonitorModuleReqHandler.handleClientRequest(BlueBoxMonitorModuleReqHandler.java:71)
com.smartfoxserver.v2.extensions.SFSExtension.handleClientRequest(SFSExtension.java:192)
com.smartfoxserver.v2.controllers.ExtensionController.processRequest(ExtensionController.java:133)
com.smartfoxserver.bitswarm.controllers.AbstractController.run(AbstractController.java:96)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:680)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

19:13:11,588 WARN [com.smartfoxserver.v2.controllers.ExtensionController-1] controllers.ExtensionController -
com.smartfoxserver.v2.exceptions.SFSExtensionException: Extension Request refused. Sender is not a User: { Id: 2, Type: BLUEBOX, Logged: No, IP: 192.168.80.103 }
com.smartfoxserver.v2.controllers.ExtensionController.processRequest(ExtensionController.java:61)
com.smartfoxserver.bitswarm.controllers.AbstractController.run(AbstractController.java:96)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:680)

19:13:12,232 ERROR [com.smartfoxserver.v2.controllers.ExtensionController-2] controllers.ExtensionController -
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.NullPointerException
Message: *** Null ***
Description: Error while handling client request in extension: { Ext: Admin, Type: JAVA, Lev: ZONE, { Zone: --=={{{ AdminZone }}}==-- }, {} }
Extension Cmd: bBoxMonitor.getData
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.admin.handlers.BlueBoxMonitorModuleReqHandler.handleClientRequest(BlueBoxMonitorModuleReqHandler.java:71)
com.smartfoxserver.v2.extensions.SFSExtension.handleClientRequest(SFSExtension.java:192)
com.smartfoxserver.v2.controllers.ExtensionController.processRequest(ExtensionController.java:133)
com.smartfoxserver.bitswarm.controllers.AbstractController.run(AbstractController.java:96)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:680)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

19:13:17,232 ERROR [com.smartfoxserver.v2.controllers.ExtensionController-3] controllers.ExtensionController -
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.NullPointerException
Message: *** Null ***
Description: Error while handling client request in extension: { Ext: Admin, Type: JAVA, Lev: ZONE, { Zone: --=={{{ AdminZone }}}==-- }, {} }
Extension Cmd: bBoxMonitor.getData
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.admin.handlers.BlueBoxMonitorModuleReqHandler.handleClientRequest(BlueBoxMonitorModuleReqHandler.java:71)
com.smartfoxserver.v2.extensions.SFSExtension.handleClientRequest(SFSExtension.java:192)
com.smartfoxserver.v2.controllers.ExtensionController.processRequest(ExtensionController.java:133)
com.smartfoxserver.bitswarm.controllers.AbstractController.run(AbstractController.java:96)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:680)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

19:13:22,264 ERROR [com.smartfoxserver.v2.controllers.ExtensionController-1] controllers.ExtensionController -
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.NullPointerException
Message: *** Null ***
Description: Error while handling client request in extension: { Ext: Admin, Type: JAVA, Lev: ZONE, { Zone: --=={{{ AdminZone }}}==-- }, {} }
Extension Cmd: bBoxMonitor.getData
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.admin.handlers.BlueBoxMonitorModuleReqHandler.handleClientRequest(BlueBoxMonitorModuleReqHandler.java:71)
com.smartfoxserver.v2.extensions.SFSExtension.handleClientRequest(SFSExtension.java:192)
com.smartfoxserver.v2.controllers.ExtensionController.processRequest(ExtensionController.java:133)
com.smartfoxserver.bitswarm.controllers.AbstractController.run(AbstractController.java:96)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:680)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
mmilen
Posts: 298
Joined: 09 Nov 2010, 00:48
Contact:

Re: BlueBox for iOS

Postby mmilen » 29 Aug 2012, 23:24

Absulutly there is an issue with the BlueBox.war in server version 2.2.0. I just replaced it with one from patch 2.1.0 and all works like a charm. Note I have all the patch files from 2.2.0 except the BlueBox.war. There might be some functionality issue , but at least for now I can connect over BlueBox.

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 16 guests