Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Errors in js console after disabling posthog #4797

Closed
1 task done
enyst opened this issue Nov 6, 2024 · 2 comments
Closed
1 task done

[Bug]: Errors in js console after disabling posthog #4797

enyst opened this issue Nov 6, 2024 · 2 comments
Labels
bug Something isn't working frontend Related to frontend

Comments

@enyst
Copy link
Collaborator

enyst commented Nov 6, 2024

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

Running locally, I got the pop-up to ask about posthog, and disabled it. Then as the app is starting up, the js console is a bit unhappy:

Screenshot 2024-11-06 at 19 59 45

The browser is Brave. Shouldn't it not try to connect? Cc: @amanape

OpenHands Installation

Development workflow

OpenHands Version

No response

Operating System

None

Logs, Errors, Screenshots, and Additional Context

No response

@enyst enyst added bug Something isn't working frontend Related to frontend labels Nov 6, 2024
@amanape
Copy link
Member

amanape commented Nov 6, 2024

Yes I've noticed this too and confirmed a few times that no events are being logged. I'll look into why exactly its logging soon though

@amanape amanape changed the title [Bug]: Errors in js console after disabling potshot [Bug]: Errors in js console after disabling posthog Nov 6, 2024
@amanape
Copy link
Member

amanape commented Nov 25, 2024

So it turns out that this is due to the ad-blocker. You can confirm that they stop after disabling the ad-blocker.

It has something to do when we init PostHog (before opting in or out):

posthog.init(config.POSTHOG_CLIENT_KEY, {
api_host: "https://us.i.posthog.com",
person_profiles: "identified_only",
});

I assume it tries to make initial contact with the api_host (https://us.i.posthog.com) but fails to do so because of the ad-blocker, so it attempts to retry. They don't seem to have configurations to handle this error though so not much I can do ☹️

Feel free to re-open this issue if you still encounter it after disabling ad-block

@amanape amanape closed this as completed Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Related to frontend
Projects
None yet
Development

No branches or pull requests

2 participants