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

Tagmanager error:"Not found or permission denied." console error showing when user selects different tag manager a/c. #8316

Closed
2 tasks
mohitwp opened this issue Feb 26, 2024 · 2 comments
Labels
Good First Issue Good first issue for new engineers Module: Tag Manager Google Tag Manager module related issues P1 Medium priority Type: Bug Something isn't working

Comments

@mohitwp
Copy link
Collaborator

mohitwp commented Feb 26, 2024

Bug Description

On selecting different tag manager a/c from drop down during Tag manager set up or after set up under settings throw console error.
googlesitekit-api-6b06a5c9b165bf7e28a4.js:3 Google Site Kit API Error method:GET datapoint:live-container-version type:modules identifier:tagmanager error:"Not found or permission denied."

It is confusing because when I selected one a/c as you can see in below screenshots. No console error appear. After selecting another a/c when I selected that a/c again then console error appeared for the same a/c.

Steps to reproduce

  1. Set up tag manger.
  2. Open console and during set up change tag manager a/c.
  3. See error.

OR

  1. Set up tag manger.
  2. After set up open tag manager settings in edit mode.
  3. Select different tag manager a/c from drop down.
  4. See error.
  5. Clear console while switching a/c.

Screenshots

image

image

Recording.787.mp4

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

Acceptance criteria

  • No console errors should be raised when switching selected accounts in the setup or settings screens for Tag Manager

Implementation Brief

The problem seems to be that the request for the live container version is triggered as soon as the new accountID is set, but the old internalContainerID is still set.

See

  • Clarify the cause of "asynchronously handled actions" dispatched from a function that has effectively awaited. #6818
  • // Note that when plain actions are dispatched in a function where an await has occurred (this can be a regular async function that has awaited, or a generator function
    // action that yields to an async action), they are handled asynchronously when they would normally be synchronous. This means that following the usual pattern of dispatching
    // individual setter actions for the `googleTagAccountID`, `googleTagContainerID` and `googleTagID` settings each resulted in a rerender of the
    // GoogleTagIDMismatchNotification component, thus resulting in an erroneous call to the GET:container-destinations endpoint with mismatched settings. To mitigate this, we
    // dispatch a single action here to set all these settings at once. The same applies to the `setSettings()` call above.
    // See issue https://github.com/google/site-kit-wp/issues/6784 and the PR https://github.com/google/site-kit-wp/pull/6814.

Test Coverage

  • No changes expected

QA Brief

  • Open the Browser Console.
  • Select a Tag Manager account, then select a different account during setup or on the settings edit screen.
  • There should be no "Not found or permission denied." console error.

Changelog entry

  • Fix bug that caused browser console error to appear when changing Tag Manager account in Tag Manager setup/settings.
@mohitwp mohitwp added Type: Bug Something isn't working Module: Tag Manager Google Tag Manager module related issues labels Feb 26, 2024
@aaemnnosttv aaemnnosttv self-assigned this Feb 26, 2024
@aaemnnosttv aaemnnosttv added the P1 Medium priority label Feb 26, 2024
@aaemnnosttv aaemnnosttv removed their assignment Feb 26, 2024
@eugene-manuilov eugene-manuilov self-assigned this Feb 27, 2024
@eugene-manuilov
Copy link
Collaborator

IB ✔️

@eugene-manuilov eugene-manuilov removed their assignment Feb 27, 2024
@derweili derweili self-assigned this Mar 15, 2024
@derweili derweili removed their assignment Apr 1, 2024
@tofumatt tofumatt assigned tofumatt and unassigned tofumatt Apr 1, 2024
@wpdarren wpdarren added the Good First Issue Good first issue for new engineers label Apr 2, 2024
@kelvinballoo
Copy link
Collaborator

kelvinballoo commented Apr 2, 2024

QA Update ✅

This is verified good as follows:

  • Tested on MacOS Ventura Chrome on WP 6.4.3 and both PHP 8.0 and PHP 7.4
  • Tested on MacOS Ventura Firefox, Safari
  • Results are as expected with no console errors when updating the different Gtags
  • Saving a new tag also doesn't result in any error.
  • Video is attached for reference

Moving this ticket to 'Approval' column.

Video Reference
Screen.Recording.2024-04-02.at.18.23.52.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good first issue for new engineers Module: Tag Manager Google Tag Manager module related issues P1 Medium priority Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants