posthog-js icon indicating copy to clipboard operation
posthog-js copied to clipboard

PostHog Cookies Rejected warning messages on Prod

Open MarArMar opened this issue 2 years ago • 0 comments

In browser logs, I have these messages, only on Prod (Localhost does not show the warnings in browser logs) :

Cookie “ph_phc_okLMsw7bwYpyho7m6B4ItKff0I5pObP1VAtIXB8096v_posthog” has been rejected for invalid domain. 5 es.ae2e1b37.js:6:24224 Cookie “__ph_opt_in_out_phc_okLMsw7bwYpyho7m6B4ItKff0I5pObP1VAtIXB8096v” has been rejected for invalid domain. es.ae2e1b37.js:6:24224 Cookie “ph_phc_okLMsw7bwYpyho7m6B4ItKff0I5pObP1VAtIXB8096v_posthog” has been rejected for invalid domain. 3 es.ae2e1b37.js:6:24224

Cookie “ph_phc_okLMsw7bwYpyho7m6B4ItKff0I5pObP1VAtIXB8096v_posthog” has been rejected for invalid domain.

How to reproduce

Create a SvelteKit project
Install Posthog 
Create Some buttons on your website with custom events
Deploy on Vercel
Click on Buttons
Open browser logs
Each time you clik on a button there is a new warning message

Environment

PostHog Cloud US, project ID: 39279

Additional context

"posthog-js": "^1.83.0", "@sveltejs/kit": "^1.25.1", "svelte": "^4.2.1", "vite": "^4.4.9",

MarArMar avatar Oct 14 '23 15:10 MarArMar