lucaswerkmeister / activate-window-by-title

GNOME Shell extension exposing a D-Bus interface to activate the window with the given title

Home Page:https://extensions.gnome.org/extension/5021/activate-window-by-title/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Call failed: title is null

jnowisz opened this issue · comments

The extension is excellent and works superbly, but after some time or maybe after some calls to:

busctl --user call org.gnome.Shell /de/lucaswerkmeister/ActivateWindowByTitle de.lucaswerkmeister.ActivateWindowByTitle activateBySubstring s "Firefox"

the result is an error:

Call failed: title is null

Running:

gdbus call --session \
    --dest org.gnome.Shell \
    --object-path /de/lucaswerkmeister/ActivateWindowByTitle \
    --method de.lucaswerkmeister.ActivateWindowByTitle.activateBySubstring \
    'Firefox'

results in:

Błąd: GDBus.Error:org.gnome.gjs.JSError.TypeError: title is null

("Błąd" is just a translation of "Error")

Only the restart of the computer helps.

Hm, quite interesting. Sounds like window.get_title() is null for some window, which seems unusual. If this happens again, can you investigate by running this code in Looking Glass (Alt+F2, lg)?

null_title_window = global.get_window_actors().map(actor => actor.get_meta_window()).find(window => window.get_title() === null);
[null_title_window.get_wm_class(), null_title_window.get_wm_class_instance()]

And maybe also look at null_title_window.get_pid() and then try to find out which program that PID belongs to (ls -l /proc/pid/exe etc.).

I believe that the problem was caused by some other extension. I turned off all my extensions but yours, and now it works. I will try to find which extension is to blame.

Well, I’ve pushed what I think should fix the issue anyways ^^ should be approved on extensions.gnome.org soon too. If you find out what the mysterious window was, feel free to let me know :)