June Analytics weird error when attempting to track
so I'm trying to use the june SDK for nodeJS on a fastify app, but I always get this error when trying to
analytics.identify
a user, has someone else had something similar?
[16:19:14 UTC] INFO: request completed
[backend] reqId: "req-6"
[backend] res: {
[backend] "statusCode": 400
[backend] }
[backend] responseTime: 20.25774999987334
[backend] [16:19:14 UTC] ERROR: .userId/anonymousId/previousId/groupId is not a string
[backend] err: {
[backend] "type": "Error",
[backend] "message": ".userId/anonymousId/previousId/groupId is not a string",
[backend] "stack":
[backend] Error: .userId/anonymousId/previousId/groupId is not a string
[backend] at new ValidationError (/Users/a3tech/Developer/islands/clientsquare/backend/node_modules/@segment/analytics-core/src/validation/errors.ts:5:5)
[backend] at assertUserIdentity (/Users/a3tech/Developer/islands/clientsquare/backend/node_modules/@segment/analytics-core/src/validation/assertions.ts:19:11)
[backend] at validateEvent (/Users/a3tech/Developer/islands/clientsquare/backend/node_modules/@segment/analytics-core/src/validation/assertions.ts:71:3)
[backend] at NodeEventFactory.EventFactory.normalize (/Users/a3tech/Developer/islands/clientsquare/backend/node_modules/@segment/analytics-core/src/events/index.ts:277:18)
[16:19:14 UTC] INFO: request completed
[backend] reqId: "req-6"
[backend] res: {
[backend] "statusCode": 400
[backend] }
[backend] responseTime: 20.25774999987334
[backend] [16:19:14 UTC] ERROR: .userId/anonymousId/previousId/groupId is not a string
[backend] err: {
[backend] "type": "Error",
[backend] "message": ".userId/anonymousId/previousId/groupId is not a string",
[backend] "stack":
[backend] Error: .userId/anonymousId/previousId/groupId is not a string
[backend] at new ValidationError (/Users/a3tech/Developer/islands/clientsquare/backend/node_modules/@segment/analytics-core/src/validation/errors.ts:5:5)
[backend] at assertUserIdentity (/Users/a3tech/Developer/islands/clientsquare/backend/node_modules/@segment/analytics-core/src/validation/assertions.ts:19:11)
[backend] at validateEvent (/Users/a3tech/Developer/islands/clientsquare/backend/node_modules/@segment/analytics-core/src/validation/assertions.ts:71:3)
[backend] at NodeEventFactory.EventFactory.normalize (/Users/a3tech/Developer/islands/clientsquare/backend/node_modules/@segment/analytics-core/src/events/index.ts:277:18)
1 Reply
solved it, turns out the user_id was not a string LOL