Comments (5)
Both sessionId
and websiteId
are non-nullable columns, so it should fail. Just wondering how it got to this state. This was produced from the tracker and not a custom payload?
from umami.
Found the Same Error in the Logs of a self-hosted umami:
PrismaClientValidationError:
Invalid prisma.websiteEvent.create()
invocation:
{
data: {
id: "XXXXXXXXXXXXXXXXXXXXXXX",
sessionId: undefined,
visitId: "XXXXXXXXXXXXXXXXXXXXXXXX",
urlPath: "#/XXXXXXXXXXXX",
urlQuery: undefined,
referrerPath: "#/",
referrerQuery: undefined,
referrerDomain: "",
pageTitle: "XXXXXXXXXXXXXXX",
eventType: 1,
eventName: null,
- websiteId: String
}
}
ArgumentwebsiteId
is missing.
at Tn (/app/node_modules/@prisma/client/runtime/library.js:115:5888)
at In.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:122:6510)
Client Version:5.11.0
from umami.
[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.
from umami.
I also have the same issue today.
Invalid `prisma.websiteEvent.create()` invocation:
|
| {
| data: {
| id: "********",
| sessionId: undefined,
| visitId: "*******",
| urlPath: "/",
| urlQuery: undefined,
| referrerPath: undefined,
| referrerQuery: undefined,
| referrerDomain: "",
| pageTitle: "******",
| eventType: 1,
| eventName: null,
| + websiteId: String
| }
| }
|
| Argument `websiteId` is missing.
| at Tn (/app/node_modules/@prisma/client/runtime
I am using v2.11.2 at my own host.
from umami.
I got the same error. Umami v2.11.3, Postgres 16.2, docker container
from umami.
Related Issues (20)
- Umami Cloud signup page 'See docs' link is broken HOT 1
- Issue with Incorrect Encoding of City Names from Cloudflare Headers
- POST to send API returns 405 HOT 3
- Documentation should clarify the definition of "bounce" HOT 3
- Metrics Api defaults to LIMIT 500 HOT 1
- Show number of events in dashboard overview HOT 1
- Unable to Run Umami using Podman\Quadlet - Error: getaddrinfo ENOTFOUND Umami HOT 1
- Send CORS header with non-200 HTTP statuses too HOT 3
- Event data not filtering or displaying properly HOT 5
- Building via docker-compose stuck on "Browserslist: caniuse-lite is outdated." HOT 2
- [Feature] IP version statistics
- data-auto-track is being ignored HOT 1
- How to write a Workflow for automatic synchronization of forks? HOT 1
- How to configure "API Routes Response Size" HOT 2
- ref icon support server cache, not duckduck go icon
- [Feature] "Average visit time" and "Bounce rate" on API stats HOT 1
- Overview detail information shows 'Something went wrong' when trying to display data (partially) before the first date of usage HOT 1
- It takes a while for umami to correctly identify a visitor's geolocation HOT 2
- Enhancing README.md for Better Usability and Accessibility HOT 3
- Default date in empty HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umami.