web-bugs icon indicating copy to clipboard operation
web-bugs copied to clipboard

www.chanel.com - Blank page is loaded

Open webcompat-bot opened this issue 5 years ago • 9 comments

URL: https://www.chanel.com/en_CA/fashion/products/handbags.html

Browser / Version: Firefox Mobile 95.0 Operating System: Android 11 Tested Another Browser: Yes Chrome

Problem type: Site is not usable Description: Page not loading correctly Steps to Reproduce: Page content flashes and is replaced by white screen

View the screenshot Screenshot
Browser Configuration
  • gfx.webrender.all: false
  • gfx.webrender.blob-images: true
  • gfx.webrender.enabled: false
  • image.mem.shared: true
  • buildID: 20211005094529
  • channel: nightly
  • hasTouchScreen: true
  • mixed active content blocked: false
  • mixed passive content blocked: false
  • tracking content blocked: false

View console log messages

From webcompat.com with ❤️

webcompat-bot avatar Oct 09 '21 04:10 webcompat-bot

We appreciate your report. I was able to reproduce the issue. The page flashes, and then remains blank:

Screenshot_11

Tested with: Browser / Version: Firefox Nightly 95.0a1 (2015839083 -🦎95.0a1-20211009212622🦎)/ Chrome Mobile Version 94.0.4606.71 Operating System: Samsung A51 (Android 11) -1080 × 2400 pixels 20:9 aspect ratio (~405 ppi density)

Notes:

  1. Reproducible regardless of the status of ETP
  2. Reproducible on the latest build of Firefox Nightly
  3. Works as expected using Chrome: Screenshot_12

Moving this to NeedsDiagnosis for further investigations.

softvision-raul-bucata avatar Oct 11 '21 08:10 softvision-raul-bucata

This doesn't reproduce in the responsive design mode, but I see this in the webconsole on a live device:

TypeError: can't access property 0, O.a[e.effectiveConnectionType] is undefined
    shouldComponentUpdate main.03d1cfff4843e92e29ac.js:12584

Given the variable name effectiveConnectionType, this is likely related to the site expecting the experimental Chrome-only NetworkInformation API navigator.connection.effectiveType property to be defined on Firefox/Safari.

This is the code:

      shouldComponentUpdate(e, t) {
        const {
          src: s
        }
        = e.reader._fileReference,
        i = O.a[e.effectiveConnectionType][0],
        a = O.a[this.lastConnectionType][0];
        return this.src !== s || !Object(b.q) (this.state, t) || this.props.active !== e.active || i < a
      }

And looking over their code, they do just expect effectiveType to be defined:

effectiveConnectionType: 'undefined' != typeof navigator && 'connection' in navigator && 'effectiveType' in navigator.connection ? navigator.connection.effectiveType : e

/* and */

effectiveConnectionType: navigator.connection.effectiveType

I've filed bz1737852 to see whether we can implement the property, but Chanel should certainly fall back on type instead of effectiveType if they want proper Firefox and Safari support until the effectiveType API is standardized.

We could also do a temporary site patch here which just defines navigator.connection.effectiveType = navigator.connection.type.

(Funny enough, the reason is works in Firefox's responsive design mode is that it actually defines Chrome-only experimental properties even when emulating a Firefox or iOS browser, where it's normally undefined due to being unsupported).

wisniewskit avatar Oct 26 '21 17:10 wisniewskit

Message sent via 'contact us' form

mozilla829 avatar Dec 20 '21 08:12 mozilla829

Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1751065

ksy36 avatar Jan 20 '22 19:01 ksy36

We could also do a temporary site patch here which just defines navigator.connection.effectiveType = navigator.connection.type.

I've tested the intervention and looks like the site expects effective type to be one of the values in this list:

const {effectiveType: c} = navigator.connection
                      , e = {
                        "slow-2g": [30, 30],
                        "2g": [50, 50],
                        "3g": [65, 65],
                        "4g": ["auto", 90]
                    }[c] || null;

This list is used for determining images quality.

For example slow-2g getting lower quality: https://www.chanel.com/images/q_30,f_auto,fl_lossy,dpr_auto/w_428/pants-dark-blue-tweed-tweed-packshot-default-p72339v63981ng787-8849826185246.jpg and 4g the highest https://www.chanel.com/images/q_auto,f_auto,fl_lossy,dpr_auto/w_856/pants-dark-blue-tweed-tweed-packshot-default-p72339v63981ng787-8849826185246.jpg

I'm testing it while on wifi, therefore defining navigator.connection.effectiveType = navigator.connection.type in Firefox will make it equal to wifi, which is not on the list and it's throwing another error. Chrome has effectiveType: "4g", type: "wifi", so I'm thinking hardcoding navigator.connection.effectiveType either 3g or 4g. While it will be slower to load if a user is actually on a slow network, but I think it's a better experience than having an empty page.

ksy36 avatar Jan 25 '22 02:01 ksy36

@ksy36, we could also make it use "wifi" on desktop Firefox, and "3g/4g" on Android, if that makes more sense.

wisniewskit avatar Jan 25 '22 16:01 wisniewskit

Right, so desktop doesn't have this problem as it seems to be going through a different code path, so the intervention will be just for Android.

ksy36 avatar Jan 25 '22 19:01 ksy36

The issue has been fixed and it is no longer reproducible. The page loads as expected, regardless if the Intervention is enabled or not:

works chanel

Tested with: Browser / Version: Firefox Nightly 99.0a1 (2015863755 -🦎99.0a1-20220216094238🦎) Operating System: Samsung A51 (Android 11) -1080 × 2400 pixels 20:9 aspect ratio (~405 ppi density)

I've created a Bugzilla task for this: https://bugzilla.mozilla.org/show_bug.cgi?id=1755948

Closing this as FIXED

softvision-raul-bucata avatar Feb 17 '22 15:02 softvision-raul-bucata