How to identify which plugin causes error

My error log is repeatedly showing this error:

TypeError: Cannot read property ‘on’ of undefined

How do I know which plugin this javascript file is from?

1 Like

By disabling them all and then enabling them one by one.

1 Like

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?

Apart from studying the source code of each plugins, I can’t think of any other way.

I have tried to find that js file to see if there’s any hint in it, but I have no idea where to find it (I’m using docker).

What do the info, backtrace, and env tabs of /logs contain for that error?

Info (domain replaced):

Uncaught TypeError: Cannot read property 'on' of undefined
Line: 1
Column: 14095
Window Location:

The OP was from b.acktrace

env (edited):

hostname	***
process_id	[143, 135, 150]
application_version	f918951d42234790938da442a768c2bf80f87069
REQUEST_URI	/logs/report_js_error
HTTP_USER_AGENT	[Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36]
HTTP_X_FORWARDED_FOR	[83.xx.xx.xx, unix:,, unix:]
message	Uncaught TypeError: Cannot read property 'on' of undefined Url:
line	1
column	14095
stacktrace	TypeError: Cannot read property 'on' of undefined at

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?

./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.

(There are more elegant ways to do this.)


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!