mozilla / testpilot

Test Pilot is a platform for performing controlled tests of new product concepts in Firefox
https://testpilot.firefox.com/
250 stars 123 forks source link

Experiments images are not displayed on Facebook and Twitter posts #3719

Open SoftVision-CosminMuntean opened 6 years ago

SoftVision-CosminMuntean commented 6 years ago

[Affected versions]:

[Affected Platforms]:

[Prerequisites]:

[Steps to reproduce]:

  1. Open browser with the profile from prerequisites and navigate to https://testpilot.firefox.com page.
  2. Click on one of the active experiments cards and after redirected, copy the page URL.
  3. In two new tabs, navigate to "https://www.facebook.com" and "https://twitter.com" pages.
  4. Paste the copied URL in the Facebook message box and "Post" it.
  5. Paste the same URL in the Twitter message box and "Tweet" it.
  6. Observe both the posted messages on the social platforms.

[Expected result]:

[Actual result]:

[Notes]

pdehaan commented 6 years ago

This is interesting... I was thinking that it was the same old issue of navigating directly to a page versus the metadata when you navigate through the app. But at least for Firefox Color, the metadata may just be wrong (since I get 404s on the og:image and twitter:image URLs):

<meta property="og:type" content="website">
<meta property="og:title" content="Firefox Test Pilot - Color">
<meta name="twitter:title" content="Firefox Test Pilot - Color">
<meta name="description" content="Show your colors. Create and share your own Firefox themes with just a few clicks.
">
<meta property="og:description" content="Show your colors. Create and share your own Firefox themes with just a few clicks.
">
<meta name="twitter:description" content="Show your colors. Create and share your own Firefox themes with just a few clicks.
">
<meta name="twitter:card" content="summary">
<meta property="og:image" content="https://testpilot.firefox.com/static/images/experiments/notes/color-fb.jpg">
<meta name="twitter:image" content="https://testpilot.firefox.com/static/images/experiments/notes/color-twitter.jpg">
<meta property="og:url" content="https://testpilot.firefox.com/experiments/color/">

https://github.com/mozilla/testpilot/blob/8a6c904dd4dc1842abc4e406a947c134d9fd654d/content-src/experiments/color.yaml#L15-L16

Note how the image_twitter and image_facebook reference the "/notes/" folder, yet I don't see those assets in either the ./frontend/src/images/experiments/notes folder, or the ./frontend/src/images/experiments/color folder.


For the Lockbox icons, I was convinced it was because we are hardcoding the production URL, but haven't pushed that experiment live yet, so it would be missing the assets on the prod server:

<meta property="og:image" content="https://testpilot.firefox.com/static/images/experiments/lockbox/social/share-facebook.jpg">
<meta name="twitter:image" content="https://testpilot.firefox.com/static/images/experiments/lockbox/social/share-twitter.jpg">
pdehaan commented 6 years ago

Not sure what's happening w/ Notes. Looks like the URLs haven't changed (even though the assets were modified lately in #3706):

<meta property="og:image" content="https://testpilot.firefox.com/static/images/experiments/notes/notes-fb.jpg">
<meta name="twitter:image" content="https://testpilot.firefox.com/static/images/experiments/notes/notes-twitter.jpg">
<meta property="og:url" content="https://testpilot.firefox.com/experiments/notes/">

https://github.com/mozilla/testpilot/tree/master/frontend/src/images/experiments/notes

FIGURE 1: /frontend/src/images/experiments/notes/notes-fb.jpg

Yet, the URL returns a 404 on prod: https://testpilot.firefox.com/static/images/experiments/notes/notes-fb.jpg