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

Recordings images / fonts are not rendered properly when the site is not reachable #13177

Open
eligro opened this issue Dec 7, 2022 · 5 comments
Labels
bug Something isn't working right feature/replay Features for Team Replay

Comments

@eligro
Copy link

eligro commented Dec 7, 2022

Bug description

Hello,

Our dashboards are accessible from local networks, and not accessible from the cloud.
So our customers do access them from local assigned IPs such as http://10.1.1.25 , which are not reachable from the posthog.

What we've noticed that during the recording replay, it is trying to reach http://10.1.1.25 to get fonts and images. if it's not reachable, the recording looks screwed up.

How to reproduce

  1. run locally some UI application.
  2. connect to the dashboard from another computer (Which do not have access to your local UI application)
  3. see that the recording is not including images / fonts - it's screwed up.

Environment

  • [V] PostHog Cloud

Additional context

Questions:

  1. Is there a way to override the URL which the recording is trying to load fonts / images and any static data? I would like to be able to provide an public URL which do have those static files so you can render the data from there and not from the local IPs
  2. or, is there a way to provide PoshHog mapping of hosts , like adding to /etc/hosts - which I can map for example 10.1.1.25 to mycloudservice.com and there the static files would be available.
  3. or, is there a way to collect this data during the session, and not letting posthog to collect this data afterwards?
@eligro eligro added the bug Something isn't working right label Dec 7, 2022
@eligro eligro changed the title Recordings css / js are not rendered properly when the site is not reachable Recordings images / fonts are not rendered properly when the site is not reachable Dec 7, 2022
@benjackwhite
Copy link
Contributor

Unfortunately, no there isn't. This is quite a specific use case which I'm not sure how we would be able to support...

I think this would be pretty complex to implement but we could perhaps do something in the capture code to allow you to do some custom processing. It feels quite hacky but then this is quite an edge case scenario so might make sense. https://github.com/PostHog/posthog-js/blob/master/src/extensions/sessionrecording.ts#L183

@benjackwhite
Copy link
Contributor

I created a PR here. Not sure if we actually will go with this approach but it could be an option....

@eligro
Copy link
Author

eligro commented Dec 7, 2022

Thanks @benjackwhite ! really appreciate the quick reply and the PR you've created. I liked the idea and hopefully it would be approved.

@marandaneto
Copy link
Member

marandaneto commented Apr 8, 2024

Relates to #18154 (comment)
eg rrweb-io/rrweb#1433

@marandaneto marandaneto added feature/replay Features for Team Replay and removed feature/recordings labels Apr 25, 2024
@eoghanmurray
Copy link

Some of this might be achievable with the new origins config setting once rrweb/#1475 lands. That would result in those urls being captured at record time and included in the recording (rather than referenced at a different address)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right feature/replay Features for Team Replay
Development

No branches or pull requests

4 participants