Skip to content

[Replay] Uncaught TypeError: debounce.default is not a function #6474

@dryisf

Description

@dryisf

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/browser

SDK Version

7.24.2

Framework Version

React 16.14.0

Link to Sentry event

No response

Steps to Reproduce

npm install @sentry/browser @sentry/replay

Sentry.init({ dsn: process.env.SENTRY_DSN, replaysSessionSampleRate: 1.0, replaysOnErrorSampleRate: 1.0, integrations: [new Replay()], });

Expected Result

No crash

Actual Result

Application crashing with this error : Uncaught TypeError: debounce.default is not a function

The error is triggered in @sentry/replay/cjs/replay.js line 109:
this._debouncedFlush = debounce.default(() => this.flush(), this.options.flushMinDelay, { maxWait: this.options.flushMaxDelay, });

It should be instead :
this._debouncedFlush = debounce(() => this.flush(), this.options.flushMinDelay, { maxWait: this.options.flushMaxDelay, });

Metadata

Metadata

Assignees

Labels

Package: replayIssues related to the Sentry Replay SDK

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions