What to do about "The Components object is deprecated. It will soon be removed." in dev tools Console
Solution 1
This is not for the developer of the page to solve.
While biking back home, a possible cause popped up in my mind: could one of the add-ons I use cause this and yes, that appears to be the case.
I restarted with disabled add-ons and the message was gone.
Them I enabled them one at a time and the culprit is Selenium IDE.
A bug report on this issue was closed with Won't fix, with the message:
This error will resolve itself when we move to a native app later this year.
In a MozillaZine topic of 2012, it is explained how it could have been solved.
The first one is just a warning that the addon is using "Components" directly, which won't necessarily always be possible when using the Add-on SDK. (The preferred way to do it is to access the aliases for Components.classes and Components.interfaces and such that the SDK provides by requiring the "chrome" module.) It shouldn't be a problem right now, but might become one in the future.
Solution 2
it happened for me after installing Selenium plugin in my FireFox.

Comments
-
R. Schreurs 7 months
For almost every page I open in Firefox, I see this error in the Console of the developer tool bar:
(!) The Components object is deprecated. It will soon be removed.
The source is the html page. It happens with pages I create, but also on many common websites.
I found this documentation on Components object on MDN web docs, but that does not clarify a lot. Note that even that page shows this message(!)
It looks like a warning, but according to the Console filter, it is an error.
My main questions are:
- Is this something for me, as a developer of the page reporting this, to solve?
- If so, how do I go about that?
I am not aware of any problems as a result of this. For now, that is.
I have seen this for over a year, maybe longer. I mostly ignore this, but every now and then it starts nagging me again. I don't want my code to break suddenly and would like to get rid of this message obscuring other messages.
-
Sebastian Zartner about 3 yearsMessages like this one should not be exposed to web content at all. I wanted to file a bug report about it, but it seems it already got fixed in Firefox 71 Beta. At least there I don't see that error message being logged to the console.
-
ThetaSinner about 2 yearsI'm seeing this today in Firefox 81.0.2, so it looks like the people at Selenium haven't yet achieved what they intended.
-
Sevyls 9 monthsstill seeing this in firefox 98.0.2
-
Blip 9 monthsstill present in firefox 99.0