Blue Box giving bug

Submit all your BlueBox related questions or report a bug here!

Moderators: Lapo, Bax

diamond123
Posts: 46
Joined: 28 Nov 2009, 04:30

Blue Box giving bug

Postby diamond123 » 28 Nov 2009, 04:47

I am trying to connect to SmartFoxServer.
I am able to connect to it with default settings. (on local machine)
The problem is it works fine in the FLA.
But when i run the swf it gives an error in the LoaderFactory constructor.

After searching the forum for answers i came across a few things. I was able to resolve the issue by just turning of BlueBox.
My question is can i use BlueBox. If yes how.

As for details, can't give much specifics except that i m just connecting to the server, adding 2 listeners (onConnection and onLogin).

This is the error -

cannot load data from
http://127.0.0.1:8080/BlueBox/HttpBox.do.
at it.gotoandplay.smartfoxserver.http::LoaderFactory()
at it.gotoandplay.smartfoxserver.http::HttpConnection()
at it.gotoandplay.smartfoxserver::SmartFoxClient()

I have seen that there is a bug in the as2 code that you have mentioned in another post. But i am using the as3 version. Is the bug prevalent there.

Most importantly the error appears only in html or swf and not in FLA.

The simulation procedure is simple -
DO NOT run the server
Try to connect through an swf.
The normal connection fails and is followed by an attempt for BlueBox connection.
At this point, FLA gives no issues and works as expected.
But swf/html throws up a security error as given above.

I though it might have something to do with policy files but if no server is available there are no concerns about a policy file ? or am I wrong?

Please help

P.S. Will try to provide a demo swf to simulate the issue
diamond123
Posts: 46
Joined: 28 Nov 2009, 04:30

Postby diamond123 » 28 Nov 2009, 09:17

http://www.filefactory.com/file/a15ac1e ... _Issue.zip

Check this link for the swf to simulate the issue
Details inside

The source code is also provided alongwith the fla.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 28 Nov 2009, 10:36

Which SmartFoxServer/BlueBox version do you use?
What is the client side API version?
When SFS is up and running open a browser and point it to --> localhost:8080/BlueBox/HttpBox.do
Does it work?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
diamond123
Posts: 46
Joined: 28 Nov 2009, 04:30

Postby diamond123 » 28 Nov 2009, 12:12

All details are provided in the uploaded file.
Also i am having trouble updating version 1.6.6 to version 1.6.7

I have downloaded the update. Can someone help me on how to use the downloaded package.

Should i just replace the api packages.

Also the jar file does not seem to run

Where to run it from? (I don't have much experience with java)
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 29 Nov 2009, 08:49

We'll take a look at the ZIP as soon as possible.
As regards 1.6.7 you will find the instructions in the package itself.
Make sure to read the release notes too.
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 30 Nov 2009, 15:36

Also you did not answer this question:
When SFS is up and running open a browser and point it to --> localhost:8080/BlueBox/HttpBox.do
Does it work?


Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
diamond123
Posts: 46
Joined: 28 Nov 2009, 04:30

Postby diamond123 » 07 Dec 2009, 12:59

Sorry for the delayed response.
I tried the mentioned line on browser.

It gives me a page with following text
BlueBox
v 1.0.5
copyright info.

so i guess that means BlueBox is running fine.

Anything else i need to try.

And still no luck with the update.
Replaced the API files with the new ones. That helped in one case.
But don't know what to do with the jar file.
diamond123
Posts: 46
Joined: 28 Nov 2009, 04:30

Another observation

Postby diamond123 » 09 Dec 2009, 04:58

The swf is set to "network only access". (required for creating sockets)

So if i am trying to access a bluebox connection on the same machine then it gives a null error (only in swf not in fla).

But when i try the same swf in another locally connected machine, it just hangs on first screen. I have put in a check for connection error and it displays right if smartconnect is false. So i think when the swf is running on another machine, it keeps trying to connect with a bluebox but is never able to detect that the connection cannot be made or am i missing something.

All i want is to detect the fact that bluebox is unable to connect. what should i do?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 09 Dec 2009, 08:37

Ok,
let's go in steps.
Please test with your browser the following:
http://xx.xx.xx.xx:8080/BlueBox/HttpBox.do.

where xx.xx.xx.xx is the IP where SFS is running.
Does this work without any problems?
If so it's just a problem with your client, maybe related to the Flash Player security sandbox.

Let me know.

p.s. = as regards the patch you should copy the jar file to {sfs-folder}/Server/lib and restart.
Lapo

--

gotoAndPlay()

...addicted to flash games
diamond123
Posts: 46
Joined: 28 Nov 2009, 04:30

Postby diamond123 » 14 Dec 2009, 11:28

I replaced the jar file with the one with same name in /Server.
Hope thats ok.

Ya. the above step works fine. And everything so far has been working fine until BlueBox is off. Also the problem appears only when BlueBox is on and server is down.

Another problem. I am unable to read Room variables from client. I use the following.

More details in the Serverside extension development. (as this doesn't seem the right place for it).
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 14 Dec 2009, 17:25

Also the problem appears only when BlueBox is on and server is down.

Well this is obviously a problem. The BlueBox needs the server to be up and running otherwise it won't be able to communicate.
Lapo

--

gotoAndPlay()

...addicted to flash games
diamond123
Posts: 46
Joined: 28 Nov 2009, 04:30

Postby diamond123 » 15 Dec 2009, 11:42

Ya i know that it is supposed to not work.
Thats fine. But why does it show a null error in html/swf.
I would like some means of finding the error and displaying a could not connect message.

Tried putting a try catch in many places. Also tried adding Error listeners available in flash.
But no use.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 18 Dec 2009, 11:40

Sorry at this point I am a bit lost as to what problem we're working on.
The BlueBox works for you on the server side, right?
Can you explain in detail what is not working for you?
Lapo

--

gotoAndPlay()

...addicted to flash games
diamond123
Posts: 46
Joined: 28 Nov 2009, 04:30

Postby diamond123 » 19 Dec 2009, 09:10

Ok.

I have a running mmultiplayer application, which works fine at all times.

Now if the server goes down for some reason, any one who tries to connect to the server gets a null error in flash.

After debugging the error i realise that it has something to do with BlueBox.

In essence i want to catch the fact that the server is down and display a page for reconnection attempt.

If Bluebox is turned off, I am using the onConnection Listener to get that connection cannot be made and give the user the option to try again.
This works fine.

But now if i turn on BlueBox, the client is not able to gracefully handle the situation that the server is down. I am not sure how i catch this error because it throws up in the constructor of SmartFoxClient.

To simulate the error, just run the client provided in the zip on a system without the server running.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 21 Dec 2009, 09:24

Now if the server goes down for some reason, any one who tries to connect to the server gets a null error in flash.

After debugging the error i realise that it has something to do with BlueBox.

If the server is down you should get a connection failed in the onConnection event, from client side.

Try connecting your client to a machine in your network that doesn't run SFS and you'll get that. You can even point the client to an address where no machine is actually running on.

For example if I run the AS3 template provided with SFS 1.6.x I get this:
--> SmartFoxClient API version: 1.6.1
--> Click the CONNECT button to start
--> Connecting...
--> Connection failed!


But now if i turn on BlueBox, the client is not able to gracefully handle the situation that the server is down. I am not sure how i catch this error because it throws up in the constructor of SmartFoxClient.

Sorry I don't understand where you turn the BlueBox on and off. If the server is down the BlueBox can only be off. Maybe you are referring to the smartConnect flag in SmartFoxClient?
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “BlueBox”

Who is online

Users browsing this forum: No registered users and 11 guests