amp-wp icon indicating copy to clipboard operation
amp-wp copied to clipboard

Blank White Page when linking to website in Facebook App for Android

Open gimmiefreebies opened this issue 4 years ago • 11 comments

Hello, last Thursday my Facebook fans notified me that any links to my website, accessed through the Facebook app on Android, opened to a blank white page. In other words, links to my website were posted on Facebook. Fans using an Android device with the Facebook app tried to access my website links on Facebook app. Facebook app, by default, uses its own browser. My web page opened a blank, white page. I’m assuming it’s a Facebook app upgrade that caused this. I hadn’t changed anything on my website.

After troubleshooting for hours, I tried disabling the AMP WordPress plugin and voila! the links opened my website properly again. No more white screen of death. The plugin remains disabled for now.

My question: how can I have AMP enabled AND have Facebook properly open links to my website on the Facebook for Android app? I’d prefer to use amp because it helps page speed and ranking. But, a huge portion of my traffic comes from Facebook, so I can’t ignore that either.

If I had a handful of fans, I could ask them all to stop using Facebook app, or to start using “open website in browser”. But, my posts are seen by thousands of fans and that’s just not feasible. Thanks 🙂

gimmiefreebies avatar Jun 24 '21 12:06 gimmiefreebies

The issue seems related to Facebook's Andriod App's Browser not redirecting the pages properly to the AMP version.

I will recommend contacting Facebook Support also follow this bug which was recently opened describing the same issue.

milindmore22 avatar Jun 24 '21 13:06 milindmore22

for now, I will recommend posting the AMP URL in the Facebook post or disabling the mobile redirect.

milindmore22 avatar Jun 24 '21 13:06 milindmore22

Can you disable the mobile redirect ONLY for links posted in Facebook app?

gimmiefreebies avatar Jun 24 '21 14:06 gimmiefreebies

@gimmiefreebies JFI : I currently debugging this at my end and may come up with a mini plugin or code snippet that you can use to disable mobile redirect on Facebook.

milindmore22 avatar Jun 24 '21 17:06 milindmore22

@gimmiefreebies Please download and install this mini plugin which disables mobile redirection only for facebook's in-app browser, let me know if you face any issues.

milindmore22 avatar Jun 24 '21 19:06 milindmore22

Conditionally disabling mobile redirection may not work when page caching is employed, as the page caching plugin may not vary caches by the FB user agent.

westonruter avatar Jun 24 '21 20:06 westonruter

@westonruter Should we introduce a filter that passes user agents on which mobile redirect won't happen, so kind of selective redirect

milindmore22 avatar Jun 25 '21 09:06 milindmore22

I do use Cloudflare, as well as SG Optimize wp plugin, which has its own caching (NGINX direct delivery, dynamic cache, and memcache)

gimmiefreebies avatar Jun 25 '21 12:06 gimmiefreebies

Should we introduce a filter that passes user agents on which mobile redirect won't happen, so kind of selective redirect

@milindmore22 I think that could cause problems because when page caching is used, the result is that page caching could end up caching the redirect to the AMP version when the FB user agent is used. If the cache isn't varied by the FB user agent, then non-FB desktop user agents could end up getting getting redirected to the AMP version unexpectedly.

westonruter avatar Jun 25 '21 16:06 westonruter

@westonruter I was thinking of passing those user agents in mobile redirection script like rejectedMobileUserAgents and add a check before mobileUserAgents, we can add a filter to pass rejected Mobile User Agents, so users can make use of it in such situations in the future.

@gimmiefreebies As Weston pointed out the mini plugin may not work very well when page caching is used, so I will recommend deactivating mobile redirection for some time, As per the latest comment on the bug report, The Facebook devs are aware of the issue and may roll out a fix soon!

milindmore22 avatar Jun 25 '21 17:06 milindmore22

I was thinking of passing those user agents in mobile redirection script like rejectedMobileUserAgents and add a check before mobileUserAgents, we can add a filter to pass rejected Mobile User Agents, so users can make use of it in such situations in the future.

This is captured in #5387 with a proposal to add a filterable user agent exclusion list which could by default include tablets, but a user could also add FB.

westonruter avatar Jun 25 '21 18:06 westonruter

IMG_7694

  • [ ]

jkoooo4456 avatar Jan 06 '24 05:01 jkoooo4456

Hello, last Thursday my Facebook fans notified me that any links to my website, accessed through the Facebook app on Android, opened to a blank white page. In other words, links to my website were posted on Facebook. Fans using an Android device with the Facebook app tried to access my website links on Facebook app. Facebook app, by default, uses its own browser. My web page opened a blank, white page. I’m assuming it’s a Facebook app upgrade that caused this. I hadn’t changed anything on my website.

After troubleshooting for hours, I tried disabling the AMP WordPress plugin and voila! the links opened my website properly again. No more white screen of death. The plugin remains disabled for now.

My question: how can I have AMP enabled AND have Facebook properly open links to my website on the Facebook for Android app? I’d prefer to use amp because it helps page speed and ranking. But, a huge portion of my traffic comes from Facebook, so I can’t ignore that either.

If I had a handful of fans, I could ask them all to stop using Facebook app, or to start using “open website in browser”. But, my posts are seen by thousands of fans and that’s just not feasible. Thanks 🙂

Uploading IMG_7694.jpeg…

jkoooo4456 avatar Jan 06 '24 05:01 jkoooo4456