jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Facebook Login Doesn't Work in Jetpack Comments

Open muffinpeace opened this issue 4 years ago • 21 comments

Impacted plugin

Jetpack

Steps to Reproduce

  1. Install, activate and connect the latest Jetpack release.
  2. Make sure comments are activated.
  3. Activate the option for visitors to use WordPress.com, Google, Twitter, or Facebook to comment (Jetpack Settings > Discussion).
  4. Try commenting using Facebook

A clear and concise description of what you expected to happen.

Being able to comment using the Facebook account.

What actually happened

Nothing happens and the page only does animation as if it loaded. An error is also shown in the console: Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings

Other information

This was initially received on 4751158-zen and I've been able to reproduce that on my end.

Operating System

No response

OS Version

No response

Browser

Firefox

Browser Version(s)

No response

muffinpeace avatar Feb 07 '22 08:02 muffinpeace

Thanks for the report! That seems to be new. For reference, here is the full error:

{
   "error": {
      "message": "Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.",
      "type": "OAuthException",
      "code": 191,
      "fbtrace_id": "AyGDq-JvegnrjwQ-FfkybGv"
   }
}

jeherve avatar Feb 07 '22 08:02 jeherve

cc @renanferrari Could this be linked to the recent changes you made to the app settings, as part of pbArwn-3xe-p2?

jeherve avatar Feb 07 '22 09:02 jeherve

Hey @jeherve, thanks for the ping! Looking at the error message above, it does seem related.

For reference, here's how this issue was addressed on the backend: r238579-wpcom

renanferrari avatar Feb 07 '22 19:02 renanferrari

Thanks for the extra details!

cc @pablinos, who worked on that change.

jeherve avatar Feb 08 '22 08:02 jeherve

I think D74630-code should fix it.

pablinos avatar Feb 08 '22 21:02 pablinos

Reported here: #4761250-zen

philnick206 avatar Feb 09 '22 11:02 philnick206

@jeherve,

Wanted to ask about a different, but related issue.

I did this

Activate the option for visitors to use WordPress.com, Google, Twitter, or Facebook to comment (Jetpack Settings > Discussion).

I was able to see the options to log in from WordPress.com, Google, Twitter, or Facebook on Firefox to add a comment, but on Chrome or Safari, I can't see them.

I tried it on a JN site, should I open a new issue for it?

Firefox:

Screenshot 2022-02-09 at 5 20 46 PM

Chrome

Screenshot 2022-02-09 at 5 21 54 PM

spsiddarthan avatar Feb 09 '22 11:02 spsiddarthan

My bad, chrome works fine if I tried from a different profile, might probably have something to do with ad-blockers, so ignore my previous comment

spsiddarthan avatar Feb 09 '22 14:02 spsiddarthan

might probably have something to do with ad-blockers

Yes, that would be it. Some ad-blockers specifically target and hide "social" things like logos. ¯_(ツ)_/¯

jeherve avatar Feb 09 '22 15:02 jeherve

Hello. Has this been resolved. I couldn't quite work it out? Following up in relation to #4761250-zd

rickmgithub avatar Feb 10 '22 13:02 rickmgithub

@rickmgithub The fix hasn't been merged yet. You can follow progress on this in D74630-code.

jeherve avatar Feb 10 '22 13:02 jeherve

Should be fixed now. I merged it a few moments ago.

r239934-wpcom

pablinos avatar Feb 11 '22 13:02 pablinos

There's still something going on here, but I can't figure it out. The social login option seems to show up intermittently on both the user's site and my test site. The user is back in 4816666-zen

  • I've confirmed it doesn't show up on mobile for the user's site or my test site

Screen Shot 2022-02-27 at 12 56 27 Screen Shot 2022-02-27 at 12 22 34

  • I WAS able to log into the comment form on the user's site with Facebook in my regular working tab in Chrome, at first. Brief screencast here.

https://user-images.githubusercontent.com/426388/155975002-cfa926b2-e435-4e11-bd76-1a6a730b9b9c.mp4

  • When I tested in an incog window in Chrome (also logged into a Facebook account in the same window), the social options stopped showing up. Brief gifs: User's site || My test site.

Screen Capture on 2022-02-27 at 12-40-50 Screen Capture on 2022-02-27 at 13-16-24

  • When I tested in incog Firefox, the social icons show up, but they just spin; they don't actually do anything. (Note that I'm also logged into a Facebook account in this window as well.) Brief gifs: User's site || My test site.

Screen Capture on 2022-02-27 at 13-20-54 Screen Capture on 2022-02-27 at 13-18-30

  • There are some console errors, but I'm not sure what they mean or if they're relevant.

Screen Shot 2022-02-27 at 12 24 48

The common thread seems to be the incognito window?

  • User has ruled out the theme.
  • User has done the plugin dance.
  • User has cleared browser cache and cookies.
  • "Users must be registered and logged in to comment" is deselected

jenhooks avatar Feb 27 '22 18:02 jenhooks

There are some console errors, but I'm not sure what they mean or if they're relevant.

Those are definitely relevant, thank you!

The common thread seems to be the incognito window?

Indeed. Do you happen to remember if you unchecked that option when opening the Chrome Incognito window? On my end it seems to work well on your test site when I uncheck that box.


Note: I updated your comment to upload the screenshots to GitHub directly instead of using Droplr. See pbg9X-fWF-p2 for more info.

jeherve avatar Feb 28 '22 11:02 jeherve

I'm not sure which box you're referring to. Here's a quick summary of what I tried:

  • Chrome, regular window, my test site and the user's site: I logged out of my WordPress.com account and was able to log in with Facebook.
  • Chrome incognito window, my test site and the user's test site: no social sign-in options at all
  • Firefox regular window, my test site and the user's test site: social sign-in options show up, but they just spin. Google sign-in does work.
  • Firefox private window, my test site and the user's test site: social sign-in options show up, but they just spin. Google sign-in does work.
  • Mobile iPhone 12, Ghostery browser. both sites: no social sign-in options

jenhooks avatar Feb 28 '22 13:02 jenhooks

I'm not sure which box you're referring to.

Sorry, I should have been clearer. this one: Screenshot 2022-02-28 at 16 09 41

jeherve avatar Feb 28 '22 15:02 jeherve

Although this affects the same feature, I think it's a different problem. That sameorigin error is unrelated to the fix we implemented for the Facebook app settings change, but is probably the problem.

Firefox is particularly strict about not letting you retrieve Facebook URLs on sites, especially with private browsing.

I've been testing using Facebook containers with more success. You need to allow jetpack.wordpress.com in the container too.

I'll have a try with the test site as soon as I can.

pablinos avatar Feb 28 '22 15:02 pablinos

Sorry, I should have been clearer. this one:

Thanks for the clarification @jeherve -- I do have that toggled on.

jenhooks avatar Feb 28 '22 21:02 jenhooks

I do have that toggled on.

I think that would break it, as it relies on being able to communicate with Facebook, but it looks like some kind of tracker to the browser.

pablinos avatar Feb 28 '22 21:02 pablinos

Right. Third-party cookies are required for the social logins to work.

To the point about the social login buttons do not sometimes show, I added a check a month or so ago on the WordPress.com side that attempts to check for 3rd-party cookie support and hide the social login buttons if 3rd-party cookies are not supported. We do have it in our roadmap to fix third-party cookie support for comments this year, but I wouldn't expect it for a few months. Hiding the login buttons for browsers that were not supported seemed a simple way to improve the overall UX in the short-term.

ebinnion avatar Feb 28 '22 21:02 ebinnion