google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.23k stars 286 forks source link

Data error in PageSpeed Insights #222

Closed xguiboy closed 4 years ago

xguiboy commented 5 years ago

" Data error in PageSpeed Insights Issue accessing data, please ensure the API key is set correctly. " Hi i've generate several keys, reset all the plugin configurations some times, but i can't get this working. #1

driveonby commented 5 years ago

I am having a similar issue. I have inserted the generated API for PageSpeed Insights but the plugin continues to show the attached error notice. PageSpeed Insights error

jamesozzie commented 5 years ago

@xguiboy @driveonby Thanks for reporting. Can you ensure you set the key restrictions to "none" in Google Cloud Console? Just be sure you have the correct project ID from the dropdown at the top.

Please let me know if that works, if not we can troubleshoot further.

jamesozzie commented 5 years ago

1

xguiboy commented 5 years ago

@xguiboy @driveonby Thanks for reporting. Can you ensure you set the key restrictions to "none" in Google Cloud Console? Just be sure you have the correct project ID from the dropdown at the top.

Please let me know if that works, if not we can troubleshoot further.

Yes, first i used the one that generates automaticly, after that i generate a new one, with "none" restritions Sem título

jamesozzie commented 5 years ago

What browser are you using, this could be related to #81.

Try deleting the newly create Project from your Google Cloud Console, following all steps until completion. Following that please reset Site Kit and installing again via the Chrome browser.

xguiboy commented 5 years ago

i was using firefox. i've deleted all the projects, restart on chrome, but same problem

driveonby commented 5 years ago

@jamesozzie Logged in just now and saw that Pagespeed is working, but in the Dashboard I get this error for Search Console and Popularity... Do you think it is related? SiteKit Error

jamesozzie commented 5 years ago

@driveonby Can you confirm you have all access rights (using your Site Kit connected Google account) for that property within Search Console? You might need to re-authenticate your account if so.

xguiboy commented 5 years ago

@jamesozzie my problems persist,i've downloaded the app again, used chrome, try to use the same api i'm using on the maps, without any restritions. but still https://gspsites.com.br. Search console works, analytics words, gtm woks, but the pagespeed not. ;(

jamesozzie commented 5 years ago

@xguiboy Can you please try again after performing the following steps:

  1. If you are using iThemes security can you uncheck this option from the general settings.
  2. Please deactivate any caching plugin you have active
  3. Disconnect PageSpeed insights
  4. Open your WordPress admin panel using an incognito window and connect the PageSpeed Insights module again

@driveonby Did you make any changes before your PageSpeed Insights started working?

Logged in just now and saw that Pagespeed is working, but in the Dashboard I get this error for Search Console and Popularity... Do you think it is related? I don't think it's related, but please check all settings and users from with your Search Console settings. Please delete your cache also or check using an incognito mode.

xguiboy commented 5 years ago

@jamesozzie

  1. I wasn't using this plugin
  2. I did deactivate the cache plugin and the minification as well but still the same problem My server has a build in cache and the cloudflares' cache is activates as well, do you think I have do deactivate it for the plugin start working?
jamesozzie commented 5 years ago

@xguiboy Can you temporarily deactivate your active caching with your host and also Cloudflare? Check then using an incognito window for the same issue.

xguiboy commented 5 years ago

@jamesozzie same issue, so i inspected the page e there ir this error "Failed to load resource: the server responded with a status of 400 ()" then i clicked the link and this message appear "{"code":"rest_forbidden","message":"Sem permiss\u00e3o para fazer isso.","data":{"status":401}}"

error Object code: "no_data_requested" data: status: 400 proto: Object message: "Missing request data." proto: constructor: ƒ Object() hasOwnProperty: ƒ hasOwnProperty() isPrototypeOf: ƒ isPrototypeOf() propertyIsEnumerable: ƒ propertyIsEnumerable() toLocaleString: ƒ toLocaleString() toString: ƒ toString() valueOf: ƒ valueOf() defineGetter: ƒ defineGetter() defineSetter: ƒ defineSetter() lookupGetter: ƒ lookupGetter() lookupSetter: ƒ lookupSetter() get proto: ƒ proto() set proto: ƒ proto()

jamesozzie commented 5 years ago

@xguiboy This is related to #89 and will hopefully be resolved soon

xguiboy commented 5 years ago

@jamesozzie ohh ok, so its a know issue. So i'll wait to the next update cheers

felixarntz commented 5 years ago

@xguiboy The failing request you outlined in https://github.com/google/site-kit-wp/issues/222#issuecomment-512264834 is another bug, which is most likely unrelated to the original problem you described in this issue. I opened #339 for fixing that specific failing request.

jamesozzie commented 4 years ago

@xguiboy Are you still encountering issues with Site Kit setup after updating to the latest version of the plugin?

xguiboy commented 4 years ago

hi @jamesozzie the two last updates was ok, but in this one it start again

jamesozzie commented 4 years ago

@xguiboy Is it the same issue irrespective of whether you are using Firefox or Chrome? If you want to share your Site Health info or any console errors that appear we can see if we notice anything.

xguiboy commented 4 years ago

hi @jamesozzie

`

wp-core

version: 5.2.4 site_language: pt_BR user_language: pt_BR permalink: /%postname%/ https_status: true user_registration: 0 default_comment_status: closed multisite: false user_count: 1 dotorg_communication: true

wp-dropins (1)

advanced-cache.php: true

wp-active-theme

name: Phlox Child version: 1.0 author: averta author_website: (undefined) parent_theme: Phlox theme_features: post-thumbnails, post-formats, woocommerce, html5, gallery, customize-selective-refresh-widgets, custom-logo, auxin-portfolio, auxin-shop, automatic-feed-links, title-tag, menus, starter-content, infinite-scroll, wc-product-gallery-zoom, wc-product-gallery-slider, header-footer-elementor, widgets, editor-style theme_path: /

wp-themes (1)

Phlox: version: 2.4.8, author: averta

wp-plugins-active (14)

Autoptimize: version: 2.5.1, author: Frank Goossens (futtta) Cache Enabler: version: 1.3.4, author: KeyCDN Easy Updates Manager: version: 8.1.0, author: Easy Updates Manager Team Elementor: version: 2.7.4, author: Elementor.com Elementor Pro: version: 2.7.2, author: Elementor.com Page Links To: version: 3.1.2, author: Mark Jaquith Phlox Core Elements: version: 2.4.9, author: averta Phlox Portfolio: version: 1.8.3, author: averta Premium Reviews & Testimonials Widgets for Elementor: version: 1.0.1, author: Leap13 ShortPixel Image Optimizer: version: 4.14.6, author: ShortPixel Site Kit by Google: version: 1.0.0-beta.1.0.8, author: Google WhatsApp Chat: version: 4.4.8, author: QuadLayers WP-Optimize - Clean, Compress, Cache: version: 3.0.12, author: David Anderson, Ruhani Rabin, Team Updraft Yoast SEO: version: 12.3, author: Team Yoast

wp-media

image_editor: WP_Image_Editor_Imagick imagick_module_version: 1684 imagemagick_version: ImageMagick 6.9.4-10 Q16 x86_64 2017-05-23 http://www.imagemagick.org imagick_limits: imagick::RESOURCETYPE_AREA: 753 GB imagick::RESOURCETYPE_DISK: 1.844674407371E+19 imagick::RESOURCETYPE_FILE: 37500 imagick::RESOURCETYPE_MAP: 753 GB imagick::RESOURCETYPE_MEMORY: 376 GB imagick::RESOURCETYPE_THREAD: 1 gd_version: bundled (2.1.0 compatible) ghostscript_version: unknown

wp-server

server_architecture: Linux 3.10.0-714.10.2.lve1.5.17.el7.x86_64 x86_64 httpd_software: LiteSpeed php_version: 7.3.9 64bit php_sapi: litespeed max_input_variables: 2000 time_limit: 600 memory_limit: 1024M max_input_time: 240 upload_max_size: 512M php_post_max_size: 512M curl_version: 7.62.0 OpenSSL/1.0.2k suhosin: false imagick_availability: true htaccess_extra_rules: true

wp-database

extension: mysqli server_version: 5.5.5-10.2.27-MariaDB client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $

wp-constants

WP_HOME: undefined WP_SITEURL: undefined WP_MAX_MEMORY_LIMIT: 1024M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: true CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined

wp-filesystem

wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable

`

jamesozzie commented 4 years ago

@xguiboy Thanks for the update. You have a few caching plugins active, along with Cloudflare and caching at host level, the combination could be contributing to the problem. Can you attempt the steps below to try and get the PageSpeed module working:

  1. Temporarily deactivate the following plugins: Autoptimize, Cache Enabler, WP-Optimize, Team Updraft
  2. Disconnect the PageSpeed Module (Site Kit > Settings > Connected Services > PageSpeed > Edit > Disconnect PageSpeed Insights from Site Kit)
  3. Using the Chrome browser and an incognito window access the following URL to obtain new API keys: https://developers.google.com/web/site-kit/apikey?sitename=gspsites&siteurl=https://gspsites.com.br
  4. Connect the PageSpeed module again from the same browser window after logging in (Settings > Connect more services > Set up PageSpeed Insights)

Let me know if that allows you to use the PageSpeed module. If the above fails do you have any other sites you can test with on the same web host?

jamesozzie commented 4 years ago

Hi all, Site Kit support is now provided on the WordPress plugin forum, could you post your questions or issues on there, where we would be happy to assist.