invalid_grant error when fetching Google Search Console domains -- whenever you setup several websites #690
Replies: 22 comments 16 replies
-
thanks for reporting this @ameshkov! i tested it on the cloud but there it seems to work all fine. we'll check if we can see this on the self-hosted version. by the way as i see you work for AdGuard: any chance we can get you to whitelist Plausible? you use Plausible yourself as I assume you believe that this is the better way of doing web analytics. not only as third-party but we've had couple of reports from people using your DNS that you're blocking our website too when it's first party so they for instance cannot read our blog without disabling your DNS. would be good if you can help out with this. thanks! |
Beta Was this translation helpful? Give feedback.
-
hi @metmarkosaric! Note that I am using the same Google account to create integration with two different domains. Have you also used the same acc? Regarding AdGuard, as I recall, in our tracking protection list we use a more granular approach and block just the JS file (so it's blocked even on our own website) and don't block the whole domain. Probably the rule comes from EasyPrivacy, I'll see if we can avoid blocking your website in AG DNS. However, if you want a really viable way to avoid content blockers doing their job, please consider extending the API to allow importing website access logs. You see, the root cause for blocking is that there's an arbitrary JS loaded from a third-party. I understand that you're only sending a limited amount of data, but this can be changed any time, this is a good enough reason for people to be concerned about it. Using a logs-based analytics system completely eliminates that possibility, there're no external trackers, site owners have their stats, everyone is happy. At first glance, it'd be enough simply to extend create_event and add an optional |
Beta Was this translation helpful? Give feedback.
-
Thanks for the update! I tried with the same account and it works fine. I'm only testing the cloud version so not sure if there's something else on the self-hosted. we have no current plans to import server logs as they're not that useful with mostly bot traffic so we would need to find a way to make those stats accurate and insightful first. we keep the option open for the future and there's a thread already. we're an open source and transparent project so you'll easily see if we make some evil moves and can block us any time we do something you think is not ethical. but obviously it's your decision. just wanted to mention it as it's not the best user experience for your users to have normal websites blocked and then they have to reach out to us asking why our server is down. |
Beta Was this translation helpful? Give feedback.
-
Are there any logs I could look into and try to figure it out myself?
Thank you, subscribed there! So the problem is just filtering out the bot traffic? We could experiment on our side with different ways of doing it and share the result.
Don't worry, we'll definitely address this in AG DNS. DNS is supposed to be casual-user friendly so we avoid blocking whole websites. |
Beta Was this translation helpful? Give feedback.
-
I'm not aware of logs for self-hosting so someone else might be able to help with that part.
Some of the more interesting stats won't be able to be counted using server logs but the main issue really is bot traffic. You can read a bit more here on the comparison we did between Plausible and server logs accuracy: https://plausible.io/blog/server-log-analysis |
Beta Was this translation helpful? Give feedback.
-
Replying to @ameshkov
That's the biggest one, yes. We haven't found a server log tool that filters out bots anywhere close to as well as JS-based analytics tools do. I'm very curious about potential solutions in this space. The second question is getting server logs into our system. I understand and agree that we could easily augment our /api/event endpoint to accept server logs. But how is a non-developer wordpress user supposed to integrate with this? Or even a developer running on Netlify? To make it truly usable we need countless numbers of different integrations for all potential tech/ops stacks. A javascript-based tracker is much easier to integrate with since the client-side web is standardized. Even then, getting people to install the script is absolutely the most difficult part in getting them to use the tool. I fear that even if we support some amazing ways to direct your server logs to Plausible, it will be a very niche feature used by <5% of our userbase. Our goal is to remove Google Analytics from as many sites as possible so it makes sense for us to focus on a solution that's convenient for the majority of our audience who is non-technical. I'm not against log analysis or anything. Technically speaking it's preferable because the end-user doesn't need to load anything and you still get basic stats. If the bot issue can be solved I would happily build some integrations with backend tooling. But I also believe that the JS-based tracker is more effective in getting people off GA which is our mission. |
Beta Was this translation helpful? Give feedback.
-
@ukutaht oh, I am not implying that you should choose logs over JS, this is definitely just a niche feature. Also, from reading the thread that Marko linked it actually seems that this is already possible, we'll just have the timestamp a little bit out of sync, this is not that problematic. Anyways, thank you for the answers! |
Beta Was this translation helpful? Give feedback.
-
Sure, thanks for yout input @ameshkov. BTW you can check logs with |
Beta Was this translation helpful? Give feedback.
-
I'm getting the same error, and mine is not self-hosted. Is there anything I can provide to give more info or context? It happens when trying to see which search terms are used in Google. |
Beta Was this translation helpful? Give feedback.
-
The second website is not required to trigger this bug. You can just add a single site, verify that it works, and wait for 2 weeks, check Plausible dashboard again and it will break exactly the same way. |
Beta Was this translation helpful? Give feedback.
-
Same issue here. Tracking multiple domains all associated with one Google Search account. Plausible reports "invalid_grant" on the GA Search integration after a few days. This is the only thing preventing me from switching fully over to Plausible and becoming a sponsor. Everything else is great! I'm assuming this is also why "Top Sources" doesn't update, right? Please let me know what I can provide to help with resolving this issue. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I am facing the same issue here, self-hosted instance and only one website. I tried regenerating new Google OAuth 2.0 keys and using them instead of the old ones, but still no luck. |
Beta Was this translation helpful? Give feedback.
-
I'm also getting the None of the reasons listed at https://plausible.io/docs/google-search-console-integration#i-get-the-invalid-grant-error applies. If there is anything I can do to prevent this from happening, or any further details I can provide, please let me know. Edit 2022-04-22: It happened again. |
Beta Was this translation helpful? Give feedback.
-
We are getting this on the Cloud version (non-self hosted). |
Beta Was this translation helpful? Give feedback.
-
Having the same issue. My container logs:
|
Beta Was this translation helpful? Give feedback.
-
Is this being looked into? The problem is still happening. If it is not a priority or cannot be fixed, it would be nice to be told that so I can evaluate my options going forward. If you need more information, I'm happy to provide it or even provide unlimited full access for any devs to an instance on my server if that would help. I would switch to the cloud service but it seems the issue occurs there too. Thanks in advance for any updates :-) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Agreed @mhsabbagh, that is what I'm doing too. However, having to re-link all my sites every few days is tedious and leads to inaccurate stats during the 'unlinked' period. Seems pretty clear there is an issue with the grant/token expiring and that should be looked into, IMHO. Anyways, appreciate the feedback from everyone thus far, looking forward to maybe finding someone that comes up with a fix! |
Beta Was this translation helpful? Give feedback.
-
Look like google do somthing. You should add your key again, I am using
self-host version, google still sometime do something on it side. I have to
add the key again
|
Beta Was this translation helpful? Give feedback.
-
Bastard tokens expiring after 7 days if the App is in Testing. Could we kindly have a weekly refresh of the API token for Docker self-hosted, @metmarkosaric ? A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days. Source: https://developers.google.com/identity/protocols/oauth2 |
Beta Was this translation helpful? Give feedback.
-
I'm looking for a solution to this too, self-hosted, and it does seem to be the 7 day token that's the problem. But Points 4 and 5 in the support documentation are unclear, too, regarding" finally, return to APIs & Services and select Domain Verification..." with a few hints on where to find it, but i don't find it anywhere and am unsure whether i've even set this up properly. Are the Plausible docs up to date? |
Beta Was this translation helpful? Give feedback.
-
We're encountering this very issue on a selfhosted instance as well. Nearly 4 years later, it's still about GCP's expiring OAuth tokens. Via @mheland's comment on Dec 10, 2022, this seems to be the cause:
How many sites are set up is not a factor. Since this issue was converted to a discussion before this revelation and the problem persists, I'm proposing chaning it back to an issue. I apologize if this is against protocol. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Precheck
This might be important that I am testing the self-hosted version, but it looks like this bug should happen with the SAAS version as well.
Prerequisites
Bug report
Expected behavior
Integration works for both websites
Screenshots (If applicable)
Beta Was this translation helpful? Give feedback.
All reactions