Unable to connect Analytics when 'Back' link is clicked on setup screen
Bug Description
When setting up a new Analytics account, on the Create your Analytics account screen, I click on the Back button
and when I clicked on the drop down to set up a new Analytics account again, an error appears in the console when I attempt to. At this point, I am unable to set up Analytics.
Also, I noticed if you select another account/property and click on the configure Analytics button, the button becomes inactive, but the spinner continuously appears and you are unable to set up Analytics. See screencast.
https://github.com/google/site-kit-wp/assets/73545194/7289dbe7-2e82-41a1-baee-f1897273c7d2
This is the error that appears in the console.
Uncaught (in promise) Invariant Violation: accountID is required.
at e.exports (https://moorfall.s3-tastewp.com/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-vendor-dfed20715cb9adaf207b.js:1:2502)
at createProperty (https://moorfall.s3-tastewp.com/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-modules-analytics-4-588f94e43579e8960d74.js:74:66462)
at Object.createProperty (https://moorfall.s3-tastewp.com/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-vendor-dfed20715cb9adaf207b.js:7:477277)
at https://moorfall.s3-tastewp.com/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-modules-analytics-4-588f94e43579e8960d74.js:74:33782
at u (https://moorfall.s3-tastewp.com/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-vendor-dfed20715cb9adaf207b.js:7:619726)
at Generator._invoke (https://moorfall.s3-tastewp.com/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-vendor-dfed20715cb9adaf207b.js:7:619479)
at forEach.e.<computed> [as next] (https://moorfall.s3-tastewp.com/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-vendor-dfed20715cb9adaf207b.js:7:620165)
at n (https://moorfall.s3-tastewp.com/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-vendor-dfed20715cb9adaf207b.js:1:76146)
at _next (https://moorfall.s3-tastewp.com/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-vendor-dfed20715cb9adaf207b.js:1:76361)
at https://moorfall.s3-tastewp.com/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-vendor-dfed20715cb9adaf207b.js:1:76428
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
Couldn't reproduce with a quick test. Assigning to @kuasha420 for a second look.
I can't reproduce this either. Tried to create the exact scenario in the screencast, not happing a matching account/property, clicking setup new account, and going back. When I reselect Setup new account, everything works as expected and there's no console error. When I select an existing account, I can also continue without any issues.
@wpdarren Do you remember any additional details that resulted in this bug?
cc @aaemnnosttv
@kuasha420 I will close this ticket as I am unable to recreate this issue now.