Bug: Persistent Connection fails with IIS8 on Android Stock Browser #1653

Closed
dcolaizzomarathon opened this Issue Mar 7, 2013 · 18 comments

Comments

Projects
None yet
4 participants
@dcolaizzomarathon

SignalR: 1.0.0
IIS : 8
Device: Galaxy S3
Browser : Stock
Android: 4.1.1

Issue: When serving the attached website using IIS7 I am connecting a device (Android Stock Browser) using a Persistent Connection and everything works fine. When I host the same website using IIS8, it fails to connect/send a message to my endpoint.

Attached is a link to a sample project.
http://temp-share.com/show/2gFH6Xyx8

Update

Attempted to pass list of transports, which didn't work. Updated to v1.0.1 didn't work.
connection.start({ transport: ['webSockets', 'longPolling'] })

When I changed the transport to just 'longPolling', it works.
connection.start({ transport: 'longPolling']})

@davidfowl

This comment has been minimized.

Show comment Hide comment
@davidfowl

davidfowl Mar 18, 2013

Member

So websockets is broken on android 4.1.1 and it doesn't fall back to longpolling at all.

Member

davidfowl commented Mar 18, 2013

So websockets is broken on android 4.1.1 and it doesn't fall back to longpolling at all.

@ghost ghost assigned Xiaohongt Mar 18, 2013

@davidfowl

This comment has been minimized.

Show comment Hide comment
@davidfowl

davidfowl Mar 18, 2013

Member

@Xiaohongt can you take a look?

Member

davidfowl commented Mar 18, 2013

@Xiaohongt can you take a look?

@Xiaohongt

This comment has been minimized.

Show comment Hide comment
@Xiaohongt

Xiaohongt Mar 18, 2013

Contributor

this repro in 1.0.1 version

Contributor

Xiaohongt commented Mar 18, 2013

this repro in 1.0.1 version

@Xiaohongt

This comment has been minimized.

Show comment Hide comment
@Xiaohongt

Xiaohongt Mar 18, 2013

Contributor
Contributor

Xiaohongt commented Mar 18, 2013

@Xiaohongt

This comment has been minimized.

Show comment Hide comment
@Xiaohongt

Xiaohongt Mar 19, 2013

Contributor

now it doesn't repro on browserstack Android Motorola Razr 4.0 and 4.1, group transport: ['webSockets', 'longPolling'] fallback to longPolling and connection can receive

Contributor

Xiaohongt commented Mar 19, 2013

now it doesn't repro on browserstack Android Motorola Razr 4.0 and 4.1, group transport: ['webSockets', 'longPolling'] fallback to longPolling and connection can receive

@Xiaohongt

This comment has been minimized.

Show comment Hide comment
@Xiaohongt

Xiaohongt Mar 19, 2013

Contributor

@dcolaizzomarathon, I upload your repro at http://singanltest.cloudapp.net/index.html
, I just did small update for log message on page instead for alert, I request it on browserstack Android Motorola Razr 4.0 and 4.1, group transport: ['webSockets', 'longPolling'] fallback to longPolling and connection can receive ( not sure why you directly use ajax to send message, not use connection to send message?)

Contributor

Xiaohongt commented Mar 19, 2013

@dcolaizzomarathon, I upload your repro at http://singanltest.cloudapp.net/index.html
, I just did small update for log message on page instead for alert, I request it on browserstack Android Motorola Razr 4.0 and 4.1, group transport: ['webSockets', 'longPolling'] fallback to longPolling and connection can receive ( not sure why you directly use ajax to send message, not use connection to send message?)

@Xiaohongt

This comment has been minimized.

Show comment Hide comment
@Xiaohongt

Xiaohongt Mar 19, 2013

Contributor

With the latest SignalR code, I upload the app and also update to use connection to send message to:
http://signalrtest2.cloudapp.net/index.html
http://signalrtest2.cloudapp.net/index2.html

index.html use group transport: ['webSockets', 'longPolling']
index2.html use auto transport

Both index.html and index2.html work on browserstack Android Motorola Razr 4.0 and 4.1:
group transport fallback to longPolling, and connection can send and receive message.
auto transport fallback to foreverFrame, and connection can send and receive message.

Contributor

Xiaohongt commented Mar 19, 2013

With the latest SignalR code, I upload the app and also update to use connection to send message to:
http://signalrtest2.cloudapp.net/index.html
http://signalrtest2.cloudapp.net/index2.html

index.html use group transport: ['webSockets', 'longPolling']
index2.html use auto transport

Both index.html and index2.html work on browserstack Android Motorola Razr 4.0 and 4.1:
group transport fallback to longPolling, and connection can send and receive message.
auto transport fallback to foreverFrame, and connection can send and receive message.

@ghost ghost assigned gustavo-armenta Apr 2, 2013

@gustavo-armenta

This comment has been minimized.

Show comment Hide comment
@gustavo-armenta

gustavo-armenta Apr 2, 2013

Contributor

@dcolaizzomarathon, we can't repro this bug. Are you testing on a device or using an emulator? could you share instructions? also, have you tested the two endpoints provided by Xiaohong?

Contributor

gustavo-armenta commented Apr 2, 2013

@dcolaizzomarathon, we can't repro this bug. Are you testing on a device or using an emulator? could you share instructions? also, have you tested the two endpoints provided by Xiaohong?

@gustavo-armenta

This comment has been minimized.

Show comment Hide comment
@gustavo-armenta

gustavo-armenta Apr 3, 2013

Contributor

Closing as we could not repro the failure

Contributor

gustavo-armenta commented Apr 3, 2013

Closing as we could not repro the failure

@dcolaizzomarathon

This comment has been minimized.

Show comment Hide comment
@dcolaizzomarathon

dcolaizzomarathon Apr 4, 2013

This bug should be reopened. The bug specified Galaxy S3 devices using stock browser. This issue is still a problem with Android 4.1.1 and Android 4.1.2 on the S3. I've re-tested using the above apps

This bug should be reopened. The bug specified Galaxy S3 devices using stock browser. This issue is still a problem with Android 4.1.1 and Android 4.1.2 on the S3. I've re-tested using the above apps

@gustavo-armenta

This comment has been minimized.

Show comment Hide comment
@gustavo-armenta

gustavo-armenta Apr 4, 2013

Contributor

Tried on physical devices with Android 2.3.5 and 4.2.2, it worked fine

Contributor

gustavo-armenta commented Apr 4, 2013

Tried on physical devices with Android 2.3.5 and 4.2.2, it worked fine

@dcolaizzomarathon

This comment has been minimized.

Show comment Hide comment
@dcolaizzomarathon

dcolaizzomarathon Apr 4, 2013

Which devices? It seems this might be a galaxy s3 problem? On stock browser with 3 different devices I get nothing. (All S3's). Note..It does work with chrome, just not stock browser.

Which devices? It seems this might be a galaxy s3 problem? On stock browser with 3 different devices I get nothing. (All S3's). Note..It does work with chrome, just not stock browser.

@gustavo-armenta

This comment has been minimized.

Show comment Hide comment
@gustavo-armenta

gustavo-armenta Apr 9, 2013

Contributor

@dcolaizzomarathon: I played with other three android devices:
Nexus 7 android 4.2 chrome websockets ok
Nexus android 4.1.1 stock browser falls back to foreverFrame. It fails websockets and serverSentEvents
Nexus android 4.2.1 chrome websockets ok, stock browser falls back to foreverFrame

I hope to get a Galaxy S3 next week. In the meantime, could you try this URL? I expect your Stock Browser falls back to foreverFrame.
http://signalr01.cloudapp.net:81/hubs/test/clientsCaller.html

Contributor

gustavo-armenta commented Apr 9, 2013

@dcolaizzomarathon: I played with other three android devices:
Nexus 7 android 4.2 chrome websockets ok
Nexus android 4.1.1 stock browser falls back to foreverFrame. It fails websockets and serverSentEvents
Nexus android 4.2.1 chrome websockets ok, stock browser falls back to foreverFrame

I hope to get a Galaxy S3 next week. In the meantime, could you try this URL? I expect your Stock Browser falls back to foreverFrame.
http://signalr01.cloudapp.net:81/hubs/test/clientsCaller.html

@dcolaizzomarathon

This comment has been minimized.

Show comment Hide comment
@dcolaizzomarathon

dcolaizzomarathon Apr 9, 2013

Websockets and forever frame don't connect. Server sent events and long polling connect. As stated above, if I don't specify longpolling explicitly like in your example it seems it will just hang on websockets and never start the connection.

Websockets and forever frame don't connect. Server sent events and long polling connect. As stated above, if I don't specify longpolling explicitly like in your example it seems it will just hang on websockets and never start the connection.

@davidfowl

This comment has been minimized.

Show comment Hide comment
@davidfowl

davidfowl Apr 9, 2013

Member

@dcolaizzomarathon most likely it's because it's using and older version of websockets that's unsupported by http.sys (not the official spec). Or it might be some other network device blocking websockets. Can you try hitting the url above and pasting the output and the log in the bug?

Member

davidfowl commented Apr 9, 2013

@dcolaizzomarathon most likely it's because it's using and older version of websockets that's unsupported by http.sys (not the official spec). Or it might be some other network device blocking websockets. Can you try hitting the url above and pasting the output and the log in the bug?

@gustavo-armenta

This comment has been minimized.

Show comment Hide comment
@gustavo-armenta

gustavo-armenta Apr 18, 2013

Contributor

I can repro the failure for ws:// and wss://. Galaxy S3 device creates the websocket object successfully but it does not raise any of the events.

I tried public websites and their samples fail to run on the device:
http://www.websocket.org/echo.html
http://websocketstest.com/

Here is the Browser's UserAgent in case we want to add logic to skip websockets

2013-04-18 18:29:46 10.74.156.41 GET /signalr/negotiate _=1366309774447 81 - 131.107.165.85 Mozilla/5.0+(Linux;+U;+Android+4.1.1;+en-us;+SAMSUNG-SGH-I747+Build/JRO03L)+AppleWebKit/534.30+(KHTML,+like+Gecko)+Version/4.0+Mobile+Safari/534.30 http://signalr01.cloudapp.net:81/hubs/test/clientsCaller.aspx 200 0 0 140

Contributor

gustavo-armenta commented Apr 18, 2013

I can repro the failure for ws:// and wss://. Galaxy S3 device creates the websocket object successfully but it does not raise any of the events.

I tried public websites and their samples fail to run on the device:
http://www.websocket.org/echo.html
http://websocketstest.com/

Here is the Browser's UserAgent in case we want to add logic to skip websockets

2013-04-18 18:29:46 10.74.156.41 GET /signalr/negotiate _=1366309774447 81 - 131.107.165.85 Mozilla/5.0+(Linux;+U;+Android+4.1.1;+en-us;+SAMSUNG-SGH-I747+Build/JRO03L)+AppleWebKit/534.30+(KHTML,+like+Gecko)+Version/4.0+Mobile+Safari/534.30 http://signalr01.cloudapp.net:81/hubs/test/clientsCaller.aspx 200 0 0 140

@gustavo-armenta

This comment has been minimized.

Show comment Hide comment
@gustavo-armenta

gustavo-armenta Apr 19, 2013

Contributor

This is the state of the clients after calling "new websocket(url)"

Desktop
websocket.binaryType=blob
websocket.bufferedAmount=0
websocket.extensions=
websocket.protocol=
websocket.url=ws://echo.websocket.org/
websocket.readyState=0

Galaxy S3
websocket.binaryType=undefined
websocket.bufferedAmount=0
websocket.extensions=undefined
websocket.protocol=undefined
websocket.url=undefined
websocket.readyState=0

Contributor

gustavo-armenta commented Apr 19, 2013

This is the state of the clients after calling "new websocket(url)"

Desktop
websocket.binaryType=blob
websocket.bufferedAmount=0
websocket.extensions=
websocket.protocol=
websocket.url=ws://echo.websocket.org/
websocket.readyState=0

Galaxy S3
websocket.binaryType=undefined
websocket.bufferedAmount=0
websocket.extensions=undefined
websocket.protocol=undefined
websocket.url=undefined
websocket.readyState=0

@gustavo-armenta

This comment has been minimized.

Show comment Hide comment
@gustavo-armenta

gustavo-armenta May 4, 2013

Contributor

Fixed

Contributor

gustavo-armenta commented May 4, 2013

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment