does not run: Argument arg may not be null
I'm on Arch Linux and DING has been broken (i.e. not running at all) for me for weeks. I don't know which update caused it, but today I finally sat down to analyze it.
full disclosure: I have zero experience with JavaScript
This is the error I'm getting (journalctl /usr/bin/gnome-shell) ...
Okt 24 15:22:43 lacerta gnome-shell[930]: DING:
(gjs:5407): Gjs-CRITICAL **: 15:22:43.111: JS ERROR: Error: Argument arg may not be null
getTemplatesDir@/home/rene/.local/share/gnome-shell/extensions/ding@rastersoft.com/desktopIconsUtil.js:44:21
DesktopManager@/home/rene/.local/share/gnome-shell/extensions/ding@rastersoft.com/desktopManager.js:58:30
@/home/rene/.local/share/gnome-shell/extensions/ding@rastersoft.com/ding.js:107:30
@/home/rene/.local/share/gnome-shell/extensions/ding@rastersoft.com/ding.js:115:13
... caused by this function in desktopIconsUtil.js:
function getTemplatesDir() {
let templatesDir = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_TEMPLATES);
if (templatesDir == GLib.get_home_dir()) {
return null;
}
return Gio.File.new_for_commandline_arg(templatesDir)
}
The result of GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_TEMPLATES) is null on my system. I looked at the GLib documentation and wrote a little testprogram:
const GLib = imports.gi.GLib;
let templatesDir = GLib.get_user_special_dir(GLib.UserDirectory.USER_DIRECTORY_TEMPLATES);
print(`${templatesDir}`); // output: /home/rene/Desktop
templatesDir = GLib.get_user_special_dir(GLib.UserDirectory.TEMPLATES);
print(`${templatesDir}`); // output: /home/rene/Desktop
templatesDir = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_TEMPLATES);
print(`${templatesDir}`); // output: null
I have fixed it for myself now using TEMPLATES, but I don't know if that's what the code actually intends to do.
Edited by René de Hesselle