webcompat / web-bugs

A place to report bugs on websites.
https://webcompat.com
Mozilla Public License 2.0
741 stars 64 forks source link

mail.google.com - "Offline mode" feature not available #32531

Closed softvision-oana-arbuzov closed 5 years ago

softvision-oana-arbuzov commented 5 years ago

URL: https://mail.google.com/mail/u/0/#settings/offline

Browser / Version: Firefox Nightly 69.0a1 (2019-06-05) Operating System: Windows 10 Pro Tested Another Browser: Yes

Problem type: Site is not usable Description: "Offline mode" feature not available

Prerequisites:

  1. Google account available and sign in. Steps to Reproduce:
  2. Navigate to https://mail.google.com/mail/u/0/#settings/offline
  3. Observe behavior.

Expected Behavior: “Offline” feature is available.

Actual Behavior: “Offline unavailable” notification message is displayed.

Note

  1. Not reproducible on Chrome 74.0.3729.169.
  2. Screenshot attached.

Watchers: @softvision-oana-arbuzov @softvision-sergiulogigan @cipriansv

sv; Screenshot Description

Browser Configuration
  • None

From webcompat.com with ❤️

karlcow commented 5 years ago

This is the message:

The browser that you are using is missing some features required to enable offline. To enable offline, you must use Chrome with version 61 or higher.

    Chi = function() {
      var b = rc + N(Ag) + G2h + N(lm) + h;
      b += Bhi({
        iQa: eA(phi),
        gQa: eA(
          "The browser that you are using is missing some features required to enable offline. To enable offline, you must use Chrome with version 61 or higher."
        )
      });
      return K(b + kea);
    },

used in

  xhi.prototype.render = function() {
    var b = this;
    if (!this.Ia || (Zw() && !this.Sa)) Hhi(this), this.ra.Ib(jQb);
    else if (Fle())
      if (this.Ba && this.Ba.Vb("wod"))
        bN(this.Ca, this.Od.Ea(), Ehi), this.ra.Ib(mQb);
      else {
        var c = this.Ba && this.Ba.Vb("womdo") ? G6h() : Ep.resolve(1),
          d = Ihi(),
          e = this.Bb.ra();
        Promise.all([d, e, c]).then(function(f) {
          var g = Op(f);
          f = g.next().value;
          var k = g.next().value;
          g = 1 == g.next().value;
          b.ha || (f && k && g)
            ? (Jhi(b), b.ra.Ib(iQb))
            : k
            ? f
              ? g || (bN(b.Ca, b.Od.Ea(), Ehi), b.ra.Ib(nQb))
              : ((f = { $h: b.Pa.ha(1306849), yp: ohi }),
                bN(b.Ca, b.Od.Ea(), Dhi, f),
                b.ra.Ib(kQb))
            : b.Bb.wa();
        });
      }
    else bN(this.Ca, this.Od.Ea(), Chi), this.ra.Ib(lQb);
  };

don't we like minified code…

The this is an object with plenty of parameters. There is a zd: "offline".

The Zw() call is

var PZa = Ww.resolve(new Kw('devicecompliance')),
Zw = function () {
  var b = Ww.getPath();
  return KZa.test(b) || OZa.test(b)
},

The devicecompliance here is smelly.

Then it goes on to test

  Fle = function () {
    return qBa() && up && vp(61) && !!tp.MessageChannel
  },
  qBa = function () {
    return !!tp.navigator && !!tp.navigator.serviceWorker
  },

This vp(61) looks strangely the sign of UA sniffing. 61 being the minimum chrome version they support.

Yeah that looks like UA sniffing.

    R8a = (function() {
      if (wp) return Q8a(/Firefox\/([0-9.]+)/);
      if (es || fs || ds) return ms;
      if (up) return UHa() ? Q8a(/CriOS\/([0-9.]+)/) : Q8a(/Chrome\/([0-9.]+)/);
      if (LA && !UHa()) return Q8a(/Version\/([0-9.]+)/);
      if (S6a || KA) {
        var b = /Version\/(\S+).*Mobile\/(\S+)/.exec(sr);
        if (b) return b[1] + "." + b[2];
      } else if (T6a)
        return (b = Q8a(/Android\s+([0-9.]+)/)) ? b : Q8a(/Version\/([0-9.]+)/);
      return "";
    })(),
    vp = function(b) {
      return 0 <= mr(R8a, b);
    };

Let contact them.

karlcow commented 5 years ago

I contacted them on the mailing-list

asutherland commented 5 years ago

I was under the impression from when we tried to spoof user-agents a while back so that Fennec could get a better gmail experience that gmail offline needs some Chrome-only APIs, and so while feature detection could be used instead of UA sniffing, it's more than just UA sniffing going on.

karlcow commented 5 years ago

@asutherland It could be. When we spoof as chrome, we can access the settings. There might be a reason why they put the message, but I would like to know why. rIght now the blocking is done with UA detection. The email I sent is exactly about asking why they need to block firefox.

karlcow commented 5 years ago

Close as duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1524772

lock[bot] commented 5 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue at https://webcompat.com/issues/new if you are experiencing a similar problem.