The volume of this error is extremely problematic and happening too often to be ignored. It happens at levels that in the past we have considered UBN if it occurred for newly deployed code and adds unnecessary noise to our client-side error logging instrumentation. It seems to occur when mw.loader.implement is called twice on the same module name in a user script because of users loading modules from different sources.
Too many unique IP addresses are triggering this bug for us to put the blame for this on the end-user and this is going to increase considerably when we roll out to English Wikipedia. At the time of writing in a 24hr period, there were 9,782 instances out of 32,079 unresolved errors meaning this accounts for 30% of the errors we track (this excludes errors from browser extensions and non-wikimedia domains).
- I enable the cat a lot gadget on https://commons.wikimedia.org/wiki/Special:Preferences#mw-prefsection-gadgets
- I add the line mw.loader.load('//commons.wikimedia.org/w/load.php?modules=ext.gadget.Cat-a-lot'); to my global JS at meta.wikimedia.org/wiki/User:Jdlrobson/global.js as I want the gadget on every wiki I use and some wikis do not have it.
- Every page view triggers a JS error
One possible solution, if global gadgets are not really supported, would be to update ResourceLoader to include wgSiteName in its call to mw.loader.implement and refuse to register such modules from another domain. If that's too controversial, it should at least not throw an Error in such a case or tag the error in such a way that the client-side error logging can ignore it.
Please determine the best way to remove these errors from the logs or if you think the errors need to be fixed, provide an alternative strategy for doing that.