After First Session or Login, Server Stops

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
coolboy714cp
Posts: 317
Joined: 06 Feb 2010, 02:45
Contact:

After First Session or Login, Server Stops

Postby coolboy714cp » 24 Feb 2018, 01:27

So, I was trying to put an old game of mine back online but for some reason, once I put that zone back up and updated the 2X API to the newest one, 1.7.5 AS3 I think, I start having issues right after the first login.

Now, this is all tested from my own computer using my **PUBLIC** IP address, but after I login with the first client, I am not able to login with anymore clients until I do both of the following:

1. Disconnect the first client, and
2. Wait at least 3-5 seconds before connecting a new client, but normally longer.

I am not sure what would cause this kind of issue, never had anything like this happen with any socket server. One thing I also have noticed though which is the reason I am posting this, is that BlueBox also seems to go offline completely and is unreachable by Flash and webbrowsers.

It is kind of like the asynchronicity of SmartFoxServer is, ironically, blocked.

Hopefully this issue can get resolved fast...

EDIT:

Here are some lines showing the issue from the SFS terminal, if it serves as any help in fixing this problem.

Code: Select all

19:42:11,142 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 4, Type: DEFAULT, Logged: No, IP: 192.168.1.254:9933 } on Server port: 9933 <---> 9933
19:42:11,210 INFO  [SFSWorker:Sys:4] api.SFSApi     - User login: { Zone: PC3 }, ( User Name: ec, Id: 0, Priv: 0, Sess: 192.168.1.254:9933 ) , Type: Flash
19:42:23,268 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 4, Type: DEFAULT, Logged: Yes, IP: 192.168.1.254:9933 }
19:42:23,273 INFO  [SFSWorker:Sys:3] api.SFSApi     - User disconnected: { Zone: PC3 }, ( User Name: ec, Id: 0, Priv: 0, Sess: 192.168.1.254:9933 ) , SessionLen: 12063, Type: Flash
19:42:45,304 INFO  [SocketReader] sessions.DefaultSessionManager     - Session created: { Id: 5, Type: DEFAULT, Logged: No, IP: 192.168.1.254:9933 } on Server port: 9933 <---> 9933
19:42:53,379 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 5, Type: DEFAULT, Logged: No, IP: 192.168.1.254:9933 }
19:43:09,066 INFO  [qtp1923634801-40] sessions.DefaultSessionManager     - Session created: { Id: 6, Type: BLUEBOX, Logged: No, IP: null } on Server port: 0 <---> 0

I just don't know if it's normal for the last line to contain "IP: null on Server port: 0 <--> 0", doesn't sound right to me, but not sure.

Here is also the debug output from Flash on the second client:

Code: Select all

## SecurityError: [SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048: Security sandbox violation: file:///G|/Coffee%20Shop.swf cannot load data from *.*.*.*:9933."]
[SFS2X|INFO] Object going out:
   (byte) c: 0
   (sfs_object) p:
      (utf_string) api: 1.7.5
      (utf_string) cl: Flash
   
   (short) a: 0

## SocketError: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2031: Socket Error. URL: *.*.*.*"]
Error opening URL 'http://*.*.*.*:8080/BlueBox/BlueBox.do'
## BlueBox Error: Error #2032: Stream Error. URL: http://*.*.*.*:8080/BlueBox/BlueBox.do
User avatar
Lapo
Site Admin
Posts: 21079
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: After First Session or Login, Server Stops

Postby Lapo » 24 Feb 2018, 08:07

Hi,
seems like a security issue with the Flash Player.
How are you testing exactly? From the browser? From a standalone player?

Is the client loaded from local file or from url? If the latter does the url coincide with the url of the server?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
coolboy714cp
Posts: 317
Joined: 06 Feb 2010, 02:45
Contact:

Re: After First Session or Login, Server Stops

Postby coolboy714cp » 27 Feb 2018, 23:33

How are you testing exactly? From the browser? From a standalone player?

I have tested directly from Adobe Animate, and I get the security error. I tested from a standalone player, doesn't work (even though the swf file and directory are added under the trusted files in the Global Flash Player settings). I have also tested in the browser, only Microsoft Edge seems to allow multiple logins/connections.

The thing that doesn't make any sense to me at all is this:

It works fine for the very first connection, no security issue or anything. Just when a second user tries to login, if the first user's session hasn't yet been terminated, that's when I get the security issue. But Microsoft Edge allows multiple connections and logins. If anything, I would think that since the directory and files are all trusted in Flash Player security settings, the standalone player would allow multiple connections as well, but it only allows 1.

Is the client loaded from local file or from url? If the latter does the url coincide with the url of the server?

I have tried both, neither one works and both give the same error unless using Microsoft Edge, then there is no security/sandbox violation error and you are able to connect with 2 different users. The client loads 1 other file in the same directory as the client is. This happens before connecting to SFS and that file is able to load successfully. I'm testing everything on my local machine, using the SFS Jetty webserver with my public IP.

I just would like to know how to fix this asap because I was working on something for a bigger project. If it makes any difference I have a retail license. I also saw on the FAQ page of the main site that you guys offer email, IM, and Skype support as well. How do I get the quickest support possible? Just trying to get this fixed as soon as I can because it worked with no problem a month ago and I haven't changed anything..

(By the way the "Server-side Extensions (ActionScript 1 / Javascript)" option for SFS2X needs to be added to http://www.smartfoxserver.com/products -- right now it says it doesn't support it and if I'm not mistaken I think it was added not too long ago. Was just looking at the page and randomly noticed it haha)
User avatar
Lapo
Site Admin
Posts: 21079
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: After First Session or Login, Server Stops

Postby Lapo » 28 Feb 2018, 10:23

Have you checked the sandbox settings before exporting? I am not familiar with the recent Adobe Animate but Flash in general supports different sandboxes including the local-with-filesystem and local-with-network.

In the error transcript you've posted it looks like you're running the client from a local file and network access is denied.

The client loads 1 other file in the same directory as the client is. This happens before connecting to SFS and that file is able to load successfully.

I fear this could be the problem if the wrong sandbox is selected.

I'm testing everything on my local machine, using the SFS Jetty webserver with my public IP.

I am not sure I understand the setup.
If you're testing locally why are you using the public IP instead of the private one?

My suggestion would as follows:
1- publish your SWF and HTML file to a folder under SFS2X/www/root/<YourFolder>/
2- if you have other data files that need to be loaded by the SWF publish those as well under the same folder
3- test locally by pointing your browser to either localhost or the private IP address. Example: http://localhost:8080/<YourFolder>/index.html

By running everything under the same origin you should avoid most security pitfalls. If this works you should be able to publish this online without hiccups.

hope it helps

p.s. = if possible use a Debug Flash Player in your browser to be able to see runtime errors while testing
p.p.s = we don't provide IM support, if you want you can contact us via email (using our support@... mail box) though in terms of speed it's the same.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 19 guests