Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inline flash policy request broken #448

Closed
insidewhy opened this issue Aug 5, 2011 · 8 comments
Closed

inline flash policy request broken #448

insidewhy opened this issue Aug 5, 2011 · 8 comments
Labels
bug Something isn't working

Comments

@insidewhy
Copy link

Using flashsocket and get the usual error about not being run as root so having to serve the flash policy file requests inline. However when trying to use flashsockets in a browser.. it just causes the connection attempt to pause for a few seconds before falling back to xhr-polling. Flashbug shows the following error:

[WebSocket] cannot connect to Web Socket server at ws://alpha.blaggart.com:80/socket.io/1/flashsocket/19621675351656453986 (SecurityError) make sure the server is running and Flash socket policy file is correctly placed

I'm using flash 10.3.181.34

@insidewhy
Copy link
Author

Might this be connected to the fact I'm running nodejs on a high port behind haproxy on port 80?

If so then an option to override the port io.connect passes in its policy information for other proxy users.

@insidewhy
Copy link
Author

If I connect directly to node.js then I get a different error:

Node was not found" code: "8
[Break On This Error] var swfobject=function(){var D="undefi...oshi Ichikawa <http://gimite.net/en/>

from socket.io.js 2479. It seems flash might still be broken.. but an option to override the port sent in the security information would be needed to avoid the first error for proxy users.

@insidewhy
Copy link
Author

Okay I have a flash socket policy file now being served on port 843 (proxying from haproxy through to node). Don't get the websocket security error but do get the above error about node not being found and then timeout and fallback to xhr-polling

@3rd-Eden
Copy link
Contributor

3rd-Eden commented Aug 8, 2011

This might help with your issue until I can figure out what is going on: socketio/socket.io-client#273
It actually tells the client there is a different port for the server and uses that instead of checking 843. So that will allow you to run it as non root.

@insidewhy
Copy link
Author

That doesn't help. Perhaps the bug title is now misleading.. flash sockets just seem broken in general (at least in firefox 4 and 5).

@3rd-Eden
Copy link
Contributor

3rd-Eden commented Aug 9, 2011

The flashsocket works fine here in Firefox 3, 4 and 5. So please provide us with a failing testcase where we can reproduce your findings.

@einaros
Copy link
Contributor

einaros commented Aug 30, 2011

@tuxjay, make sure you actually rebuild the client after applying the patch above. I've made the same changes to one of my installs, which runs on a server with only port 80 open.

@Selvatico
Copy link

I have almost the same problem, but with diffeernce - socket.io tryes connect via flashsocket, after few seconds it switchs to xhr-polling, BUT after 5-6 xhr requests in switchs to flashsockets, so question - why does it want connect at beggining via flashsockets? I have node.js server on another subdomain - This may be due to the fact that the flash file does not have time to boot?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants