• Resolved gchris2

    (@gchris2)


    When I try to configure Google Site Kit, I get the following error message after completing the steps to log in. I receive the error message ‘string(11) “Bad Request”‘. I don’t understand why this is happening. It’s a new WordPress installation, and I’ve gone through this process about 15 times with other websites. The URL looks like this when I get the error message:

    https://fakeurl.uu/wp/wp-admin/index.php?oauth2callback=1&authuser=0&code=4%2F0AeaYSHAMiKyL7slTEPTivAtY1866gNOyUQhkmNMvm67vLiIIchHPmJONlfUCGFRr-_sLZA&prompt=consent

    I’ve tried both Chrome and Firefox, and even incognito mode. Resetting Site Kit also doesn’t help.

    ` wp-core
    
    version: 6.4.3
    site_language: nl_NL
    user_language: nl_NL
    timezone: Europe/Amsterdam
    permalink: /%postname%/
    https_status: true
    multisite: false
    user_registration: 0
    blog_public: 1
    default_comment_status: closed
    environment_type: production
    user_count: 3
    dotorg_communication: true wp-paths-sizes
    
    wordpress_path: /data/sites/web/xxx/checkout/master/98e6719f8a15063c2595fe0a8d7cf9cac9e9b5c3/web/wp
    wordpress_size: 54,03 MB (56657267 bytes)
    uploads_path: /data/sites/web/xxx/checkout/master/98e6719f8a15063c2595fe0a8d7cf9cac9e9b5c3/web/app/uploads
    uploads_size: 991,61 MB (1039776346 bytes)
    themes_path: /data/sites/web/xxx/checkout/master/98e6719f8a15063c2595fe0a8d7cf9cac9e9b5c3/web/app/themes
    themes_size: 172,04 MB (180399946 bytes)
    plugins_path: /data/sites/web/xxx/checkout/master/98e6719f8a15063c2595fe0a8d7cf9cac9e9b5c3/web/app/plugins
    plugins_size: 85,46 MB (89614232 bytes)
    database_size: 6,11 MB (6406144 bytes)
    total_size: 1,28 GB (1372853935 bytes) wp-dropins (1)
    
    advanced-cache.php: true wp-active-theme
    
    name: xxx
    version: 10.0.0-dev
    author: xx
    author_website: https://xx.xx
    parent_theme: none
    theme_features: sage, widgets-block-editor, soil, menus, editor-color-palette, editor-gradient-presets, editor-font-sizes, custom-units, custom-line-height, custom-spacing, disable-custom-colors, disable-custom-gradients, disable-custom-font-sizes, title-tag, post-thumbnails, align-wide, responsive-embeds, html5, customize-selective-refresh-widgets, widgets
    theme_path: /data/sites/web/xx/checkout/master/98e6719f8a15063c2595fe0a8d7cf9cac9e9b5c3/web/app/themes/xx wp-mu-plugins (3)
    
    Bedrock Autoloader: version: 1.0.3, author: Roots
    Disallow Indexing: version: 1.0.0, author: Roots
    Register Theme Directory: version: 1.0.0, author: Roots wp-plugins-active (11)
    
    Advanced Custom Fields PRO: version: 6.2.5, author: WP Engine (latest version: 6.2.6.1)
    Gravity Forms: version: 2.8.3, author: Gravity Forms
    Gravity Forms reCAPTCHA Add-On: version: 1.4.0, author: Gravity Forms
    ManageWP - Worker: version: 4.9.19, author: GoDaddy
    Redirection: version: 5.4.2, author: John Godley
    Site Kit by Google: version: 1.119.0, author: Google
    SVG Support: version: 2.5.5, author: Benbodhi
    WP-PageNavi: version: 2.94.1, author: Lester 'GaMerZ' Chan
    WP Migrate Lite: version: 2.6.9, author: WP Engine (latest version: 2.6.10)
    Yoast Duplicate Post: version: 4.5, author: Enrico Battocchi & Team Yoast
    Yoast SEO: version: 21.9.1, author: Team Yoast (latest version: 22.0) wp-plugins-inactive (1)
    
    WP Rocket: version: 3.15.9, author: WP Media wp-media
    
    image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1691
    imagemagick_version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
    imagick_version: 3.7.0
    file_uploads: 1
    post_max_size: 256M
    upload_max_filesize: 256M
    max_effective_size: 256 MB
    max_file_uploads: 20
    imagick_limits:
    imagick::RESOURCETYPE_AREA: 122 MB
    imagick::RESOURCETYPE_DISK: 1073741824
    imagick::RESOURCETYPE_FILE: 768
    imagick::RESOURCETYPE_MAP: 512 MB
    imagick::RESOURCETYPE_MEMORY: 256 MB
    imagick::RESOURCETYPE_THREAD: 1
    imagick::RESOURCETYPE_TIME: 9.2233720368548E+18
    imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, AVI, AVIF, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HEIC, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIDEO, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    gd_version: bundled (2.1.0 compatible)
    gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
    ghostscript_version: 9.53.3 wp-server
    
    server_architecture: Linux 6.1.38-hcl x86_64
    httpd_software: Apache
    php_version: 8.0.30 64bit
    php_sapi: fpm-fcgi
    max_input_variables: 20000
    time_limit: 300
    memory_limit: 256M
    max_input_time: 60
    upload_max_filesize: 256M
    php_post_max_size: 256M
    curl_version: 7.74.0 OpenSSL/1.1.1n
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    current: 2024-02-12T17:34:16+00:00
    utc-time: Monday, 12-Feb-24 17:34:16 UTC
    server-time: 2024-02-12T18:34:15+01:00 wp-database
    
    extension: mysqli
    server_version: 5.7.40-43-log
    client_version: mysqlnd 8.0.30
    max_allowed_packet: 67108864
    max_connections: 150 wp-constants
    
    WP_HOME: https://xxx.xx
    WP_SITEURL: https://xxx.xx/wp
    WP_CONTENT_DIR: /data/sites/web/xx/checkout/master/98e6719f8a15063c2595fe0a8d7cf9cac9e9b5c3/web/app
    WP_PLUGIN_DIR: /data/sites/web/xx/checkout/master/98e6719f8a15063c2595fe0a8d7cf9cac9e9b5c3/web/app/plugins
    WP_MEMORY_LIMIT: 40M
    WP_MAX_MEMORY_LIMIT: 256M
    WP_DEBUG: false
    WP_DEBUG_DISPLAY: false
    WP_DEBUG_LOG: /path/to/debug.log
    SCRIPT_DEBUG: false
    WP_CACHE: false
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_ENVIRONMENT_TYPE: Ongedefinieerd
    WP_DEVELOPMENT_MODE: undefined
    DB_CHARSET: utf8mb4
    DB_COLLATE: undefined wp-filesystem
    
    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    mu-plugins: writable google-site-kit
    
    version: 1.119.0
    php_version: 8.0.30
    wp_version: 6.4.3
    reference_url: https://xx.xx
    amp_mode: no
    site_status: connected-site
    user_status: not authenticated
    verification_status: not-verified
    connected_user_count: none
    active_modules: site-verification, search-console, analytics, analytics-4, pagespeed-insights
    recoverable_modules: none
    required_scopes:
    openid: ⭕
    https://www.googleapis.com/auth/userinfo.profile: ⭕
    https://www.googleapis.com/auth/userinfo.email: ⭕
    https://www.googleapis.com/auth/siteverification: ⭕
    https://www.googleapis.com/auth/webmasters: ⭕
    https://www.googleapis.com/auth/analytics.readonly: ⭕
    https://www.googleapis.com/auth/tagmanager.readonly: ⭕
    capabilities:
    googlesitekit_authenticate: ✅
    googlesitekit_setup: ✅
    googlesitekit_view_posts_insights: ⭕
    googlesitekit_view_dashboard: ⭕
    googlesitekit_manage_options: ⭕
    googlesitekit_update_plugins: ⭕
    googlesitekit_view_splash: ✅
    googlesitekit_view_authenticated_dashboard: ⭕
    googlesitekit_view_wp_dashboard_widget: ⭕
    googlesitekit_view_admin_bar_menu: ⭕
    googlesitekit_view_shared_dashboard: ⭕
    googlesitekit_read_shared_module_data::["search-console"]: ⭕
    googlesitekit_read_shared_module_data::["pagespeed-insights"]: ⭕
    googlesitekit_manage_module_sharing_options::["search-console"]: ⭕
    googlesitekit_manage_module_sharing_options::["pagespeed-insights"]: ⭕
    googlesitekit_delegate_module_sharing_management::["search-console"]: ⭕
    googlesitekit_delegate_module_sharing_management::["pagespeed-insights"]: ⭕
    enabled_features:
    gm3Components: ⭕
    search-console_shared_roles: none
    search-console_management: owner
    pagespeed-insights_shared_roles: none
    pagespeed-insights_management: all_admins
    search_console_property: none
    analytics_account_id: none
    analytics_property_id: none
    analytics_profile_id: none
    analytics_use_snippet: yes
    analytics_4_property_id: none
    analytics_4_web_data_stream_id: none
    analytics_4_measurement_id: none
    analytics_4_use_snippet: yes
    analytics_4_available_custom_dimensions: none
Viewing 15 replies - 1 through 15 (of 39 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Thanks for reaching out @gchris2. As you’ve already tried setting up Site Kit from different browsers, please share the following so we can determine more on this and ensure you are able to complete setup:

    1. A screen recording of your experience. You can use a service such as Loom or RecordIt to share a screen recording, while using the shis form to share this privately if preferred.
    2. What is your current location? I ask as AMP may be blocked in some regions, and an error similar to this can occur when AMP is blocked at browser level.
    3. When checking the Site Kit dashboard from a Chrome browser incognito window does the same occur? If so, please share any browser console errors that appear. 

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

    Thread Starter gchris2

    (@gchris2)

    Thank you for your response, James.

    • I’m willing to share a screen recording, but unfortunately, the form does not allow me to attach it as a file. I can only fill in the previously sent information.
    • I am located in the Netherlands, but as I mentioned earlier, we add this plugin to all our websites. I’ve done this about 30 times now, so this isn’t the first time I’m doing this.
    • The error message ‘string(11) “Bad Request”‘ appears after the screen that asks for ‘Site Kit wants additional access to your Google account.’ When I click on ‘Continue,’ it results in an error message.
      I’ve tried incognito mode, and I don’t think AMP is the issue since that applies to mobile websites, right? There are no browser errors present; I only encounter the error message as a page when I click on ‘Continue.’
    Plugin Support James Osborne

    (@jamesosborne)

    Appreciate the update @gchris2.

    You’re also correct about Google forms and not being able to upload any attachments. Some web based recording services, such as Loom or RecordIt, provide a link to a recording, as opposed to having to download/upload to share.

    Rather than sharing another recording. I noticed just now that your site URL includes a /wp path, which I suspect may be coming from your WordPress setup using a bedrock setup. I’m aware of situations where invalid callbacks can occur if Site Kit was setup on a site previously, and then the WordPress files were moved to their own directory. This can result in invalid/stale callback URLs.

    To try and resolve this, please perform the below steps:

    1. Visit your site settings (Settings > General).
    2. Change your site address (URL) from https://yoursite.com/ to https://www.yoursite.com/ (adding a www prefix), and the same for your WordPress address (https://yoursite.com/ to https://www.yoursite.com/wp). Important: Don’t make any changes to the /wp directory, only add the www prefix.
    3. Press the save button.
    4. Attempt Site Kit setup once more after logging back into your site.

    The above will add a www prefix to your site, which Site Kit will recognize as a different site. It therefore won’t use any previous records.

    Let me know how you get on with the above, or ask if you have any questions.

    Thread Starter gchris2

    (@gchris2)

    Thank you, James, for your response. Indeed, we use a Bedrock stack. Once the website is filled and ready to go live, we change the URL to the final one. Only after this step, we connect Google Site Kit. So, I don’t quite understand how an invalid callback can occur; the situation doesn’t seem conducive to it. Additionally, the solution you mentioned is not feasible; I cannot change the website’s URL as it would lead to SEO issues. If the plugin reset can’t fix this situation, it should be fixed in a future update? Is there any other solution?

    As I’ve mentioned before, we’ve used this exact setup and workflow for dozens of websites in the past. It’s somewhat unusual that it’s occurring now, especially considering we’ve been working this way for three years without encountering this issue before.

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for the update @gchris2. If you’re certain you only set up Site Kit for the first time I can request a check of your site records. Once checked, I can see if there are any invalid records on the Site Kit service.

    Additionally, the solution you mentioned is not feasible; I cannot change the website’s URL as it would lead to SEO issues. If the plugin reset can’t fix this situation, it should be fixed in a future update? Is there any other solution?

    By changing the site URL I was referring only to a www prefix, which could be reverted should you be able to complete set up. Not a problem however, I will request a site check to see if we can spot anything. If there are invalid records, this may mean that your current URL have been connected with Site Kit previously.

    In relation to a reset which you mentioned, a reset can indeed reset records, but for your connected site. What typically happens with invalid callbacks when using Site Kit, is that the plugin was connected at some stage. The plugin does usually then recognize any further site URL changes (if the plugin wasn’t reset) and suggests the user sets up the plugin once more, so the records match the current setup. In some cases, the plugin may find records as the site was never reset, but the records don’t match. This is from the Site Kit service, which is independent of a users site. Resetting a site when it’s not connected, will only clear any Site Kit configurations and records locally.

    Are you happy for me to request a check of your site? Unfortunately this isn’t something I can do myself, so it may possible take a few days to get back to you.

    I’ll also discuss your case with the team regarding improvements.

    Plugin Support James Osborne

    (@jamesosborne)

    Just a quick update @gchris2. If you wish for me to request a check of your site records, please share your Site Health information privately via this form, so we know what site URLs to look for.

    Thread Starter gchris2

    (@gchris2)

    Thank you for your response, I have just submitted the details via the form. I look forward to hearing the results so we can determine the next steps. It would be great if we could still get the website connected to the plugin. Thanks for your effort.

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for sharing @gchris2. I’ve requested a check now, and to clear any records should we find any. This should be complete at some stage this week, but I’ll let you know as soon as I have an update. Thank you.

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for your patience on this @gchris2. From reviewing your site records, all references seem to match your current site. Have you since successfully set up the plugin, or are you still encountering the same issue?

    If you are still encountering the same issue, please share a screen recording of your experience and we can review this further. You can use a service such as Loom or RecordIt to share a screen recording, while using the same form previously used to share this privately. 

    Thread Starter gchris2

    (@gchris2)

    Thank you for your effort. I just tried again, and I’m getting the same error message when I go through the process. When I go back to the plugin screen, I have to start configuring Site Kit all over again.

    I have sent a WeTransfer link via the form with a video. I’m not going to download software to visually demonstrate the issue.

    Plugin Support James Osborne

    (@jamesosborne)

    Appreciate you sharing the recording @gchris2, and totally understand regarding not downloading recording software. It looks like this error appears directly after signing in with the OAuth authentication service.

    As this is the first occurrence with this specific error, please visit your permalinks page (Settings > Permalinks) and press the “Save change” button. This will recreate a fresh .htaccess file for you. I ask as rules applied at .htaccess level can impact Site Kit behavior. After doing so, please temporarily deactivate your “Redirection” plugin, which can also impact Site Kit endpoints, before attempting setup once more.

    If the same occurs, please let me know and I’ll check this with the team further.

    Thread Starter gchris2

    (@gchris2)

    Thank you for your effort, I appreciate it. I just disabled the Redirection plugin and WP Rocket. Then I also resaved my permalinks and reset Site Kit. I had to log in again, but then I got a blank page with the message ‘getting credentials failed’. When the page refreshed, logging in again, I got the error message ‘getting token failed’, not a blank page but the plugin’s splash page with the title ‘Error connecting to Site Kit’. I was using Chrome’s incognito mode.

    • This reply was modified 2 years, 3 months ago by gchris2.
    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for checking this. The “Getting token failed” error is a known issue impacting users setting up the plugin right now, and we’ll be providing an update on this shortly. See here for more information.

    As soon as this is addressed, hopefully at some stage today, I’ll let you know. Thank you!

    Plugin Support James Osborne

    (@jamesosborne)

    Hi @gchris2. I’m just following up to mention that the set up issue you faced last week has since been resolved. Can you attempt set up once more if not already done so, and let me know if you’re able to proceed?

    Thread Starter gchris2

    (@gchris2)


    Thank you for the update. Unfortunately, the error message persists despite disabling the Redirect plugin and WP Rocket, saving Permalinks, and resetting Site Kit. Ultimately, I still encounter the “Bad Request” error in Chrome’s incognito mode.

Viewing 15 replies - 1 through 15 (of 39 total)

The topic ‘string(11) “Bad Request”’ is closed to new replies.