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

Several browsers show infinite loading status #215

Closed
xqiu opened this issue Mar 1, 2012 · 80 comments
Closed

Several browsers show infinite loading status #215

xqiu opened this issue Mar 1, 2012 · 80 comments
Assignees
Milestone

Comments

@xqiu
Copy link

xqiu commented Mar 1, 2012

When I tried SignalR app with IE8, seems it always trying to show loading status in the status bar in IE8. The temp site is http://319c8b3d7b394b46b1b7b7eb67d32778.cloudapp.net/. Contact me privately for code. Thanks.

Similar issues:

@ghost ghost assigned DamianEdwards Mar 8, 2012
@kowsheek
Copy link

kowsheek commented Mar 8, 2012

This is the case with Safari (on Windows) as well.

@redsquare
Copy link

The standard fix was to include a dummy iframe and set its src to an empty blank.htm file on the root of the site after say 100ms. This would force the loading bar to finish even if other iframes were busy. To avoid needing each site that uses signalr to include a blank.htm you could try creating a dummy iframe and setting its src property to about:blank in a setTimeout. This may force the progress bar to fill up. Let me test.

@DamianEdwards
Copy link
Member

I tried the suggested fix previously in Firefox and it fixed the loading indicator issue there (although we don't use Forever Frame in Firefox), so hopefully it will work here for IE8 and Safari too.

@redsquare
Copy link

This does work, just added the following to our app and it cures ie7/8

  window.setTimeout(function() {
        var $fakeFrame = $('<iframe style="height:0;width:0;display:none" src="/favicon.ico"></iframe>');
        App.$body.append($fakeFrame);
        $fakeFrame.remove();
    }, 1500);

@EliteMikeS
Copy link

I tried the code that redsquare posted, It works initially, but after a few minutes I'm getting the indicator again. I know an older version of signalR was not causing this issue. Any other suggestions would be greatly appreciated. I have a few months to figure this out.

@redsquare
Copy link

I didnt leave it open that long on ie! It will be as the reconnect happens after 110 seconds. Maybe need to hook into the client reconnect event and do a similar thing to above? Will test it now to see if I can replicate.

@EliteMikeS
Copy link

so I actually added the logic to the signalr.js file. I put the code in the connect and reconnect part of the forever frame code and that seems to solve this issue, but while using fiddler, I came across a more alarming issue that may be the real cause to my problem.

Let me first say that I have this working in 3 basic demo apps. The problem resides in the web app where I'm trying to implement it.

For some reason, after the client receives data the first time from the hub, signalr is trying to reach http://myhost/signalr It appears it's trying to re-establish the long poll but fails.

I even tried to put my logic on a blank aspx page with the a basic echo function and its failing. Something is different about my existing project vs the demo ones I created.

@BennyM
Copy link

BennyM commented May 14, 2012

Issue not only exists on Safari in Windows but also on Lion.

@davidfowl
Copy link
Member

Mobile safari seems to have this behavior by default with SSE http://googlecodesamples.com/html5/sse/sse.html. I also see the same for longPolling on mobile safari. So I'm thinking that's by design. I can't repro the other behavior on IE8 or Safari on windows. Here's my test site:
http://signalr-demo.apphb.com/

I used http://www.browserstack.com/user/dashboard to do testing on different platforms.

@BennyM
Copy link

BennyM commented Jul 9, 2012

I've been able to reproduce it, if sporadically.

Add an image element to the sample stockticker.
Open a market in a browser.
Navigate with Safari to the stockticker
Hit refresh several times and eventually you'll get the spinning wheel and loading indicator, even when the page is fully loaded.

It should be noted I'm testing on IIS7 and thus using long polling.

@BennyM
Copy link

BennyM commented Jul 9, 2012

You can also reproduce it by going to http://jabbr.net/ , sign in & hit refresh. You'll get a loading indicator in Safari.

@BennyM
Copy link

BennyM commented Jul 11, 2012

I've been able to address the issue in Safari as explained on StackOverflow . I now start the connection (hub) in a timeout instead of doing it directly in the ready/load handler.

@NTaylorMullen
Copy link
Contributor

Applied Feature label to this since we added waitForPageLoad option for the javascript client with pull request #578.

@yngvebn
Copy link

yngvebn commented Sep 6, 2012

I'm still getting this issue with SignalR v0.5.3.3.3.

Current workaround is to create a fake iframe and remove it, some milliseconds after page load.
Problem is that everytime I get a response from the server (via SignalR), it displays the message in statusbar again.

@NTaylorMullen
Copy link
Contributor

Could you provide repro? Also, what version of Safari are you using?

@yngvebn
Copy link

yngvebn commented Sep 6, 2012

Yeah. It's a basic SignalR setup in MVC4 with a hub. No fancy stuff. And it's on IE8 running on a Windows XP virtual machine. IIS7.5 in Windows 7.

Repro:

  • Install SignalR from Nuget
  • Add one hub
  • Define a method on client side in javascript.
  • call the method from hub (server side)

Waiting of course for the $.connection to be established with a callback in .done()

See how the tab keeps loading, and statusbar displays "waiting for ...." with foreverFrame as transport.

@khushal999p
Copy link

Not working ... safari 5.1.7 keeps on loading How to fix this issue....anyone?

@NTaylorMullen
Copy link
Contributor

Safari for windows? I'm not able to repro via 5.1 on Mac

@NTaylorMullen
Copy link
Contributor

Reopening due to known IE8 continuance and limited versions of Safari reproduction.

@NTaylorMullen NTaylorMullen reopened this Sep 12, 2012
NTaylorMullen added a commit that referenced this issue Mar 22, 2013
… from the dom

- This prevents the infinite loading icon in IE8 and below (does not
happen for > ie8)

#215
NTaylorMullen added a commit that referenced this issue Mar 23, 2013
- Essentially just reference counts the connections that are attached to
the loadPreventer
- Also changed the way I create garbage frames.  Moved the variable into
the inner closure

#215
NTaylorMullen added a commit that referenced this issue Mar 23, 2013
… from the dom

- This prevents the infinite loading icon in IE8 and below (does not
happen for > ie8)

#215
NTaylorMullen added a commit that referenced this issue Mar 23, 2013
- Essentially just reference counts the connections that are attached to
the loadPreventer
- Also changed the way I create garbage frames.  Moved the variable into
the inner closure

#215
NTaylorMullen added a commit that referenced this issue Mar 23, 2013
NTaylorMullen added a commit that referenced this issue Mar 25, 2013
… from the dom

- This prevents the infinite loading icon in IE8 and below (does not
happen for > ie8)

#215
NTaylorMullen added a commit that referenced this issue Mar 25, 2013
- Essentially just reference counts the connections that are attached to
the loadPreventer
- Also changed the way I create garbage frames.  Moved the variable into
the inner closure

#215
NTaylorMullen added a commit that referenced this issue Mar 25, 2013
@ghost ghost assigned Xiaohongt Mar 25, 2013
@Xiaohongt
Copy link
Contributor

On IE8, this fix blocks debugging on SignalR script when use foreverFrame, the breakpoint can't be set for JS debugger

@NTaylorMullen
Copy link
Contributor

After discussion earlier today we wanted to increase the interval in which we add/remove iframes so that will further make debugging difficult

@Xiaohongt
Copy link
Contributor

now on IE8 the breakpoint can be set and debugging work for the page with the fix on my machine. (Last night, the page with the fix debugging didn't work, but at the same time other page debugging worked, don't know what happened at that time)

@Xiaohongt
Copy link
Contributor

verified for multiple connections on IE8 /IE7, about the fix causing IE8 Developer Tools / Script interval refresh, we just wait for customers feedback.

@NTaylorMullen
Copy link
Contributor

This was fixed for ie8 in the next release, there is still a loading issue in ios and android. Reopening.

@NTaylorMullen NTaylorMullen reopened this Mar 29, 2013
@yngvebn
Copy link

yngvebn commented Mar 29, 2013

I would propose closing this issue, and opening a separate one targeting more specific browsers. Now that IE8/7 is fixed that would be useful to know by looking at this thread.

what about a new issue specifying iOS and Android, with a reference to this issue?

@blaster151
Copy link

Wow - before finding this thread I was wrestling with a sudden break in behavior in Safari on iOS, stuff that had worked before stopped, and I hadn't made the connection to the iOS6 upgrade until now. It makes sense! Dynamically loaded images would no longer appear, but it wasn't clear that this was related to SignalR. My fix was to plug in a behind-the-scenes image preloader for all anticipated images that I knew my page could dynamically load, and that resolved the issue for me.

@nilaychaudhari
Copy link

@davidfowl , @yngvebn
Can you give me the issue number specific iOS if created a new one while closing this issue , as we are getting error in safari browser, I need to track the issue.
FYI I have posted Issue #1586 , which was closed against this issue.
I have also updated latest signalR(Version 1.0.1), however it din't work to fix the issue I have reported.

@jflee
Copy link

jflee commented Apr 25, 2013

What is the latest for this issue? I'm using v1.0.1 too but facing the same issue on iOS Safari, can someone guide me to the solution? Thanks!

@willdean
Copy link

@jflee - there is no 'solution', because the problem is that iOS Safari has a broken server-sent events implementation. Some work-arounds are: Use Chrome instead of Safari, preload images so that you're not trying to load them while SignalR is active, and apparently there are some possibilities of loading images from other domains, which I haven't tried and might be difficult to implement anyway.

@Jazaret
Copy link

Jazaret commented Apr 25, 2013

@jflee take a look at issue #1406 aerlijman has an acceptable workaround.

@Dora407
Copy link

Dora407 commented Aug 20, 2014

@JMacPSU code not working in IE 11. i checked in IE9 and IE10 working fine.
I am using SignalR version is 1.1.4.
any further changes in IE11 ?

@beefydog
Copy link

beefydog commented Mar 2, 2015

It is March 1st, 2015. So I take it iOS and Safari clients are still not compatible with SignalR?

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

No branches or pull requests