In a support thread titled “How to identify which plugin causes error,” tophee reports a recurring JavaScript error: TypeError: Cannot read property 'on' of undefined, originating from a minified plugin-third-party-*.js file. zogstrip suggests disabling plugins one by one to isolate the culprit, but tophee notes the error is intermittent, making this method unreliable. zogstrip adds that studying plugin source code is the only alternative. tophee struggles to locate the file in a Docker setup. JagWaugh asks for details from the error log’s info, backtrace, and env tabs, which tophee provides — confirming the error’s origin and environment. JagWaugh then suggests entering the Docker container and running cat plugin-third-party-*.js to inspect the file directly, noting that plugin names are often visible near the top. tophee confirms this method worked elegantly and quickly, identifying the national-flags plugin as the source, and plans to disable it immediately.
Hm, the problem is that the error seems to occur intermittently so that if it doesn’t occur, I can never be sure whether it’s because the plugin is disabled or because it decided to keep quiet for a while. Any other way?
Hmn, I’m no smarter now than I was 29 minutes ago. (same goes for hours, days and months).
What plugins have your got installed?
Try
./launcher enter app
cd public/assets
cat plugin-third-party-865e853871f20eeae50c3bede19ef7d8bd5352766ee238799cb2bb94caaecd68.js
(actually “cat plugin-third-party-865e” then tab to auto complete, the first hit will probably be the .js file)
You will find the name of the plugin mentioned in the .js file if you scroll up.
This, I thought was quite elegant and fast. I found the perpetrator it’s the national-flags plugin and I will disable it right away. Thank you so much!