Viewing 15 replies - 1 through 15 (of 31 total)
  • Thread Starter ochoppee

    (@ochoppee)

    Please note this was working on my other sites on the server previously, but now I am getting json errors on those other sites now, not sure if related

    “Unknown Error (code: Invalid JSON response). Get help

    “Data error in Analytics Invalid JSON response”

    “Data error in Search Console Invalid JSON response”

    Also I have tried already resetting site kit in Tool/Available Tools

    • This reply was modified 1 year ago by ochoppee.
    Thread Starter ochoppee

    (@ochoppee)

    Thread Starter ochoppee

    (@ochoppee)

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for reaching out, and sharing your Site Health information along with your cURL checks. Based on the information provided, I suspect there is something at host level blocking communication between your site and the Site Kit service (sitekit.withgoogle.com). This could be only if communicated over IPv6 as per other users experience. To determine more on this, please share the following:

    1. Do you see any warnings or errors when checking your Site Health status (Tools > Site Health > Status), which differs from your Site Health information previously shared?
    2. If you perform the following command – which will ensure communication is over IPv4 only, do you encounter a successful 200 response? curl -4 -I https://sitekit.withgoogle.com
    3. Does the same occur if you temporary disable any Web Application Firewall?

    Let me know if you have any questions with the above. Note also you can rule out the issue being anything local or with your browser by checking does the same occur on this demo WordPress site. I suspect you will be able to complete set up without issue.

    Thread Starter ochoppee

    (@ochoppee)

    Hi

    Regarding Site Health

    No the only warning I have is below, I have eliminated the rest of the errors previously, and this occurred after I moved the site off cloudflare nameservers to my domain and hosting provider Canspace

    “Unable to detect the presence of page cache Performance

    Unable to detect page cache due to possible loopback request problem. Please verify that the loopback request test is passing. Error: cURL error 28: Operation timed out after 5001 milliseconds with 0 bytes received (Code: http_request_failed)

    Page cache enhances the speed and performance of your site by saving and serving static pages instead of calling for a page every time a user visits.

    Page cache is detected by looking for an active page cache plugin as well as making three requests to the homepage and looking for one or more of the following HTTP client caching response headers:cache-controlexpiresagelast-modifiedetagx-cache-enabledx-cache-disabledx-srcache-store-statusx-srcache-fetch-status.

    Learn more about page cache(opens in a new tab)

    Thread Starter ochoppee

    (@ochoppee)

    Re: Demo Site and Web Application Firewall and curl

    The Demo site works for me with my chrome browser! I might note that I use Immunify360, does this info help, and I am checking on curl

    Thread Starter ochoppee

    (@ochoppee)

    Re: Curl ipv4

    [root@vps197 ~]# curl -4 -I?https://sitekit.withgoogle.com
    HTTP/2 200
    content-type: text/html
    vary: Accept-Encoding
    x-cloud-trace-context: f040e5ffe9635f82a4d6deccf648c78b
    date: Tue, 31 Oct 2023 18:39:15 GMT
    server: Google Frontend
    alt-svc: h3=”:443″; ma=2592000,h3-29=”:443″; ma=2592000

    Thread Starter ochoppee

    (@ochoppee)

    Additional Info Curl

    In regard to the response you posted, while the server does have an assigned IPV6 address it uses IPV4 for it’s main connection. The curl command defaults to IPV6 without the -4 flag they mention in the response. The output of the updated command is pasted for you below and does give a successful 200 connection code.

    Your server does have a WAF in place (mod security) which can be disabled for testing (or completely) within cPanel in the security section under Mod Security. You can disable this for any specific site within the account.

    [root@vps197 ~]# curl -4 -I https://sitekit.withgoogle.com
    HTTP/2 200
    content-type: text/html
    vary: Accept-Encoding
    x-cloud-trace-context: f040e5ffe9635f82a4d6deccf648c78b
    date: Tue, 31 Oct 2023 18:39:15 GMT
    server: Google Frontend
    alt-svc: h3=”:443″; ma=2592000,h3-29=”:443″; ma=2592000

    -Guy H.
    Support, CanSpace

    Thread Starter ochoppee

    (@ochoppee)

    Re: Immunify360

    I have disabled immunify360 for the site right now, and still have the issue as stated in the topic

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for the troubleshooting updates @ochoppee, which confirm that the issue is specific to IPv6. I’m happy to request a check for any blocks if you can share the following:

    1. Your IPv6 address for the impacted sites. I suspect they are all within the same range.
    2. Are you using a shared hosting solution? If not have you tried restarting your server? I ask as I noticed some cURL errors reported in your Site Health status. With that may also wish to temporarily switch PHP version.
    3. Did you have Site Kit successfully running on any of these sites before?

    Let me know if you have any questions with the above.

    Thread Starter ochoppee

    (@ochoppee)

    Hello,

    1. Your IPv6 address for the impacted sites. I suspect they are all within the same range.

    Yes, I believe they are as they are hosted on a VPS, which has 2 IP’s assigned to it.

    1. Are you using a shared hosting solution? If not have you tried restarting your server? I ask as I noticed some cURL errors reported in your Site Health status. With that may also wish to temporarily switch PHP version.?

    No I have not tried restarting the server, I can ask my hosting provider to do so. Due to complex issues, switch PHP versions is not an easy task, as it may affect each site differently that is hosted on the server, I can do this as a last resort?

    1. Did you have Site Kit successfully running on any of these sites before?

    Yes I did on all my sites on the server, the other sites are either still connected and experiencing json error when trying to retrieve data or having issues connecting.

    Thread Starter ochoppee

    (@ochoppee)

    So if IPv4 works and IPv6 is forbidden, what might be a solution?

    Plugin Support James Osborne

    (@jamesosborne)

    If you want to share the IPv6 addresses for your site/sites then I can check if there is a block.

    No I have not tried restarting the server, I can ask my hosting provider to do so. Due to complex issues, switch PHP versions is not an easy task, as it may affect each site differently that is hosted on the server, I can do this as a last resort?

    There is no guarantee that a restart will address the issue. If it’s related to an IPv6 block then it likely won’t correct the issue, so don’t worry about restarting if it’s not a straightforward task. I’ll request a check of your IPv6 address first.

    So if IPv4 works and IPv6 is forbidden, what might be a solution?

    Great question. If we can determine an IPv6 block based on the range, then this can be addressed at host level. One workaround is to temporarily disable IPv6 when setting up Site Kit. If you have web terminal access I can provide you with the steps to do so. Otherwise, let me know of the IPv6 address of your host server and I’ll request a check for any block.

    Thread Starter ochoppee

    (@ochoppee)

    Here is my hosting provider response, and I had them restart the server.

    Posted by CanSpace Solutions G1 on 1st Nov 2023 (09:26)Operator

    Hello Peter,

    The IPV6 address assigned to your server is noted below. If you’d like a restart of the server we can take care of that for you as it is your private VPS as opposed to a shared host.

    inet6 2607:5300:201:3100::82c1 prefixlen 64 scopeid 0x0<global>

    -Guy H.
    Support, CanSpace

    Thread Starter ochoppee

    (@ochoppee)

    “One workaround is to temporarily disable IPv6 when setting up Site Kit. If you have web terminal access I can provide you with the steps to do so.”

    Let me know if I need this after you check my IPv6 for a block! If so I can work with my hosting provider on this.

    • This reply was modified 1 year ago by ochoppee.
Viewing 15 replies - 1 through 15 (of 31 total)
  • The topic ‘google_api_connection_fail when activating plugin’ is closed to new replies.