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.25k stars 292 forks source link

Console warning messages on the set up and edit settings screens #9720

Open wpdarren opened 5 days ago

wpdarren commented 5 days ago

Bug Description

From the SiWG bug bash. Asana ticket can be found here.

When on the SiWG module set up screen, various warnings occur in the browser.

@jamesozzie also reported it when going to the edit screen for SiWG.

Image

googlesitekit-modules-sign-in-with-google-f5adc79d7ec046daf4e6.js:9 Invalid URL: TypeError: Invalid URL: undefined
    at r (googlesitekit-modules-sign-in-with-google-f5adc79d7ec046daf4e6.js:9:27561)
    at SetupMain (googlesitekit-modules-sign-in-with-google-f5adc79d7ec046daf4e6.js:1:3656)
    at Fo (googlesitekit-vendor-53f2bc5cdc475dd3f08e.js:7:721508)
    at Ti (googlesitekit-vendor-53f2bc5cdc475dd3f08e.js:7:767758)
    at Qj (googlesitekit-vendor-53f2bc5cdc475dd3f08e.js:7:760306)
    at Kj (googlesitekit-vendor-53f2bc5cdc475dd3f08e.js:7:760231)
    at wa (googlesitekit-vendor-53f2bc5cdc475dd3f08e.js:7:757261)
    at googlesitekit-vendor-53f2bc5cdc475dd3f08e.js:7:708905
    at t.unstable_runWithPriority (googlesitekit-vendor-53f2bc5cdc475dd3f08e.js:7:784156)
    at Br (googlesitekit-vendor-53f2bc5cdc475dd3f08e.js:7:708614)

Ths does not appear to be creating any user-facing issues from our testing but we've reported it as a launch blocker as it should be fixed.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

eugene-manuilov commented 17 hours ago

AC ✔

eugene-manuilov commented 17 hours ago

@jimmymadon, as far as i understand it, those console errors appear because isURLUsingHTTPS is called while home URL is not resolved yet. We need to update components that use that function to wait until the home url is resolved and only then call that function. Could you please update IB accordingly?

jimmymadon commented 14 hours ago

@eugene-manuilov The IB indirectly does do what you are saying unless I'm missing something. We can just check if homeURL is undefined and not call the isURLUsingHTTPS function in that case. Or do you mean we should use something like await resolveSelect('getSiteInfo') which makes sure homeURL will be resolved?

eugene-manuilov commented 11 hours ago

Ah... yes, sorry about that 🤦‍♂, you are right, IB ✔