Sidekiq: Uncaught TypeError: Cannot read property 'current' of undefined


(Tobias Eigen) #1

I am getting this error as of recent updates. Any suggestions?

Message (153 copies reported)

Uncaught TypeError: Cannot read property 'current' of undefined
Url: https://community.namati.org/
Line: 69
Column: 22
Window Location: https://community.namati.org/
Backtrace

TypeError: Cannot read property 'current' of undefined
    at https://community.namati.org/:69:22
Env

hostname	forum.namati.org-app
process_id	[16654, 11024, 11034, 22534, 14608, 14615, 4553, 131, 113, 5370, 5362]
application_version	[ee1aec676625516a5feb6c08d0b43711a73888be, b500f35d148001b642d6164dbcffa0aae4ef2144, 33aad0967225429a574cb1a7c2c24b174eaab097, f32f0d6337136c7c1f13143b5f0e70644f507038, f3c868e7bb7bc3c33d1c86f4f4ca22589113bf3b]
HTTP_HOST	community.namati.org
REQUEST_URI	/logs/report_js_error
REQUEST_METHOD	POST
HTTP_USER_AGENT	[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36, Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36, Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36, Mozilla/5.0 (Linux; Android 5.0; SM-N900T Build/LRX21V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.95 Mobile Safari/537.36, Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36, Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36, Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36, Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36, Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36, Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36, Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36]
HTTP_ACCEPT	*/*
HTTP_REFERER	https://community.namati.org/
HTTP_X_FORWARDED_FOR	[73.35.188.188, 61.3.187.153, 41.206.33.222, 96.88.230.45, 64.201.244.110, 197.237.177.108, 154.70.39.120, 73.231.215.102, 69.122.40.106, 154.122.75.159, 197.254.6.42, 208.54.4.155, 173.32.154.68, 90.207.127.162, 172.56.42.53, 207.164.179.98, 73.129.214.39, 172.56.41.150, 14.141.249.42, 46.233.112.28, 73.172.175.253, 172.56.42.111, 197.232.30.118]
HTTP_X_REAL_IP	[73.35.188.188, 61.3.187.153, 41.206.33.222, 96.88.230.45, 64.201.244.110, 197.237.177.108, 154.70.39.120, 73.231.215.102, 69.122.40.106, 154.122.75.159, 197.254.6.42, 208.54.4.155, 173.32.154.68, 90.207.127.162, 172.56.42.53, 207.164.179.98, 73.129.214.39, 172.56.41.150, 14.141.249.42, 46.233.112.28, 73.172.175.253, 172.56.42.111, 197.232.30.118]
params	
message	Uncaught TypeError: Cannot read property 'current' of undefined Url: https://community.namati.org/ Li
url	https://community.namati.org/
line	69
column	22
window_location	https://community.namati.org/
stacktrace	TypeError: Cannot read property 'current' of undefined at https://community.namati.org/:69:22

(Régis Hanol) #2

Do you happen to have a JS customisation which contains the following line?

Discourse.PageTracker.current().on('change', function (url) {

(Adam Capriola) #3

Yes! Good call. The JS customization being used was adapted from the example Piwik tracking code, which I didn’t realize had seen an update. I’ve patched up the customization for @tobiaseigen.