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
Console error "There was an error setting cookie mtm_cookie_consent
. Please check domain and path." when calling 'rememberCookieConsentGiven'
#17926
Comments
Just FYI: The same function in the original readable source is here: Lines 2451 to 2455 in c2ab6e5
And this function only logs the warning and should not break anything else. It was added in #17744 to find exactly such corner-cases. And I can reproduce this by calling |
Yes I suppose it would make sense to always typecast value before checking it against the cookie value, since cookies are always strings. |
I just encountered this when trying to integrate Matomo with cookiebot:
|
FYI |
mtm_cookie_consent
. Please check domain and path."mtm_cookie_consent
. Please check domain and path."
mtm_cookie_consent
. Please check domain and path."mtm_cookie_consent
. Please check domain and path." when calling 'rememberCookieConsentGiven'
mtm_cookie_consent
. Please check domain and path." when calling 'rememberCookieConsentGiven'mtm_cookie_consent
. Please check domain and path." when calling 'rememberCookieConsentGiven'
@tsteur I have experienced the same problem recently. What can I do to solve this? |
@niklasternstedt do you mind creating a new issue for this so the team can triage? |
@tsteur sure |
I get the error "There was an error setting cookie
mtm_cookie_consent
. Please check domain and path." on every page load in my Chrome browser.I was able to narrow it down to this location in the minified matomo.js:
The problem is the second part of the condition.
aD(dp) !== dq
is indeed unequal, but only because the type is not correct. The first part returns1630087076907
as a string, while the second part returns the same1630087076907
as an integer.Expected Behavior
No console error should be thrown.
Possible Solution
A typecasting would have to take place before (or a
!=
would have to be set instead of a!==
).Steps to Reproduce (for Bugs)
I don't know why others don't see the error message. I can reproduce the error locally and on prod.
Your Environment
The text was updated successfully, but these errors were encountered: