-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Argument websiteId
is missing.
#2614
Comments
Both |
Found the Same Error in the Logs of a self-hosted umami: PrismaClientValidationError:
Client Version:5.11.0 |
[EDIT] The custom script was definitely a cause, but the error still pops up from time to time. If anyone has more info on this issue, I'm interested. Fwiw, I had the same issue but the cause was outside Umami. Maybe the info can be of help to others too. I had a custom script that called umami.track but I forgot to wait for the umami-script to be loaded. <script data-id="umami-script" defer src="..." data-website-id="..."></script>
<script type="text/javascript">
function myTracker(eventName, eventData) {
...
umami.track(eventName, eventData);
}
</script> This randomly failed with the above mentioned error, due to the umami script not being loaded yet when myTracker was called. The solution was to add a listener for the umami-script to be loaded, like so: <script data-id="umami-script" defer src="..." data-website-id="..."></script>
<script type="text/javascript">
function myTracker(eventName, eventData) {
document.querySelector('script[data-id="umami-script"]').addEventListener('load', function () {
...
umami.track(eventName, eventData);
});
}
</script> [EDIT 2] In my case, if my web app would call the myTracker() function before the script was loaded, this would cause the event not to be generated. I removed the defer option from the umami-script line to make sure it loads before the app starts, delays are negligable. So now I have: <script data-id="umami-script" src="..." data-website-id="..."></script>
<script type="text/javascript">
function myTracker(eventName, eventData) {
...
umami.track(eventName, eventData);
}
</script> which seems to work fine. I'll report back if it wouldn't solve my issue. |
I also have the same issue today.
I am using v2.11.2 at my own host. |
Fixed in v2.12.0. |
|
I also still get this issue in our server logs on version v2.12.1. Database: Log output (I redacted information with asterisks *):
Umami version: Deployment: Tracker script:
Can someone take another look please? |
i'm seeing this problem in 2.13.2 also
database: postgres @mikecao could this please be re-opened? |
+1 in v2.13.2, self hosted, postgres, with docker. Is there a workaround?
|
found a fix. not sure if it's robust. Here's a PR: #2946 |
For more context, the issue arises on new deployments of umami when there is no entries in the website_event table. Therefore performing an inner join on this table returns no entries, even when there is a matching session in the session table. Performing an outer join will at least allow the current session to be returned from this query when the website_event table is empty. I haven't tested if this results in miscounted events and views from the sum aggregate, however. |
We have a deployment with data in the table, and some users are unfortunately triggering this error still. Still diving into it... |
Hey everyone! I'm encountering the same issue with my self hosted instance of Umami (v2.14.0) and Postgres. If I try to send an identify request and no events has been recorded yet, I get the error that website ID is missing. The thing is, further requests (regular events) fails too. The app seems to stay in a broken state. I had to clean up the website data and then send regular events to get it to work. I've got the same exact logs as anyone else but if you need more info, let me know. |
Me too. Still encountering the sam issue. Sometimes it works well, sometimes it fails.
|
Update: I'm now getting the error randomly, even when i'm not using the identify feature. My database has some events already. Had to redeploy the server instance to get it to work again. |
Same error Argument |
Same problem. After I reset the website data the error is gone. Probably something related with session data since I started using that yesterday ( Self-hosted |
Can confirm (
|
@mikecao Can you re-open this issue? Seems like a lot of people are still encountering this problem. |
Re-opening. Found the issue and will push out a fix. |
Describe the Bug
Found in the console
Database
PostgreSQL
Relevant log output
Which Umami version are you using? (if relevant)
2.10.2
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Docker
The text was updated successfully, but these errors were encountered: