sentry-python: Replay SDK: Session Replay videos do not show in the UI if tunnelling is enabled based on customer report

Problem:

A customer has tried Session Replay with tunnelling enabled (to get around ad blockers) and Session Replay videos failed to show up in their UI.

As soon as they disabled tunneling, they were able to see Session Replay videos. They installed the latest versions of @sentry/react and @sentry/replay. Also @sentry/tracing.

Customer details and code snippets found here in private Jira ticket.

Solution Brainstorm:

TBD.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 15 (12 by maintainers)

Most upvoted comments

I setup the tunnel at https://github.com/getsentry/examples/tree/master/tunneling/python to test and found a few issues:

Trying to decode the replay payload with utf-8 will fail

Can we decode as iso-8859-1 instead?

We are forwarding the decoded payload instead of the original body: https://github.com/getsentry/examples/blob/master/tunneling/python/app.py#L34

Change the post to:

        requests.post(url=url, data=flask.request.data)

(h/t @ryan953)

Make sure you’re using at least version 7.27.0 (I was using 7.25.0, oops)

hmm ok we’ll need to turn off bodyParser to access the raw stream. I think @lforst will be much quicker at fixing nextjs since I have none of the setup locally.

@sl0thentr0py So we’re also facing a similar issue with the nextjs example as well (ticket just came in yesterday)

@lucasfv-c1 in the except, can we raise ex just to make sure there are no other errors getting caught and ignored?