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

Large number of Uncaught "Object Not Found Matching" errors #2715

Open
daltonconley opened this issue Apr 18, 2024 · 13 comments
Open

Large number of Uncaught "Object Not Found Matching" errors #2715

daltonconley opened this issue Apr 18, 2024 · 13 comments
Labels
bug Something isn't working

Comments

@daltonconley
Copy link

Describe the bug
I am getting a large amount of errors being sent from rum:

Uncaught "Object Not Found Matching Id:2, MethodName:update, ParamCount:4"

To Reproduce
These errors are not consistent and I'm unable to reproduce this issue in any browser. However, I did find what I think could be a related bug from sentry. See getsentry/sentry-javascript#3440 (comment)

@daltonconley daltonconley added the bug Something isn't working label Apr 18, 2024
@amortemousque
Copy link
Contributor

Hello @daltonconley,
Thanks for your feedback. We will have a look to the Sentry's issue. In the meantime, you can discard these errors with the RUM browser SDK beforeSend API.

@KapilKarakoti1
Copy link

Hey @amortemousque ,
I'm still encountering this issue Uncaught "Object Not Found Matching Id:2, MethodName:update, ParamCount:4"
We're currently using the following versions in our applications:
"@datadog/browser-logs": "5.10.0",
"@datadog/browser-rum": "5.10.0".

Has this issue been resolved or are there any updates or workarounds available?

@BuiltByWalsh
Copy link

@amortemousque I started seeing this pop up as well yesterday. Coincidentally when it happens RUM is never able to capture session replay. Similar to @daltonconley I am unable to reproduce the issue and don't have any clear leads.

@xenomachina
Copy link

@amortemousque I started seeing this pop up as well yesterday.

Did you happen to send out emails containing links to the site in question?

@sheamusburns
Copy link

It's happening here too, and we don't have a clue as to how it might be triggering...

@xenomachina
Copy link

The error message itself, "Object Not Found Matching Id", comes from CefSharp, a .NET embedded Chromium library.

We've found that these always seem to be coming from Azure, and the initial links being followed seem to be variations of links that were sent out in emails. (Oddly, several utm-parameters get garbled by rot-13ing them, and then replacing some other characters, but in a seemingly deterministic way.) We've also noticed that the surges in these errors happen immediately after links to our site appear in emails.

We think that what's happening is that an email scanner, possibly part of Outlook, is doing some sort of pre-check of links (probably scanning for malware), and their embedded browser setup has some kind of bug that causes it to spam the console with errors.

@sheamusburns
Copy link

@xenomachina that pre-check/embedded browser theory might align with what we're seeing. We send out email links to the endpoint where the errors are surfacing, and trying to watch the associated sessions, does make me think it's an automated browser env of some kind.

@amortemousque
Copy link
Contributor

Hello,
As explained by @xenomachina, these errors seem to be triggered by a safe links scanner in emails. The browser SDK simply collects them. If you want to filter them, you can use the beforeSend API

@sheamusburns
Copy link

sheamusburns commented Oct 11, 2024

Hello, As explained by @xenomachina, these errors seem to be triggered by a safe links scanner in emails. The browser SDK simply collects them. If you want to filter them, you can use the beforeSend API

Thanks @amortemousque -- appreciate the response. I had read that and was attempting to use the beforeSend hook. Forgive my uncertainty and lack of knowledge around the RUM ecosystem here; since it's a hard thing to test locally (with no way to knowingly replicate the exact error), I assumed I could test the error message on a regex that matches and filter out the error that way in the hook. Unfortunately, it looks like that's not working in production. Incidentally we're seeing a huge quantity of these rum events come through in sequence within the same millisecond, so I don't know if somehow the event is getting garbled in a way where this logic won't target the errors properly, or if I'm just not understanding the expected params correctly. This is what I tried -- it looked reasonable to me, but we're still getting these errors. Can you give any advice on how I might be able to debug this?

beforeSend: (event: any) => {
            if (event.error) {
                // filter out error that might be caused by link validation/ pre-fetch rendering from email clicks
                // https://github.com/DataDog/browser-sdk/issues/2715
                const regex = /Object Not Found Matching Id:\d+, MethodName:\w+, ParamCount:\d+/
                if (regex.test(event.error.message) return false
            }
            return true
        },

This is what I'm seeing in DD:
Image

Image

And when I click on one of those errors and open the attributes tab -> json in DD, this is what I see as part of that payload:
Image

I am a bit confused on the right way to target these errors as you suggest.

Any help would be appreciated. Thanks!

-- UPDATE:
silly code switcheroo mistake. Was testing wrong with: if (event.error.message?.test(regex)) return false and updated the original code. Thanks all.

@thomas-lebeau
Copy link
Collaborator

Hi @sheamusburns,
You code snippet looks ok at first sight.
Could you open a ticket with datadog support so we'll be in a better position to help your case.
Thanks

@sheamusburns
Copy link

Hi @sheamusburns, You code snippet looks ok at first sight. Could you open a ticket with datadog support so we'll be in a better position to help your case. Thanks

Thanks, @thomas-lebeau I've opened a ticket.

@TheDutchCoder
Copy link

TheDutchCoder commented Nov 4, 2024

beforeSend: (event: any) => {
if (event.error) {
// filter out error that might be caused by link validation/ pre-fetch rendering from email clicks
// #2715
const regex = /Object Not Found Matching Id:\d+, MethodName:\w+, ParamCount:\d+/
if (event.error.message?.test(regex)) return false
}
return true
},

The problem is that you should test the regex against a string, not the other way around: regex.test(event.error.message)

@watch-janick
Copy link

Here's a corrected version with the right typing:

import { RumErrorEvent } from '@datadog/browser-rum'

// ....
beforeSend: (event) => {
  if (event.error) {
    const error = (event as RumErrorEvent).error
    // filter out error that might be caused by link validation/ pre-fetch rendering from email clicks
    // https://github.com/DataDog/browser-sdk/issues/2715
    const regex =
      /Object Not Found Matching Id:\d+, MethodName:\w+, ParamCount:\d+/
    if (regex.test(error.message)) return false
  }
  
  return true
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants