Survey mode API trigger a bug when solo loaded
Closed this issue · 5 comments
Hello everyone !
I started using Posthog for posting surveys on my website but recently, if I only send one API mode survey on my website, the method getActiveMatchingSurveys() doesn't return anything anymore and I get an error like this :
I was wondering if someone knows why this error occurs or if it's a current bug on the posthog js library.
Thanks in advance !
@ThibaudTeachup did you found any answer I am having the same issue it comes as posthog takes time to initialize
@kalpesh-aalore I unfortunatly didn't find any solution to this problem. Yeah it looks like an init problem since sometimes it works fine for no reason. If I put a timeout on the getActiveMatchingSurveys() method it seems to work everytime but it doesn't look good and causes problems to interact between directives...
Hi! We also faced this issue, from what we can tell it comes from the release 1.148.2 and in particular this PR. @pauldambra do you think you could take a look ? If you need to replicate the issue, just have a page that calls on the getActiveMatchingSurveys()
first thing after load and you will most likely find the issue .
Hello ! Looks like everything is working fine now ! Thanks @pauldambra and @aymeric-duchein !
Awesome, thanks for letting us know!