Ferdinand Frank
Ferdinand Frank

Reputation: 365

JavaScript error on Firefox: TypeError: can't redefine non-configurable property "userAgent"

I'm currently receiving a weird JavaScript error on my error monitoring tool Sentry that says can't redefine non-configurable property "userAgent".

It seems like the error is happening on multiple pages but only on Firefox. Additionally, on all errors the referrer page seems to be "https://www.startpage.com/".

However, I'm not able to reproduce the error and have no clue whats causing the error as I do not have any assignments to the navigator.userAgent var.

Does anyone else have this issue, too, or has any clue what could cause this error?

Upvotes: 28

Views: 6333

Answers (1)

Goodword
Goodword

Reputation: 1645

I have seen this exact message before when trying to call Object.defineProperty on a property that is 'non-configureable' in strict mode. You have something in your code or in one of your deps that is trying to redefine a property using this method.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_delete

Upvotes: 1

Related Questions