Telemetry Problem on Heroku instance >> You must pass either an "anonymousId" or a "userId"

Hi guys, I’ve hosted my n8n instance on Heroku.

When I updated my from 0.144.0 to 0.145.0, ​it crashed !
It also crashed on 0.146.0 !

The error message was:
AssertionError [ERR_ASSERTION]: You must pass either an "anonymousId" or a "userId".

According to this link, it happens when you have a userId of 0.

I temporarily fixed it by disabling the Telemetry feature with the below line but I don’t want to disable that since I know it’s important for n8n teams!
export N8N_DIAGNOSTICS_ENABLED=false

Now, how is that userId set up ? And how can it be solved ?

2 Likes

Thanks a lot for reporting this! I’ll make to sure to forward this to the team in order to take a closer look.

1 Like

Thank you so much for reporting this TheFSilver!

While we do realise the problem, userID and anonymous ID both are missing there, that seems to be because the instanceID is not present. I’m trying to reproduce this but couldn’t - how did the instance end up without instance ID? Can you please send over some more info about how the instance is configured?

  • What env vars are overridden
  • If you can access your config file (located in <HOME>/.n8n/ by default), what exists there (only the keys please, not the values if they exist)

Would really help me reproduce and actually fix the root problem. thanks!

Would it help if you see the github repository?
Here it is: GitHub - sarveshpro/n8n-heroku: n8n docker implementation for heroku.

I forked it and kept updating it to the latest version.

I’m afraid I have no clue on how to access the config file on Heroku/Docker

The fix on version 0.147.0 did it !

I checked by reenabling the telemetry with:
export N8N_DIAGNOSTICS_ENABLED=true