Issues when resuming a Discourse session on MS Edge mobile


(ljpp) #1

I do realize that this might be a Microsoft Edge issue, rather than Discourse or any of the frameworks that Discourse is built on. It is also a fact that Win10M is a niche platform, with about 1% install base on the market. However, Microsoft is still keeping it alive, updates are rolled out promptly and they even have introduced new enterprise targeted products, like the HP Elite X3. Based on MSFT’s media comments, they are continuing to pursue the Enterprise market with W10M. I am reporting this for the sake of documentation and in hopes that perhaps Discourse core team has connections to Redmond?

The issue is reproducable with all Windows 10 Mobile devices. I have three different devices.

####Steps to reproduce:

  1. Browse a Discourse based website. Perhaps open links to new tabs, leaving the Discourse session to the background.
  2. End the browsing session. close Edge. Do something else.
  3. Re-open Edge and a tab with a session on a Discourse based site.

####Actual result:

Often the Discourse session does not resume as expected. You may need to do a Reload on the website. Occasionally even this does not work and you get an empty page or error that site is not reachable. You may need to reload again, or sometime even close all browser tabs and browse back to the Discourse driven website.

When you finally get back there, the site again works OK.

####Expected result:

Session is successfully resumed and view updated, if there are new posts on the site.


(rizka) #2

Does this really happen everywhere or just at Tappara.co @ljpp? I’m asking because I’ve experienced the very same issues at Tappara.co, but with iOS 10. So far I have expected them to be just temporary problems and waited if an update of Discourse or iOS would fix it.


(ljpp) #3

Hm…now that you mention it, that is not an impossible theory. Tappara.co is my most used Discourse site (90%) and Edge is my most used mobile browser (90%). I presumed that Edge would be the most obvious suspect, since it has other issues as well – but it is possible I am fooled by my personal usage pattern.

The setup of Tappara.co is rather standard, but there are at least two things that make a difference in comparison to Meta.

  • The official/endorsed Advertising plugin is used, with AdSense ads.
  • CloudFlare DNS is used, with caching.

I am going to try and reproduce this on Meta. But this could be a side-effect of CloudFlare. Hopefully CloudFlare users spot this topic – I need to make the topic more general.


(ljpp) #4

@rizka The Nettitelkku.com is another place we can utilize to isolate the problem. It has identical CloudFlare setup, but no ads installed. So it’s a standard Discourse setup with only visual tweaks applied. Though it is running on 1.7 already, and Tappara.co on 1.6.x.


(ljpp) #5

@Rizka, so glad you posted to this thread, because I am starting to believe you are on to something here.

I started skimming through Meta’s CloudFlare topics, and discovered this one. I realized that I have never implemented long polling base URL. Frankly I did not quite understand the concept and since sites seemed to work somewhat OK, I figured it would not be applicaple in our scenario.

@sam looking at the symptoms in posts 1 and 2, would these be typical side effects if long polling base URL is not configured?

Edit:

Although the polling test with two browsers that Sam proposes as the verification method is working just fine…I think this was the reason why I did not bother with the long polling base URL in the first place.


(ljpp) #6

@codinghorror You modified that title to be CloudFlare specific. Worth pointing out that we do not know that yet. So far it is only a theory, but not yet proven.


(Jeff Atwood) #7

I am quite sure that is your problem as we specifically tell people not to do it.


(ljpp) #8

I am hesitating a bit to provide a sub-domain that bypasses CloudFlares CDN, for security reasons (reveals real IP).

However, CloudFlare has Page Rules and one can configure something like this:

What do you think - would that do the trick?


(ljpp) #9

Modified the title so that it describes the issue, not one of the possible root causes.

  • Read through all the CDN related documents here. We are not doing full acceleration, whatever that means. Only static content should be cached, and all more exotic accelerator methods (Railgun, RocketLoader) are disabled.
    • I noticed that a lot of forum members are using CloudFlare and a similar setup, and yet none has reported this kind of issues.
  • Issue seems to be limited to mobile. Never seen it on a desktop browser.
  • I did Sam’s proposed polling tests and they work. Also based on Chrome’s inspector, the */poll requests work OK.

Just reproduced this at Tappara.co by waiting overnight. Then resumed the session, got a Discourse error page for network connection, reloaded and again it works.

So far I have not been able to reproduce here at Meta. Hey CloudFlare users, could you give me your URL and/or try this on your site?


(ljpp) #10

Some updates, but no root cause. I could really use some comments from other members of the community.

  • My buddies at MSPowerUser confirmed that Edge has a tendency for this kind of behaviour.
    • iOS Safari also performs cheap tricks like initially showing a screenshot of the site, rather than the site itself, when resuming a session. Especially in low memory conditions. @Rizka, was your iPad one of the older models?
  • That does not fully explain the issue though - I can rather easily repro it at Tappara.co using Edge, but not here at Meta.
  • @codinghorror, could you point me a client site of yours that runs the official advertising plugin? If we exclude CloudFlare, that is one key difference in between our site and this one.

(rizka) #11

This is old, but not super old. I told you earlier it’s an iPad 2, but that’s not true now that I investigated a little. It’s a fourth generation iPad that was released initially in late 2012 when I also got this. Four years that is. The model number is A1460 if you want to look it up. I still get all the iOS software updates although any older devices do not. The device is getting out of date next probably, but hasn’t got yet.

I think you are on the right track. I described the symptoms earlier at Tappara.co, but I didn’t remember that at first it certainly shows a site with no updates topics. A cached version that must be. Once when I refresh the spinner starts to rotate until I refresh when I get a server can’t be reached error. The third refresh starts a normal session.


(ljpp) #12

Would you say that 1.7 has improved this? I am still getting this issue occasionally on Edge, but perhaps less than before. The session will resume in many cases, but one must wait a pretty long time - the view is slowly updated later on.


(Sam Saffron) #13

I am not sure how we even can control this, browser is doing what the browser wants to do.


(ljpp) #14

Yeah, there are slight rendering issues with Edge Mobile here and there. MSFT cant do browsers, we all know that, but I will be reporting them anyway. I happen to be cursed wIth W10M devices.


(rizka) #15

I have never reproduced the issue again. Not in 1.6 or in 1.7. The frequent occasions took place in a period of a couple of weeks, about a month ago. I let you know if it starts to happen again.


(ljpp) #16

Finally reproduced it here. At least our own site is not the root cause.


(Sam Saffron) #17

I can make that happen easy peasy by entering flight mode and clicking a topic :slight_smile:


(ljpp) #18

Haha. This came the described way. Using Edge, resumed a session, spinner rolling, boom.


(Jeff Atwood) #19

Basically you need a functioning internet connection to load a page. What’s surprising about this, exactly @ljpp?


(ljpp) #20

Come on Jeff…I am on 50mbits right now. This is not a connection error.