Support » Plugin: Jetpack - WP Security, Backup, Speed, & Growth » Comment Error: Google failed to return an expected code

  • Resolved yak2by2

    (@yak2by2)


    When I have Jetpack (free version) installed and my readers try leaving a comment using one of the social media logins provided in the comment options (Twitter, Facebook, Google), the comment box either times out while “Connecting to Twitter” for example, or in the case of Google, it will let them log in to Google but after they type their comment and submit it, they get an error that says… Error: Google failed to return an expected code.

    When I uninstall Jetpack from my WordPress site, my native WP comments work fine.

    I’d like to keep Jetpack installed for all of its benefits, but can’t afford my comments not to work. I am hoping there is a solution.

    p.s. if you go to my site to test this, I have uninstalled Jetpack because I can’t afford to have my site live without comments working. So you will not get the above errors until I re-install Jetpack.

    My theme is Breakthrough Pro version 1.1.0 by StudioPress, which is a child theme of Genesis.

    • This topic was modified 10 months, 1 week ago by yak2by2.

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Support Karen Attfield

    (@wpkaren)

    Hi @yak2by2 ,

    The error messages you are describing sound quite similar to an issue reported earlier this year, which was fixed in September:

    https://github.com/Automattic/jetpack/issues/15030

    Do you / your readers notice the issue on any other browsers apart from Chrome? If so that would likely indicate another issue so we’d need to debug further.

    If using Chrome, one of the suggested workarounds was to set SameSite by default cookies to disabled:

    https://www.chromium.org/updates/same-site/test-debug

    If you are able to test from your end and if that works, do let us know (as well as the Chrome version you are using), as we may need to troubleshoot further. Thank you!

    Thread Starter yak2by2

    (@yak2by2)

    Thanks Karen. Yes the same issue occurs with Safari as well as on different cell phone browsers.

    I also kept Jetpack running and figured out I can just toggle off the commenters ability to login with Twitter, FB, Google, or WP. Not ideal, but at least I can still run the rest of Jetpack now.

    Plugin Support Dat Hoang

    (@htdat)

    Hi,

    Yes the same issue occurs with Safari as well as on different cell phone browsers.

    Would you mind sharing us your browser name and version? You can visit this page get the info https://supportdetails.com/

    I also kept Jetpack running and figured out I can just toggle off the commenters ability to login with Twitter, FB, Google, or WP. Not ideal, but at least I can still run the rest of Jetpack now.

    Yeah, this is not ideal but it seems a way to go for now.

    Thread Starter yak2by2

    (@yak2by2)

    Chrome 87.0.4280.88

    Safari 14.0.2

    Tracy

    (@tmmbecker)

    Thanks for sharing the browser details @yak2by2.

    Because this is happening in two separate up-to-date browsers and we’re not able to replicate here, it’s likely that something else on the site is interfering. As a next step, it would be good to rule out a conflict with another plugin or the theme.

    I know it’s less than ideal but the easiest way to figure that out is to disable all of your plugins except Jetpack and then test. If you’re able to log in with Google or Twitter or Facebook and comment with no trouble, then you’ll know it’s another plugin.

    You can then reenable each plugin one at a time and test in between each one to find the culprit.

    That said, if you’d prefer to start small, I’d suggest that you test these first:

    subscribe-connect-follow-widget
    subscribe-to-category
    subscribe-to-comments-reloaded
    limit-login-attempts-reloaded

    If it’s not any of those, then the next step would be to try them all.

    To rule out any conflicts with the theme, you can switch to a default theme like Twenty Twenty and test again. If the log-in option for comments works with a default theme, then you’ll know there’s something in the theme that’s conflicting and you can reach out to the theme author for help in getting this fixed.

    Thread Starter yak2by2

    (@yak2by2)

    Thanks Tracy. I had previously tried this, which is how I boiled it down to the jetpack plug-in, as it was the only plug-in that caused this error. I think switching the theme is definitely worth trying as a next step. I’m not super familiar in how to switch over my theme without it messing up my website visuals. Is there a way to switch themes in a trial mode without it messing up the live experience for people visiting my page?

    Plugin Support bruceallen

    (@bruceallen)

    Happiness Engineer

    Hi @yak2by2

    >Is there a way to switch themes in a trial mode without it messing up the live experience for people visiting my page?

    Yes! You can actually use the Health Check & Troubleshooting plugin to do some troubleshooting here. This is a tool that can be useful for debugging, though it does require an official default theme like Twenty Seventeen to be installed as well:

    https://wordpress.org/plugins/health-check/
    https://wordpress.org/themes/twentyseventeen/

    Once you’ve installed and activated the plugin, you can go to Tools → Site Health:

    – Select the Troubleshooting tab and then click Enable Troubleshooting to automatically disable all plugins and add a new Troubleshooting Menu item in the toolbar at the top of the wp-admin dashboard.
    – From here, you can enable and disable plugins and change the theme for your site, but without affecting normal visitors to your site.

    Could you try to use the Health Check plugin to try to switch the theme to one of the defaults to see if that helps?

    Thread Starter yak2by2

    (@yak2by2)

    In troubleshooting mode, it put the default theme as Twenty Twenty and I can’t figure out how to change it, so hopefully Twenty Twenty will work for testing. I have all plug-ins turned off with the exception of Jetpack, which is active. I made sure the comment feature was on in Jetpack for using social media accounts. On a blog post, it has the “What do you think? Leave a reply…” then has the “Enter your comment here…” box and has me logged in with my Noah Filipiak account (I assume through WP) and my little bio pic, but there is no option to log out of my Noah Filipiak account and there is nothing on the page about Twitter, Facebook, Google, WP.

    Having the very same problem at irresponsiblereader.com. Have disabled Jetpack commenting.

    Disabled all plugins except Jetpack.

    Tried TwentyTwentyOne theme.

    Updated to WP 5.6.

    Still having the issue.

    Logging in with Twitter or Facebook just stalls. Logging in with Google seemingly works but then states: “Error: Google failed to return an expected code” when you submit.

    • This reply was modified 9 months, 3 weeks ago by klockheed. Reason: subscribing to replies
    Plugin Support Dat Hoang

    (@htdat)

    Thanks for your update.

    I can replicate this issue on my testing site.
    We’re re-opening this GitHub issue to troubleshoot further
    https://github.com/Automattic/jetpack/issues/15030#issuecomment-753844126

    I am having this problem right now. I turned off Jetpack comments. Is there a fix? Im using the twenty twenty one latest theme. Site is https://commadot.com

    “Error: Google failed to return an expected code.”
    Same error here: http://we.BeingTogether.Live

    I am having this problem 1 months. how to fix it. please solve problems

    try all above method but problem not solve then finally I uninstall Jetpack from my WordPress site, my native WP comments work fine.

Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.