Skip to content

After refreshing the page or opening new content types, maskAllText, maskAllInputs, and blockAllMedia are changed to true. #10293

@milos-ws

Description

@milos-ws

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

latest

Framework Version

No response

Link to Sentry event

No response

SDK Setup

      if (!sessionStorage.getItem('sentryReplaySession')) {
        // Use the once method to ensure this runs only once
        $(context).find('body').once('onceSentry').each(function () {
          Sentry.onLoad(function () {
            Sentry.init({
              replaysSessionSampleRate: 1,
              environment: 'local',
              dsn: 'https://test.com',
              integrations: [
                new Sentry.Replay({
                  maskAllText: false,
                  maskAllInputs: false,
                  blockAllMedia: false,
                }),
              ],
            });
            Sentry.setUser({
              email: 'test@example.com',
            });
          });
        });
      }

Steps to Reproduce

When I load a certain page for the first time, the session starts, and the recording replay begins. All text is unmasked, inputs work fine. However, if I go to another page, all text is masked. If I check

const replay = Sentry.getClient().getIntegrationById("Replay");

everything is set to true.

Also, if I go back to the same page, the text is still masked, and the settings are set to true.

NOTE: I must use if (!sessionStorage.getItem('sentryReplaySession')) because if not, when I go to another page, the script starts again, and I get the error 'Multiple Replay session is not allowed.'

Expected Result

I expect that, because I set 'maskAllText' to false when the session and replay start, it will remain false until the session ends.

Actual Result

The settings change to true upon page refresh or when navigating to another page.

maskAllText: true,
maskAllInputs: true,
blockAllMedia: true,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions