question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError r.mergeOptions is not a function

See original GitHub issue

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/react

SDK Version

7.2.0

Framework Version

7.2.0

Link to Sentry event

https://sentry.io/share/issue/4769d6305de648aa98e1f87006d2f279/

Steps to Reproduce

Random occurrence of this error is faced in our app.

Expected Result

To add proper code checks to make sure it doesnt break on reat apps

Actual Result

      }
      const self = hub.getIntegration(InboundFilters);
      if (self) {
        const client = hub.getClient() as Client;
        const clientOptions = client ? client.getOptions() : {};
        const options = self.mergeOptions(clientOptions);  // <-------------------- happening here !!!
        if (self.shouldDropEvent(event, options)) {
          return null;
        }
      }
      return event;

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lforstcommented, Jun 30, 2022

The code snippet you shared must be from at least before version 6.3.2 because it the inbound filters integration didn’t look like that since https://github.com/getsentry/sentry-javascript/pull/3458.

Please delete your node_modules and reinstall them, essentially you must make sure all sentry JS SDKs are on the same versions and you don’t have any outdated transitive dependencies on the Sentry SDK - also check your globally installed packages.

0reactions
lforstcommented, Jul 1, 2022

since we embed our widget in our clients site

Yup, then it’s very likely that one of your clients is also using Sentry with a different version. I want to mention that we advise not to use Sentry for any sort of injected widgets/extensions/etc. for exactly this reason. Not only are the events you see in Sentry polluted by your clients if they are using the Sentry SDK, but you’re also polluting your client’s events - essentially this is hurting everyone.

Hence I believe we can ignore it ? 🤔

Seems like it 😃

Thanks boss 😁

You’re welcome!

Closing this. Feel free to ping again if you feel like it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack-merge merge is not a function - Stack Overflow
In a new version of webpack-merge, It is imported like below. const { merge } = require('webpack-merge');.
Read more >
TypeError: Object(...) is not a function : r/reactjs - Reddit
Hello, While working in React I made an ES6 arrow function. When I saved my work and the app automatically reloaded in Chrome,...
Read more >
How to use the got.mergeOptions function in got - Snyk
To help you get started, we've selected a few got.mergeOptions examples, based on popular ways it is used in public projects.
Read more >
mocha/mocha.js - chromium/src/third_party - Git at Google
function from$1 (that, value, encodingOrOffset, length) {. if (typeof value === 'number') {. throw new TypeError('"value" argument must not be a number'). }....
Read more >
Team:Estonia TUIT/videojs - iGEM 2020
toString,a=function(e){return s(e)?Object.keys(e):[]};function r(t,i){a(t). ... _(r))throw new TypeError("The element or ID supplied is not valid.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found