Unhandled exception when popups are blocked

Describe the problem you’re having:

Popup:

Unhandled exception

TypeError: null has no properties

Stack trace:

openArticleInNewWindow@https://example.com/reader/:450:61
init_hotkey_actions/hotkey_actions.open_in_new_window@https://example.com/reader/:90:74
hotkey_handler@https://example.com/reader/:117:218

Console

keyeventToAction o => open_in_new_window reader:289:1
TypeError: "null has no properties"
	openArticleInNewWindow https://example.com/reader/:450:61
	open_in_new_window https://example.com/reader/:90:74
	hotkey_handler https://example.com/reader/:117:218
reader:146:110
xhrPost: 
Object { op: "rpc", method: "log", file: "https://example.com/reader/", line: 450, msg: "TypeError: null has no properties", context: "openArticleInNewWindow@https://example.com/reader/:450:61\ninit_hotkey_actions/hotkey_actions.open_in_new_window@https://example.com/reader/:90:74\nhotkey_handler@https://example.com/reader/:117:218\n" }
reader:143:71
TypeError: null has no properties[Learn More] reader:450:61
{"message":"HOST_ERROR_LOGGED"}

If possible include steps to reproduce the problem:

  • New install of Firefox (63.0.3), popups blocked.
  • 3-pane, open an article to view in TTRSS,
  • press O to open the article in a new tab:

tt-rss version (including git commit id):

# git rev-parse --verify HEAD
cd0a39ea4cb7137aef5b225bdc4472d207a48e62

Platform (i.e. Linux distro, PHP, PostgreSQL, etc) versions:

# cat /etc/issue
Ubuntu 18.04.1 LTS \n \l
# uname -a
Linux li1004-82 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

# php --version
PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.10-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies

# mysql --version
mysql  Ver 14.14 Distrib 5.7.24, for Linux (x86_64) using  EditLine wrapper

# psql --version
psql (PostgreSQL) 10.6 (Ubuntu 10.6-0ubuntu0.18.04.1)

# grep DB_TYPE config.php
	define('DB_TYPE', 'mysql');

well i guess the exception is bad but i’m not sure what did you expect to happen if you explicitly forbidden to do something and then did it

i’m not sure what did you expect to happen

A more user-friendly message?

Oh - forgot where I was :smile:

It’s not a show-stopper, I know; just thought it might be an edge case that had been forgotten about.

hehe

yeah this definitely needs to be wrapped in a try-catch

i’m busy with other stuff (i’ve just learned that this exists and it changes ~everything~) but later, sure