GoodDollar / GoodDAPP

GoodDollar.org Wallet is the simplest access point to Claim your daily G$. It Is based on web3 and React native web.
good-dapp.vercel.app
MIT License
101 stars 52 forks source link

[BUG] Error: PostHog fetch error #4210

Open sentry-io[bot] opened 5 months ago

sentry-io[bot] commented 5 months ago

Because of this error, Pat cannot create and update the existing after-claim modal

Sentry Issue: GOODDAPP-1AZEX

Error: PostHog fetch error
  at <object>.value (lib/analytics/AnalyticsClass.js:474:30)
  at call (lib/analytics/AnalyticsClass.js:169:48)
  at formatter (lib/logger/js-logger.js:21:15)
  at logHandler (lib/logger/js-logger.js:33:3)
  at value (lib/hooks/useFeatureFlags.js:68:9)
...
(6 additional frame(s) were not displayed)
L03TJ3 commented 5 months ago

Not related to next-tasks not loading, but should be looked into how to only report error after max retry attempts

sirpy commented 5 months ago

@L03TJ3 this seems like an urgent issues. 30k instances a day. started last week. so it seems like an introduced bug in a release. or we added some new error log?

L03TJ3 commented 5 months ago

@sirpy there seems to be an initial fetch error always being logged, but it retries to connect, and this works (verified by using different default local values then what is set on posthog)

So the only thing that needs to be done (as far as I could tell) is fine-tune the error logger added to posthog here: https://github.com/GoodDollar/GoodDAPP/blob/db59b616e87424cae21832ace553b3a3e28a9895/src/lib/hooks/useFeatureFlags.js#L66

So yes, this increase is because of the new error log, but so far I didn't flag it as a bug yet (beyond some over logging)

sirpy commented 5 months ago

@L03TJ3 why would there always be an initial error? this sounds like either a bug on our side on their side that needs to be reported. logging changes sounds like a temporary patch but doesnt solve the core issue

L03TJ3 commented 5 months ago

Possible 'fix' is here: https://github.com/GoodDollar/GoodDAPP/commit/3d777791ac83ddaa5c0a2a50d6ff75a50bf9f246 (we don't do anything with this tracking anyway)

The why of it is up here: https://github.com/PostHog/posthog-js-lite/issues/180

marandaneto commented 5 months ago

In case any of you have more context about this, please let me know, I cannot reproduce this issue locally.

L03TJ3 commented 5 months ago

@marandaneto the only context right now would be this: https://github.com/GoodDollar/GoodDAPP/blob/master/src/lib/hooks/useFeatureFlags.js

any call we make for feature-flags go through here. it is the only place where we use the posthog client.

marandaneto commented 5 months ago

Alright, I appreciate it if you answer the other questions at https://github.com/PostHog/posthog-js-lite/issues/180#issuecomment-1943534799

sirpy commented 4 months ago

@L03TJ3 we should upgrade and close this