Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page Speed Insights - Data Error on Subdomains #68

Closed
jamesozzie opened this issue Jun 26, 2019 · 8 comments
Closed

Page Speed Insights - Data Error on Subdomains #68

jamesozzie opened this issue Jun 26, 2019 · 8 comments

Comments

@jamesozzie
Copy link
Collaborator

Describe the bug
Tested on site hosted within subdomain and subpath (demo.***.io/sample).
Newly setup site, Site Kit just added, API key is correct and no restrictions, copied as per setup process. PageSpeed services/module is appearing as "Connected" under 'connected services' tab in Site Kit Admin.

To Reproduce
Install Site Kit on subdomain & subpath.

Screen Shot 2019-06-26 at 2 23 58 PM

Screen Shot 2019-06-26 at 2 25 09 PM

pagespeed-insights::site-pagespeed-desktop::last-28-days::d41d8cd98f00b204e9800998ecf8427e: {errors: {400: ["Bad Request"]}, error_data: {400: {status: 500, reason: "keyInvalid"}}}
error_data: {400: {status: 500, reason: "keyInvalid"}}
errors: {400: ["Bad Request"]}
pagespeed-insights::site-pagespeed-mobile::last-28-days::d41d8cd98f00b204e9800998ecf8427e: {errors: {400: ["Bad Request"]}, error_data: {400: {status: 500, reason: "keyInvalid"}}}
error_data: {400: {status: 500, reason: "keyInvalid"}}
errors: {400: ["Bad Request"]}

Response:
{"pagespeed-insights::site-pagespeed-mobile::last-28-days::d41d8cd98f00b204e9800998ecf8427e":{"errors":{"400":["Bad Request"]},"error_data":{"400":{"status":500,"reason":"keyInvalid"}}},"pagespeed-insights::site-pagespeed-desktop::last-28-days::d41d8cd98f00b204e9800998ecf8427e":{"errors":{"400":["Bad Request"]},"error_data":{"400":{"status":500,"reason":"keyInvalid"}}}}

System Information (please complete the following information):
WordPress Version: 5.2.2
Web Host OS: Linux
Site Kit Plugin version: 1.0.0-beta.1
Browser: Chrome
Operating System: Macos 10.13.6
PHP Version: 7.2

@jamesozzie jamesozzie changed the title Page Speed Insights Page Speed Insights - Data Error on Subdomains Jun 26, 2019
@jamesozzie jamesozzie added the Type: Bug Something isn't working label Jun 26, 2019
@ivankristianto
Copy link
Contributor

@jamesozzie
from the error response I see it's because the keyinvalid.
Can you please try reset site kit, and try to activate PSI module again, and ensure you copy the correct API Key?

@jamesozzie
Copy link
Collaborator Author

Thanks @ivankristianto. Thanks for the update. It's working fine when I reset, I never made any changes or set restrictions on that project in GCP. I copied and pasted the API directly. But if it arises again I will report.

@jamesozzie
Copy link
Collaborator Author

@ivankristianto. I have a video here where you can see the issue again, not just on a subdomain. Would there be something else causing this? Even after resetting Site Kit and repeating the process using incognito mode:

@ivankristianto
Copy link
Contributor

@jamesozzie can you check for excess spaces in the api key?
related to this issue #81

@jamesozzie
Copy link
Collaborator Author

@ivankristianto While there appears to be an additional space in the generated API key this is not the cause of the problem, as the copied API key does not include this space (copied directly via the copy button or copied via selecting the text, copying & pasting). This is not the root cause of this issue.

ZrqUCVFviS

@ivankristianto
Copy link
Contributor

@jamesozzie
If it is a correct API key, the other possible way is you might have API restriction set for your API.
Can you check it in GCP dashboard?
What do you have in that key setting? You can check it with this link: https://console.cloud.google.com/apis/credentials

ANd here is the screenshot look like
Screen Shot 2019-07-03 at 15 16 55

@jamesozzie
Copy link
Collaborator Author

@ivankristianto There are no restrictions set, see below:

Screen Shot 2019-07-03 at 11 42 13 AM

@marrrmarrr
Copy link
Collaborator

Let's re-test this after #81 is fixed.

@marrrmarrr marrrmarrr removed the Type: Bug Something isn't working label Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants