Open pacho2 opened 1 month ago
This is the default, can you if your Pictures or Desktop folders are writable?
let userPicturesDir = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_PICTURES);
let userDesktopDir = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DESKTOP);
BingWallpaperDir = (userPicturesDir?userPicturesDir:userDesktopDir) + '/BingWallpaper/';
It's possible your Distro has read-only for one of those?
Are you able to test the version 50 branch?
I've added error notifications:
Sadly the notification is not shown because extension fails to start at login with:
Extension BingWallpaper@ineffable-gmail.com: TypeError: image is null
Stack trace:
_selectImage@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:930:17
_setImage@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:382:14
_setConnections@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:267:14
_init@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:211:14
ButtonBox@resource:///org/gnome/shell/ui/panelMenu.js:13:1
PanelMenuButton@resource:///org/gnome/shell/ui/panelMenu.js:99:4
BingWallpaperIndicator@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:89:1
enable@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:1164:34
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:253:38
loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:461:32
async*_loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:759:24
async*_enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:765:48
_sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:800:20
async*init@resource:///org/gnome/shell/ui/extensionSystem.js:72:14
_initializeUI@resource:///org/gnome/shell/ui/main.js:303:22
start@resource:///org/gnome/shell/ui/main.js:176:11
@resource:///org/gnome/shell/ui/init.js:12:47
@resource:///org/gnome/shell/ui/init.js:21:20
I have full permissions on my ~/Pictures/ directory, but I don't know why it fails to create the subdir :/
But even creating manually the dir, it keeps failing in the same way. I have tried to enable debug from the extension settings, but it is the same error:
Extension BingWallpaper@ineffable-gmail.com: TypeError: image is null
Stack trace:
_selectImage@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:930:17
_setImage@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:382:14
_setConnections@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:267:14
_init@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:211:14
ButtonBox@resource:///org/gnome/shell/ui/panelMenu.js:13:1
PanelMenuButton@resource:///org/gnome/shell/ui/panelMenu.js:99:4
BingWallpaperIndicator@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:89:1
enable@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:1164:34
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:253:38
loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:461:32
async*_loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:759:24
async*_enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:765:48
_sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:800:20
async*init@resource:///org/gnome/shell/ui/extensionSystem.js:72:14
_initializeUI@resource:///org/gnome/shell/ui/main.js:303:22
start@resource:///org/gnome/shell/ui/main.js:176:11
@resource:///org/gnome/shell/ui/init.js:12:47
@resource:///org/gnome/shell/ui/init.js:21:20
Maybe it is failing to download the image? But I cannot see anywhere in the logs where it is trying to fetch it from, and nothing is downloaded to the BingWallpaper folder
This triggering an error in startup possibly. I don't understand how it's triggering an error there but can you comment out the log function call on row 930 in extension.js?
log('_selectImage: ' + this.selected_image + ' = ' + (image && image.urlbase) ? image.urlbase : 'not found');
Nice, now it can start and the failure is:
JS ERROR: TypeError: time.to_unix is not a function
friendly_time_diff@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/utils.js:396:24
_openMenu@file:///usr/share/gnome-shell/extensions/BingWallpaper@ineffable-gmail.com/extension.js:367:30
@resource:///org/gnome/shell/ui/init.js:21:20
Oct 01 09:34:07 gec-pacho gjs[91944]: g_task_return_error: assertion '!task->ever_returned' failed
I was getting the same "TypeError: image is null" error on my account. I commented out the log call on line 930 as you suggested and it started working for me. So not entirely the same problem as OP reported, but there's clearly a problem with that log line.
I can also confirm I've encountered the same error, and the same fix has worked successfully. However, my user account isn't new, so I'm not convinced this is related to that.
Hello,
I am not sure why extension runs fine on my user account but it doesn't on newly created ones. Maybe some folder (or subfolder) is missing on the newly one, but I am unsure about which one :(
Desktop (please complete the following information):
The following errors are logged:
Thanks for your help