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

xhr-polling and jsonp-polling don't seem to work (for the django chat example) in IE9 #142

Open
a-e-m opened this issue May 20, 2013 · 3 comments

Comments

@a-e-m
Copy link

a-e-m commented May 20, 2013

I'm running the server on an Ubuntu virtual machine (Quantal) and the client is IE9 on Windows Vista, with Flash disabled to test the other transports. I'm just testing, so I'm running the django chat example as it says to (./bin/django runserver_socketio)

Library information:
Gevent version 13.8 / Greenlet version 0.4.0 (the latest versions of both)
Newest versions of gevent-websocket and gevent-socketio available on PyPI

The first socketio request looks like this:
URL: http://192.168.1.6:8000/socket.io/1/?t=1369019846312
Request body: 807003570925:60:60:websocket,xhr-multipart,htmlfile,jsonp-polling,flashsocket,xhr-polling

The next request is like this:
URL: http://192.168.1.6:8000/socket.io/1/htmlfile/807003570925?t=1369019846524
Request body: 5120
1:: [lots of white space for padding]

Then there's a bunch of apparently randomly alternating xhr-polling and jsonp-polling requests and responses, which all only involve message types 1, 2, and 8. (connect, heartbeat, and noop.) The problem is that the example never actually works, it just sits there saying "connecting to the server", which is odd because it's definitely connected to the server.

Is there something wrong with my setup, or is something going wrong with gevent-socketio?

@ander2
Copy link
Contributor

ander2 commented May 20, 2013

Can you try with Chrome or Firefox and see what's going on in the console?

2013/5/20 a-e-m notifications@github.com

I'm running the server on an Ubuntu virtual machine (Quantal) and the
client is IE9 on Windows Vista, with Flash disabled to test the other
transports. I'm just testing, so I'm running the django chat example as it
says to (./bin/django runserver_socketio)

Library information:
Gevent version 13.8 / Greenlet version 0.4.0 (the latest versions of both)
Newest versions of gevent-websocket and gevent-socketio available on PyPI

The first socketio request looks like this:
URL: http://192.168.1.6:8000/socket.io/1/?t=1369019846312
_Request body:_807003570925:60:60:websocket,xhr-multipart,htmlfile,jsonp-polling,flashsocket,xhr-polling

The next request is like this:
URL:
http://192.168.1.6:8000/socket.io/1/htmlfile/807003570925?t=1369019846524
Request body: 5120
1:: [lots of white space for padding]

Then there's a bunch of apparently randomly alternating xhr-polling and
jsonp-polling requests and responses, which all only involve message types
1, 2, and 8. (connect, heartbeat, and noop.) The problem is that the
example never actually works, it just sits there saying "connecting to the
server", which is odd because it's definitely connected to the server.

Is there something wrong with my setup, or is something going wrong with
gevent-socketio?


Reply to this email directly or view it on GitHubhttps://github.com//issues/142
.

@a-e-m
Copy link
Author

a-e-m commented May 21, 2013

In Chrome, the responses/requests looked like this (for the websocket transport):

First request:
Request URL: http://192.168.1.6:8000/socket.io/1/?t=1369111114464
Response body: 975135672793:60:60:websocket,xhr-multipart,htmlfile,jsonp-polling,flashsocket,xhr-polling
Status code: 200 OK

Second request:
Request URL: ws://192.168.1.6:8000/socket.io/1/websocket/975135672793
Response body: nothing, because it switched to the websocket protocol
Status code: 101 Switching Protocols

Websocket frames:
1::
1::/chat
1::/chat
5::/chat:{"name":"join","args":["4"]}
5:1+:/chat:{"name":"nickname","args":["test"]}
5::/chat:{"args":["test has connected"],"name":"announcement"}
5::/chat:{"args":[["test"]],"name":"nicknames"}
6::/chat:1+[true,"test"]
2::

[more "2::"]

5::/chat:{"name":"user message","args":["test"]}
5::/chat:{"name":"user message","args":["what"]}
2::
2::
2::
2::
2::
2::
5::/chat:{"args":["test has connected"],"name":"announcement"}
5::/chat:{"args":[["test","test"]],"name":"nicknames"}
2::
2::
5::/chat:{"args":["test has disconnected"],"name":"announcement"}
5::/chat:{"args":[["test"]],"name":"nicknames"}
2::
[... more omitted for length]

Firefox with WebSockets looks about the same.


I tried Firefox with WebSockets and Flash disabled. Here are the results:

First request:
Request URL: http://192.168.1.6:8000/socket.io/1/?t=1369112433034
Response body: 467994194462:60:60:websocket,xhr-multipart,htmlfile,jsonp-polling,flashsocket,xhr-polling
Status code: 200 OK

Second request:
Request URL: http://192.168.1.6:8000/socket.io/1/xhr-polling/467994194462?t=1369112433103
Response body: 1::
Status code: 200 OK

The rest of the XHR-polling requests had the same URL except for the timestamp, so I'll just list all of the requests/responses (one on a line, including the first xhr-request response already given above).

XHR-polling response bodies:
1:: (response)
1::/chat (request)
1::/chat (response)
5::/chat:{"name":"join","args":["4"]} (request)
2:: (response)
2:: (request)
2:: (response)
2:: (request)
2:: (response)

[more "2::"]

5:1+:/chat:{"name":"nickname","args":["test"]} (request)
2:: (request)
2:: (response)
5::/chat:{"name":"user message","args":["hello"]} (request)

[... more omitted for length]


Basically, it worked fine with WebSockets, it worked fine with Flash, and it worked fine with xhr-polling in Firefox. But for some reason, it didn't work with xhr-polling or jsonp-polling in IE.

@abourget
Copy link
Owner

Please read invitation to Wednesday September 18th's sprint: https://groups.google.com/forum/#!topic/gevent-socketio/2OIRKA8M2uE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants