indywidualny / FaceSlim

Web App for Facebook. Lightweight, ad-free, chat support and modern look.
http://indywidualni.org
GNU General Public License v2.0
316 stars 63 forks source link

Force mobile site (touch.facebook.com) + Stories issue on mobile data #359

Closed kowith337 closed 6 years ago

kowith337 commented 6 years ago

Note that may depend on users who got feature to open/upload stories without the need to use/install official app, include MESSenger and Facebook Lite.

Steps to reproduce

  1. Make sure you're logged in
  2. Make sure you're connect to mobile data (especially if your operator support Free Basics)
    • You can determine by tap the menu in Facebook and you can see two menu (Free Basics and Facebook Free Mode) added
  3. Set app to "Force mobile site"
  4. Set this user agent > Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.77.34.5 Safari/537.36
  5. Try upload photo into your stories, or watch other people's stories

Expected behaviour

You can upload and post stories or you can view other people's stories

Actual behaviour

The cause

I've tested outside of your app, e.g. use Fenec F-Droid or IceCatMobile and spoof user agent for touch.facebook.com through about:config and found Facebook redirect some requests to mobile.facebook.com and may fail to receive referrer or header data because of cross origin domain policy. However, I cannot reproduce issue when connect to Wi-Fi (Not mobile hotspot), also observed network log and found none of any attempts to redirect some requests to mobile.facebook.com while using on this kind of network.

creativetrendsapps commented 6 years ago

What is "Chrome/99.77.34.5 "?

kowith337 commented 6 years ago

I've got the version number from Chromium "Content shell"

creativetrendsapps commented 6 years ago

@kowith337 that's odd. Chrome isn't close to version 99 as of yet.

kowith337 commented 6 years ago

I don't think it's any matter about browser version, but overall if user agent isn't point to mobile device such as Android, iOS or just Mobile are still fine...

This is my original user agent

Mozilla/5.0 (Linux; Android 5.0.2; HTC One E9PLUS dual sim Build/LRX22G; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.91 Mobile Safari/537.36

First think is simply change user agent to desktop variants (also not related to Windows or Mac), otherwise, Facebook will redirect to mobile.facebook.com or m.facebook.com regardless of app settings.

Spoofing to another user agent that not related to mobile devices still have a chance to go through touch.facebook.com directly, but still lost ability on mobile data because they still redirect connections to mobile.facebook.com and cause any seamless navigation to be stuck, not just for Facebook stories, but likely all navigations.

Additional Edit: It's same happen if you set to force app to load basic site (mbasic.facebook.com) while have two conditions triggered

you may found it's redirect to h.facebook.com with normal HTTP protocol, then ended up to load touch layout because it's redirect to m.facebook.com or mobile.facebook.com after successfully detect those two conditions above.

kowith337 commented 6 years ago

I realize this is an external problem that occur by Facebook and their Free Basics systems, seems like it's no point for here.